> I really don't know much about the others like Mate and > PureMVC so I will only look into them if they've got > sufficient advantages of Cairngorm. > > Any inputs?
We are using Cairngorm but have implemented an alternative notification mechanism similar to what is included in PureMVC. The problem we wanted to address was being able to notify a number of different parts of the program that a service call was complete. This didn't fit well with the event/command relationship within Cairngorm. Previously in this forum, we discussed test-driven development and the issues that this raised. Test-driven development is really about design and not validation. In order to allow my tests to drive the design, what might be considered a view is split into two components. An mxml view that relies primarily on data binding and a supervising controller (Fowler 2006). The supervising controller is written in ActionScript and inherits the base component for the view. It then forms the base component for the mxml view. This makes the supervising controller and the mxml view appear to be closely bound. The supervising controller knows nothing of the mxml view. The mxml view calls functions in the supervising controller to get anything done and passes as parameters in those functions any data that the supervising controller may need. Basically, I wouldn't use Cairngorm in the future nor PureMVC nor any other framework. Most contain a very limited amount of code. The most useful part being something that allows notifications or the queuing of events. Cairngorm provides the services locator but that needs to be mocked out if you want to run tests that don't land up calling the remote server. I have achieved this but it suggests to me that there are more flexible solutions. I see Cairngorm and PureMVC as primarily providing conventions to follow to implement solutions. The problem is that it is unclear what problems those conventions address and the nature of the consequences of applying these conventions. I have blogged on this at http://kiwi-et.blogspot.com/2008/12/flex-mvc-frameworks.html.