After dealing with the fallout from several developers at varying levels of experience coding with their own ad hoc styles, to deadlines, I want to settle on an AS3 framework to form the basis of future large-scale projects. I considered Cairngorm for a while, but I’m now leaning towards PureMVC for several reasons.
First, the ability to use PureMVC in a Flash CS3 context. Although (see my previous posts) I have serious gripes with Flash CS3 as a development platform, the reality of the situation at work is that we create graphics-intensive applications with highly customised look-and-feel, and doing this in the context of a Flex workflow is much more time consuming compared to the same process in Flash. This might be just my relative inexperience with Flex – and I will certainly try to use Flex for future projects, and find ways to improve the workflow – but right now I don’t feel comfortable closing the door on development in Flash. If the framework we choose only works in Flex, this means any Flash projects will have to be treated as ad hoc throwaway chunks of code, and can’t benefit from the time invested learning the framework, and any in-house libraries based on, or depending on, that framework.
Second, the fact that PureMVC has been ported to other languages. As well as a longtime interest in Java and Ruby, recent tinkering with Google’s AppEngine has made me curious about Python, and the idea of using a port of the same framework on the server side is a highly attractive one.
Finally, the arguments (and I can’t pretend to have investigated them, I’m contenting myself with the summary, and trusting in the credibility of the AssertTrue folks) presented in favour of PureMVC in a comparison of AS3 frameworks, in October last year. (Have there been any significant changes in the framework scene since then? If so I would love to hear about them.)
At my last job, I often peeked over the shoulder of my Java-coding colleagues and heard them wax lyrical about the benefits of Spring. The Inversion of Control concept, realised using dependency injection, is the main element that I fully understand in a way that’s relevent to my own development experience (other features, like AOP, sound interesting but are still mysterious to me).
So I was pleased to see the latest release of the Prana Framework, a lightweight IoC container for AS3, has more support for PureMVC. (There are other AS3 IoC containers out there, but Prana seems the most mature and serious.) Up to this point, however, documentation of how to use Prana and PureMVC together is pretty thin on the ground … there’s been some murmuring on the mailing list, but I can’t seem to find anything on the web. Understandably, because it’s recent development. But before I commit myself and the other Fl(ash|ex) developers at my workplace to using PureMVC, I’d like to be either see a concrete example of use of Prana with PureMVC or build one myself (preferably the former, obviously) … can anyone point me in the right direction?




hello :)
You can try an other solution with my opensource framework VEGAS and this extensions :
http://code.google.com/p/vegas
My Framework contains a core framework with advanced event model, ADT (Collections based JAVA), string tools and utils.
The extension AndromedA contains IOC tools based ECMAScript notation and not XML with external config files (see the tutorial in progress) :
http://code.google.com/p/andromed-as/wiki/TutorialsAndromedA_IOC
My Framework works in AS3, AS2 and SSAS (server side actionscript for FMS)
You can find in the SVN of the project lot’s of tutorials and examples :
http://svn1.cvsdude.com/osflash/vegas/AS3/trunk/bin/test/
http://svn1.cvsdude.com/osflash/vegas/AS3/trunk/bin/tutorials/andromeda/
With VEGAS you can find little documentary opensource framework AST’r :
http://code.google.com/p/astr/
This little framework contains littles examples to implement applications with VEGAS with MVC, IOC, localization, remoting, etc. concepts ;)
EKA+ :)
Thanks great post :)
Nice post!
Have you looked at Guice and its exposure to Flex via GraniteDS ? The dependency injection methodology, that extends from config variables to native Objects, is very useful and good to see that we can get past the config.xml file at last :)
Guice looks great. I really like the method chaining and the fluid, expressive code that enables one to write. But I don’t have a Java backend. I need an AS3 version!
If you are still looking for a concrete sample of
Prana and PureMvc integration, there is one
available. Browse to the prana sourceforge downloads
page, and download “prana-projects-0.5.zip” archive.
In it you will find “prana-sample-puremvcArch101Demo”.
If you want it to setup in your Flex Builder, follow
instructions in
“prana-projects-0.5.zip/prana-projects-0.5/readme.txt”.
Additional documentation about prana/puremvc
integration you can find in
“prana-sample-puremvcArch101Demo\resources\docs\pranaPureMvcIntegration-Notes.txt”, but keep
in mind that it is somewhat outdated and
inconsistent in parts (it was written in a form of
journal during development). Still, I believe it can
be helpful anyway.
If you have any questions, please post it on prana’s
mailing list (forum will be available soon).
HTH
Best regards,
Damir Murat
Igenko is a real project that use PureMVC and Prana framwork : http://code.google.com/p/igenko/
Check the sources …
So what did you find regarding using PureMVC with Prana? I took a look at the Prana PureMVC integration examples in the prana project and it just seems like too much modification complexity to the PureMVC framework itself.
[...] http://joshua.almirun.com/tech/ria/flash/puremvc-and-prana [...]