Sunday, November 28, 2010

Flex - Parsley's Dependency Injection Framework (IOC)

Hi,

Flex Parsely's Spicelib framework has an unique feature of dependency injection using the (IOC) Control mechanism.
Parsley being an Application Framework for Flex and Flash applications has been built upon an IOC Container and messaging framework that can be used to create Highly decoupled architectures. It allows you to configure the objects to be managed by the container with MetaData, mxml, xml or as which can be extensible.
The Core of the Framework (IOC) Container and the Messaging Subsystem does not depend on the flex SDK at all.
It Provides the Messaging and Object Lifestyle Management. The Core Features of any IOC Container is the dependency injection.
For Flex Remoting the Framework can help you in two respects, first you can declare your remoteobjects in a parsley configuration class alongside other objects and inject them into your commands/Controller Class or you can use the support for asynchronous commands to also route results and exceptions or remoting invocations using a more decoupled manner.
 IoC Containers provide out of the box methods for instantiating and configuring your application’s objects. The use of an IoC container is dependent on your (and your application’s) needs. For smaller projects, it might not be appropriate.


Cheers!!
Pushkar