Welcome!

Java Authors: Michael Sheehan, Maureen O'Gara, Jonny Defh, Suresh Krishna Madhuvarsu, RealWire News Distribution

Related Topics: Adobe Flex, ColdFusion, AJAX & REA

Adobe Flex: Article

Do We Need Third-Party Flex Frameworks?

Would you recommend using third-party Flex frameworks? If yes, why?

This started as a  Skype chat room conversation between my colleague Anatole Tartakovsky and myself, and I thought that it would be a good idea to invite more Flex developers to this discussion.

Having said this, I’d like to make it clear that over my career, I’ve been developing frameworks and truly respect people who are capable of creating frameworks, and Anatole has huge experience in this area as well.  Here we’re just questioning the need to create frameworks not for a general-purpose language like Java, but for a domain-specific framework like Flex.

This is our dialog with minor editing. Your input and feedback are greatly appreciated.

Yakov: Why do people design Flex frameworks as opposed to reusable components?  One of the framework is called Cairngorm, the other one is called PureMVC. I’m sure there is more. It seems to me that such frameworks are unnecessary overhead over well-designed Flex frameworks. Are there any benefits here? Why bother creating all these singleton-based bottlenecks?

Anatole: First of all, PureMVC seems to be more of an  ActionScript Framework. It is not specifically a Flex framework and concentrates on the task of creating a generic framework for low-level AS objects. Flex comes with “prebuilt suggestions” of how a model/view controller might work - and it offers lots of hooks throughout the data and UI classes that help implement MVC.

PureMVC is also "server-agnostic". Flex made the Java implementation of a distributed Model that can provide dynamics to the distributed Web applications very efficient. PureMVC is more about making apps in a more traditional way.

Cairngorm was started as “Micro – Architecture” – a set of patterns that allowed the solving of certain problems in the application design – like Model Locator or Commands – and certain applications. It never appealed to me as it had a number of assumptions that required more coding. At best you would use one or two pattern implementations from Cairngorm, but it’s much easier to rip out the part you need and adjust it to your liking.

Yakov:  I can appreciate the fact that design patterns are useful in general, because they may help developers deal with repeating patterns in software constructions such as Singleton, Mediator, Model-View-Controller and the like. But when I look at some of the third-party frameworks built on top of Flex, I keep asking myself the same question, "Why build a framework on top of a framework? Are there any benefits to introducing a middleman between an application's views and an already existing Flex framework?

More Stories By Yakov Fain

Yakov Fain is a Managing Director of Farata Systems, consulting, training and product company. He has authored several Java books, dozens of technical articles. SYS-CON Books released his latest co-authored book , Rich Internet Applications with Adobe Flex and Java: Secrets of the Masters in Spring 2007. Sun Microsystems has nominated and awarded Yakov with the title Java Champion. He leads the Princeton Java Users Group. He is an Adobe Certified Flex Instructor. Currently Yakov works on the book for O'Reilly "Enterprise Application Development with Flex". He twits at twitter.com/yfain.

Comments (1) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
neil 01/28/08 01:47:22 PM EST

surely pureMVC isn't a framework ontop of a frame work, it is actually a frame work underneath a framework, or maybe a better spacial description still is a framework underneath and to the side of a framework. It was designed to work independently of any flex, flash or apollo classes, but also designed to work well next to them.