Categories
Archives
-
September 2010 (1)
-
August 2010 (3)
-
June 2010 (1)
-
May 2010 (2)
-
April 2010 (1)
-
March 2010 (6)
-
January 2010 (1)
-
December 2009 (3)
-
November 2009 (5)
-
October 2009 (10)
-
September 2009 (1)
-
June 2009 (1)
-
October 2008 (1)
-
August 2008 (1)
-
May 2008 (1)
-
April 2008 (2)
-
February 2008 (1)
-
January 2008 (4)
-
Flex Architecture Frameworks
Why bother to use frameworks?
I believe that Flex it is more than name, it describe the environment itself. It’s friendly for developers, flexible to maintain changes, new requests and functionalities, design changes and improvements. It is also very extensible. We can create, share and use hundreds of libraries, components or frameworks.
Flex projects are meant to be internet RIAs, big loads of code created to be fulfilled with very interactive functionalities. With Flex we can deliver products which bring new quality to the Internet sites. Developing those applications usually require couple of visual components, some Web Services connections and adding some Actionscript to tie everything up and here we go! We’ve got RIA. Results tend to be amazing comparing to small amount of effort.
That’s one of today’s software development features. Develop rapidly.
But what happens when we are facing functionality changes, interface improvements, changing Web Service to AMF? Need of adding new module? What if we are given with new developer into existing project? Well… It depends on how much effort did we make to write an application, but usually it is the same. Nightmare
So why bother to use architecture framework? Why need to learn couple of more approaches which on the first look scares everyone with complicity?
Well organized app?
I believe that some of the most important strengths of well organized architecture of application should:
Two words can cross your mind while reading those points: Isolation and Encapsulation. They are foundation for most of the frameworks, specially based on MVC architecture.
Two words regarding to MVC
Ok, not only MVC, but rather MVCS, as they are most popular in Flex enviroment. We are speaking about “Model-View-Controller-Service” approach.
For people who see this for the very first time it’s more than abstraction. But believe me, it’s more simply than it looks like.
Flex dedicated architecture frameworks
Ok, coming back to the story line – I had tried and worked with some frameworks for Flex. Knowing each of them is connected with need to learn some design patterns, sometimes more advanced, but that’s another story. Generally, worth of mentioning are some of frameworks.
How evaluate effectiveness and quality of the framework? I believe that those are important:
Adobe Cairngorm
http://labs.adobe.com/wiki/index.php/Cairngorm
My favorite. Developed and maintaned officialy by Adobe while having very big community. Well documented, open sourced, based on best patterns taken from Java and .NET and very extensible.
Using Adobe words:
Biggest project created in Making Waves with Adobe Cairngorm so far is Vattenfall Energy Calculator. Project had to be changed couple of times during development, we had pretty big model and communication. Cairngorm passed tests for A+
PureMVC
http://puremvc.org/
Cairngorm’s best competitor. While Cairngorm is made only for Flex, PureMVC is Actionscript framework that can be used with Flash, Flex or pure Actionscript code. It has very clean implementation and is well documented. Cliff Hall, founder of the PureMVC states that this framework solves many problems that can be found while using Cairngorm framework. I believe – depends on what are you looking for
In Cliff Hall’s words:
Sometimes it turns out that this dependency is advantage.
Model-Glue: Flex
http://www.model-glue.com/flex.cfm
Model-Glue is framework based on MVC. First it was ported to ColdFusion and Java. Framework itself is interesting, but lacks documentation and some approaches appears to be immature. In their words:
Flest Framework
http://code.google.com/p/flest/
Although the framework operates with Model, Controller, Command and view State, should not be considered as MVC implementation due to keeping Model and View together and representing Commands as closures, functions that can run in a context of given object.
In my opinion this framework lack of documentation and implementation details are not so encouraging.
YOUR-OWN Framework
Well, actually there is no need for using any of those. If you are developing yourself or you have relatively big experience and code with someone on the same level – you can try to use this solution. However I strongly suggest deep understanding of MVCS and proven design patterns. Keep in mind that introducing someone new to your project might take a lot of time.
Conclusion
There are many more frameworks, I wanted to focus on the main ones. Using architecture framework help our own work. We can make them more stable, flexible, modularized and able to be developed parallel without any misunderstandings between developers. I strongly recommend Cairngorm as our main framework, due to many of its benefits. I hope that you have enjoyed this small introduction to Flex frameworks and I will be able to write some introduction to Adobe Cairngorm soon.
See your comments in my code,
Wojciech Ptak,
RIA consultant & Flex developer
Making Waves