Thanks for your comments. I didn't see your arguments when thinking about this trick. I agree that the switch statement in the handleNotification()
method is planned simplicity, it really is. It is just boring
Another good point to the switch is that I usually use this place to cast the generic notification.getBody()
object into the type expected by the handler, and make type verification as well. I think it's a good place to but this kind of repetitive code with little business value.
Regarding the "technology-proofing" principle of PureMVC, I understand it and agree as well. You're right that it is preferable to make it easy to change the technology easily, they are moving so fast.
So finally, maybe this trick could be useful for small, personal software when you want to make PureMVC use a little easier with Mediators -- and using Flex of course
Thanks again for your comments, they are enlightning