Friday, July 18, 2008

Flex Builder 3 and Eclipse 3.4 (J2EE pack) - Not there yet !!

I loved the eclipse.org showing me today Eclipse 3.4 (Ganymede). Wow, its time for me to update my good old europa eclipse 3.3.2 to a new fantastic Eclipse 3.4 Pretty fast, i have 600kbps line at home so the download was pretty fast. Yup thats my eclipse 3.4 up and running. Installing Flex builder 3 professional plugin ofcourse gives me a warning during my installation that it cannot find eclipse 3.3 or eclipse 3.2 (the supported versions). I really liked the eclipse 3.4 that works superb with the SVN subclipse plugin. I just loved it. I installed flex builder ahead and imported my flex project and find an error opening my .mxml file (right at the first step). Hmm then i remembered, the configuration files present in the eclipse/configuration directory and flex builder 3 / eclipse directory that claim the support for the product. You know what, we need rework on the new eclipse. Sometimes, i wish the related products should be aligned with their releases and corresponding supports but well, blame no one.. its the world that moves faster than what we do. I love both adobe and eclipse for their lovely tools at the end.

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.