Acer Announces Aspire 5920 Laptop with Built-in WiMax Module Exctract and learn from the Flex 3 data visualization source code (the charting controls, the AdvancedDataGrid classes, the OLAP classes, and the automation classes)

Today during a presentation about the use of Flex in enterprise scenarios, while I was illustrating the benefits of using the factory mechanism of BlazeDS to integrate it with Spring, a developer asked me why use Spring for Flex development (I guess he does not come from the Java world).
I think that the answer could be obvious to most of you but I want to share my thoughts with you about that topic. Feedbacks and opinions are appreciated :)

Spring is an open source framework that helps a lot the developers' life to make it easier.There some factors you have to consider when you develop a Java application. In fact using the standard JEE approach you'll tend to write a lot of unuseful and repeatedly code or implementing J2EE design patterns that are workarounds for technology limitations rather than real solutions to a problem. This is where Spring can save you a lot of time.
Spring uses the Inversion of Control (IoC) pattern that runs in any environment.

From  Wikipedia: The Inversion of control - also known as IoC - is a concept, and an associated set of programming techniques, in which the control flow is inverted compared to the traditional interaction model expressed in imperative style by a series of procedure calls. Thus, instead of the programmer specifying, by the means of function calls, a series of events to happen during the lifetime of a programme, they would rather register desired responses to particular happenings, and then let some external entities take over the control over the precise order and set of events to happen.

The container used by Spring is very lightweight and reduces the  startup time by instantiating components dependencies when it creates them.
Moving out the configuration code to provide dependencies we use Spring to assemble and manage the application components (Spring beans).

Spring Beans are Java objects so in order to access these Spring objects from Flex you have to use BlazeDS or Livecycle Data Services and then configure the destination to point at.
The essence of Spring is in providing enterprise services to Plain Old Java Objects (POJOs).
The POJO term was coined by Josh MacKenzie, Martin Fowler, and  Rebbecca Parsons to intend a Java object that doesn't implement any special interfaces.

Then using the SpringFactory  you can use Flex destinations with dependency-injected instances of Spring objects.
Having dependency injection containers allows you to configure the application consistently in one place. 

The SpringFactory was developed by Jeff  Vroom (http://weblogs.macromedia.com/lin/README.txt) and is also available on Adobe Exchange.

More information on the Spring framework can be found at the Spring's homepage. And don't miss the Christophe's article on Flex and Spring


Marco Casario is one of the most dynamic developers in the Adobe (formerly Macromedia) world. Flex and FlashLite certified Instructor, Flash and Dreamweaver certified, he intensively collaborates with Adobe Italy as a speaker and promoter of several events and roadshows. Marco has recently founded Comtaste S.r.l., a company dedicated to explore new frontiers in the Web 2.0 field, where the themes of accessibility and usability have added further importance to the PDF format and the relevant Acrobat application tools.