After a long beta release Adobe has finally released Cairngorm 2.2, which is now available on labs.
Though only a dot release, there are some pretty significant changes which are worth mentioning; specifically the distributed binaries. For instance, Flex Data Services has a dependency on fds.swc, which is shipped with the standard Flex Framework. In order for Cairngorm ServiceLocator to contain a reference to mx.data.DataService, the fds.swc needed to be included in the Cairngorm.swc. This resulted in increased file size as all Cairngorm classes were bundled in the same swc. regardless if you needed FDS or not. Adobe has resolved this by externalizing all FDS specific dependencies to the new Cairngorm Enterprise edition.
Another major improvement is the additional dispatch() method which has been added to CairngormEvent. The dispatch method allows developers to instantiate an CairngormEvent instance and dispatch the event via the instance. In other words, the event instance can dispatch itself into the event flow without a need to invoke CairngormEventDispatcher directly. This is similar to my IViewNotifierEvent solution which is an adaptation of the Stanglware solution which was developed by my former co-worker Fred Stangl.
The ability to remove Commands from the FrontController registry at runtime is of great value. I was actually in the process of developing an API to do just that.
The WebService bug has been fixed which is also a big plus as it caused great confusion initially.
Listeners for Event / Commands now have weak references in the base FrontController, this was also an issue in Cairngorm 2.0 and 2.1 that we were struggling with as objects still had references long after they were no longer being referenced and therefore would not get picked up by GC.
I have been using Cairngorm 2.2 beta for the past few months and have found it to be a big improvement over Cairngorm 2.1 and 2.0. Below I have listed the major changes in Cairngorm 2.2 contrasted with Cairngorm 2.1 and 2.0.
Changes between Cairngorm 2.1 and Cairngorm 2.2
- Removed dependency on Flex Data Services (fds.swc)
- Flex SDK SWCs are no longer linked into Cairngorm.swc
- Added support for setting remote credentials
- Fixed bug with Web services not loading the WSDL
- ModelLocator interface deprecated in favor of IModelLocator
- Added deprecation metadata for compiler support
- Added dispatch() helper method to CairngormEvent
- Commands now added to Controller with weak references
- Added removeCommand to FrontController
- made commands protected in FrontController
Changes between Cairngorm 2.0 and Cairngorm 2.1
- Responder has been deprecated. Use mx.rpc.IResponder
- Command deprecated in favor ICommand
- ValueObject deprecated in favor of IValueObject
- ServiceLocator getService() deprecated in favor getRemoteObject()
- ServiceLocator.getInvokerService() has been deprecated.
- IServiceLocator interface has been created to support unit testing
- ServiceLocator has security methods added
- FrontControler.executeCommand() and getCommand() now protected
- Error messages have been internationalized
If you are not currently leveraging Adobe Cairngorm to build scalable Flex RIAs I highly suggest you begin to explore the solutions which Cairngorm provides. I am a huge advocate of Cairngorm and strongly support Cairngorm as an architectural solution for building Enterprise class RIAs with Adobe Flex.
If you are interested in developing with Cairngorm, but are having trouble getting started, please feel free to contact me directly and I will be happy to walk you through Cairngorm and help get you started.