Friday, July 18, 2008
Pure MVC and Flex
After the cairngorm made by the adobe consulting, i hit upon this framework Pure MVC that seperates Model, View, Controller and also seperates the view with the observer design pattern.
To make it simple look at it as this:
a) Model =>
b) View =>
c) Controller =>
ApplicationFacade -> controls the commands to be added
controllers are similar to commands
view talks to the Mediators (that are registered) and ensure to unregister them after you use them. You would send notifications to the mediators and the mediators catch the notifications, call the proxies registered with the applicationfacade during the app start up. Proxies can be used to make webservice calls or any other model calls. Proxies return back to the mediator that talks to the view again.
It really looks very logical but i feel its a bit overheard in terms of development. Too many listeners, too many things listening to the notifications... too much of a granularity in terms of programming... hard to find guys with adequete knowledge to get on with it. But this is the trade off between developing a huge enterprise application with ease of development or best practises. If not written properly PureMVC can turn out to be a nightmare to figure out what is happening in the entire application. If the registered mediators are not removed out after the use, the memory consumption can go bizzare. I will come up with a sample example after a while and show you how it works after a later time.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment