girton’s devnotes

ongoing developer notes  
Filed under

ioc

 

AS3 Dependency Injection and [Autowire] « shaun smith

I was able to migrate my current project over to Robot Legs (from PureMVC) in about a day. Not bad considering there were dozens of Commands, over 20 Mediators and around 10 Proxies to convert. It was a bit of a mission creating all the custom Event Classes to replace my Notifications though.

But it was certainly worth it. My application code has tidied up nicely. Many of my Mediators, Proxies and Commands have halved in size, due to the removal of lookup code and notification body casting.

This is an interesting idea that bears keeping an eye on: dependency injection without external XML representation -- the state of the AS3 art moves forward. He used the SmartyPants IOC framework which is on google code. You can see a simple Flex example at

http://code.google.com/p/smartypants-ioc/

It would probably not make a bad migration path from pureMVC.

Loading mentions Retweet
Filed under  //   Flex   IOC   pureMVC  
Posted by George Girton 

Comments [1]