<p>I'm currently using and enjoying using the Flex MVC framework <a href="http://www.puremvc.org" rel="noreferrer">PureMVC</a>.  I have heard some good things about Cairngorm, which is supported by Adobe and has first-to-market momentum.  And there is a new player called Mate, which has a good deal of buzz.</p>

<p>Has anyone tried two or three of these frameworks and formed an opinion?</p>

<p>Thanks!</p>

[{'answer_id': 37566, 'author': 'Theo', 'author_id': 1109, 'author_profile': 'https://Stackoverflow.com/users/1109', 'pm_score': 7, 'selected': True, 'text': '<p><a href="http://mate.asfusion.com/" rel="noreferrer">Mate</a> is my pick. The first and foremost reason is that it is completely unobtrusive. My application code has no dependencies on the framework, it is highly decoupled, reusable and testable. </p>\n\n<p>One of the nicest features of Mate is the declarative configuration, essentially you wire up your application in using tags in what is called an event map -- basically a list of events that your application generates, and what actions to take when they occur. The event map gives a good overview of what your application does. Mate uses Flex\' own event mechanism, it does not invent its own like most other frameworks. You can dispatch an event from anywhere in the view hierarchy and have it bubble up to the framework automatically, instead of having to have a direct line, like Cairngorms CairngormEventDispatcher or PureMVC\'s notification system.</p>\n\n<p>Mate also uses a form of dependency injection (leveraging bindings) that makes it possible to connect your models to your views without either one knowing about the other. This is probably the most powerful feature of the framework.</p>\n\n<p>In my view none of the other Flex application frameworks come anywhere near Mate. However, these are the contenders and why I consider them to be less useful:</p>\n\n<p>PureMVC actively denies you many of the benefits of Flex (for example bindings and event bubbling) in order for the framework to be portable -- a doubious goal in my view. It is also over-engineered, and as invasive as they come. Every single part of your application depends on the framework. However, PureMVC isn\'t terrible, just not a very good fit for Flex. An alternative is <a href="http://code.google.com/p/flexmvcs/" rel="noreferrer">FlexMVCS</a>, an effort to make PureMVC more suitable for Flex (unfortunately there\'s no documentation yet, just source). </p>\n\n<p>Cairngorm is a bundle of anti-patterns that lead to applications that are tightly coupled to global variables. Nuff said (but if you\'re interested, <a href="http://blog.iconara.net/2008/04/13/architectural-atrocities-part-x-cairngorms-model-locator-pattern/" rel="noreferrer">here are some more of my  thoughts</a>, and <a href="http://blog.iconara.net/2008/12/13/architectural-atrocities-part-10-cairngorms-service-locator/" rel="noreferrer">here too</a>).</p>\n\n<p><a href="http://code.google.com/p/swizframework" rel="noreferrer">Swiz</a> is a framework inspired by the Spring framework for Java and Cairngorm (trying to make up for the worst parts of the latter). It provides a dependency injection container and uses metadata to enable auto-wiring of dependencies. It is interesting, but a little bizzare in that goes to such lengths to avoid the global variables of Cairngorm by using dependency injection but then uses a global variable for central event dispatching.</p>\n\n<p>Those are the ones I\'ve tried or researched. There are a few others that I\'ve heard about, but none that I think are widely used. Mate and Swiz were both presented at the recent 360|Flex conference, and there are videos available (<a href="http://mate.asfusion.com/news/360-flex-presentation" rel="noreferrer">the Mate folks have instructions on how to watch them</a>)</p>\n'}, {'answer_id': 151029, 'author': 'Neil Middleton', 'author_id': 4787, 'author_profile': 'https://Stackoverflow.com/users/4787', 'pm_score': 0, 'selected': False, 'text': "<p>Bear in mind that Cairngorm is THE adobe sponsored framework, and now hosted on opensource.adobe.com.  Also note that it's by far the most prolific amongst developers at the moment.</p>\n\n<p>If you know Cairngorm and are looking for a job, you won't go far wrong.</p>\n"}, {'answer_id': 151385, 'author': 'Brandon', 'author_id': 23133, 'author_profile': 'https://Stackoverflow.com/users/23133', 'pm_score': 0, 'selected': False, 'text': '<p>Cairngorm is easy to use and well documented:\n<a href="http://www.cairngormdocs.org/" rel="nofollow noreferrer">http://www.cairngormdocs.org/</a></p>\n\n<p>I recommend the <a href="http://www.cairngormdocs.org/tools/CairngormDiagramExplorer.swf" rel="nofollow noreferrer">Cairngorm Diagram Explorer</a> and the classic article about <a href="http://www.adobe.com/devnet/flex/articles/cairngorm_pt1.html" rel="nofollow noreferrer">Cairngorm</a>.</p>\n\n<p>I was new to Flex when I learned Cairngorm but found it useful and easy to learn with the above.</p>\n'}, {'answer_id': 523384, 'author': 'Christophe Herreman', 'author_id': 17255, 'author_profile': 'https://Stackoverflow.com/users/17255', 'pm_score': 1, 'selected': False, 'text': '<p>We are currently working on a <a href="http://joeberkovitz.com/blog/reviewtube/" rel="nofollow noreferrer">MVCS</a> implementation in the <a href="http://www.pranaframework.org/" rel="nofollow noreferrer">Spring ActionScript</a> framework. It uses the full power of the Inversion of Control container so you have centralized dependency management and are able to swap things easily. It is not very prescriptive in how you do things but provides you with a very flexible infrastructure.</p>\n\n<p>If you are new to Spring ActionScript and MVCS, I have an introductory post at my blog: <a href="http://www.herrodius.com/blog/158" rel="nofollow noreferrer">http://www.herrodius.com/blog/158</a></p>\n'}, {'answer_id': 843131, 'author': 'Yakov Fain', 'author_id': 87056, 'author_profile': 'https://Stackoverflow.com/users/87056', 'pm_score': 3, 'selected': False, 'text': '<p>I\'ve seen these kinds of discussions many many times. They usually start with WHICH Flex framework do you use. Not many people ask the question WHY do you even need to use any framework on top of Flex framework.</p>\n\n<p>I\'m not in favor of using any MVC framework (Cairngorm, PureMVC) in Flex code. Mate is a better candidate. At least it\'s simple to understand and is non intrusive. I prefer using enhanced components<br> à la carte. We\'ve created and open sourced a bunch of them (see clear.swc in the Clear Toolkit at <a href="http://sourceforge.net/projects/cleartoolkit/" rel="nofollow noreferrer">http://sourceforge.net/projects/cleartoolkit/</a>.</p>\n\n<p>The first chapter of our upcoming O\'Reilly book "Enterprise Development with Flex" has a detailed comparison of several Flex frameworks: <a href="http://my.safaribooksonline.com/9780596801465" rel="nofollow noreferrer">http://my.safaribooksonline.com/9780596801465</a> . </p>\n'}, {'answer_id': 1135839, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': '<p>MATE is the way to go.A framework which does what a framework should do.\nDe-coupled architecture\nSimple\nSmall foot print\nEfficiency</p>\n'}, {'answer_id': 1319985, 'author': 'Los', 'author_id': 161015, 'author_profile': 'https://Stackoverflow.com/users/161015', 'pm_score': 0, 'selected': False, 'text': '<p>I kinda have my doubts on these MVC frameworks (Mate, Cairgnorm, etc...) with the way they implement event maps and event controllers, it reminds me too much of wxWidgets and other GUI toolkits of that sort.</p>\n\n<p>However, would be really nice is if Flex or one of these MVC frameworks uses the Signal/Slots paradigm that Qt offers.</p>\n'}, {'answer_id': 2891778, 'author': 'Vadim Sluzky', 'author_id': 313985, 'author_profile': 'https://Stackoverflow.com/users/313985', 'pm_score': 0, 'selected': False, 'text': "<p>I recommend to use MATE for developing greats and complicated projects,like other frameworks, Mate addresses the common architectural concerns in Flex such as event handling, data binding, and asynchronous processing, but the most important goal is that it's only tag-based so it's very easy to use it in our Flex Applications.</p>\n"}, {'answer_id': 2972029, 'author': 'Vladimir Grigorov', 'author_id': 22764, 'author_profile': 'https://Stackoverflow.com/users/22764', 'pm_score': 3, 'selected': False, 'text': '<p>Check out <a href="http://www.robotlegs.org/" rel="noreferrer">Robotlegs</a>.  </p>\n\n<p>"It provides the glue that your application needs to easily function in a decoupled way. Through the use of automated metadata based dependency injection Robotlegs removes boilerplate code in an application. By promoting loose coupling and avoiding the use of Singletons and statics in the framework Robotlegs can help you write code that is highly testable." </p>\n'}, {'answer_id': 5165408, 'author': 'Tushar Khairnar', 'author_id': 255740, 'author_profile': 'https://Stackoverflow.com/users/255740', 'pm_score': 0, 'selected': False, 'text': "<p>Yes Mate is the best framework for flex. I have used in one application which had several revisions both in terms of GUI and back-end data service. I only needed to change my event-map every time there was any change.</p>\n\n<p>Mate also has MockService implementation which makes testing easy not a mate's advantage but nice to have one.</p>\n"}, {'answer_id': 5480916, 'author': 'ming_codes', 'author_id': 387028, 'author_profile': 'https://Stackoverflow.com/users/387028', 'pm_score': 1, 'selected': False, 'text': "<p>I am using (and recommend) Swiz framework.  It's not as complex and PureMVC, but it gets the job done.  Moreover, it's a IoC container, and I like IoC.</p>\n\n<p>I never used Mate, so I can't comment on that.  But I do recommend against Cairngorm.  Cairngorm is said to be open source, but it's really not supported well by the community.  It's release cycle is also slow.  I've been waiting FOREVER for Navigation Library to come out of beta.</p>\n"}, {'answer_id': 11983039, 'author': 'Wild e-Man', 'author_id': 1598112, 'author_profile': 'https://Stackoverflow.com/users/1598112', 'pm_score': 0, 'selected': False, 'text': '<p>You should design you own MVC "framework" based on your own needs. If you know a bit of design patterns, Flex has a lot to offer natively.</p>\n\n<p>Best thing of designing your own MVC is that it can be a light weighted or complex as you need.</p>\n\n<p>My experience with frameworks is that you basically have to write twice as much code than you would without using a framework. The good thing about frameworks is, that it forces you to work in a consistent way, but if you can work in a consistent way by making use of Design Patterns, best practices and common sense, I would suggest to stay away from frameworks.</p>\n'}, {'answer_id': 12663962, 'author': 'Tarun', 'author_id': 363075, 'author_profile': 'https://Stackoverflow.com/users/363075', 'pm_score': 0, 'selected': False, 'text': '<p>Its very difficult to come to a conclusion about which framework is better than others. Depending on the nature and complexity of project and team members expertise &amp; preference one may be more suitable than other in a given situation</p>\n\n<p>I have compiled a list of Flex Frameworks with there brief descriptions and pointers to more information about them in this URL.\n<a href="http://practicalflex.blogspot.com/2011/08/list-of-adobe-flex-tools-frameworks.html" rel="nofollow">http://practicalflex.blogspot.com/2011/08/list-of-adobe-flex-tools-frameworks.html</a>\nthe url may be helpful for anyone looking for evaluating a Flex framework for his/her project.</p>\n\n<p>After evaluating many most of the Flex frameworks I found the Swiz framework most simpler and easy to get started with for a new developer. Hence it ensures easy maintainability &amp; extensiblity of your application.</p>\n'}, {'answer_id': 13013634, 'author': 'nitin', 'author_id': 1003111, 'author_profile': 'https://Stackoverflow.com/users/1003111', 'pm_score': 0, 'selected': False, 'text': "<p>I have worked on cairngorm and mate frameworks. I started with cairngorm framework. It is good to work but difficult to understand in the beginning. It handles event dispatching cleverly. You can dispatch events from classes itself and it will be taken care of by the framework wired command classes. There is single repository for storing the data, so easy to handle the data. It is a singleton class. Once you get a hold of the framework, work is easier. \nMate on other hand is tag based framework. It is an event driven framework, so all events are handled in the eventmap file. It does event listening, property injection, and many other things from this class itself. You can dispatch events from the classes by passing it the instance of framework event dispatcher. You don't have to use singleton class like cairngorm in this. You can bind property in a class to views using directly using property injection so no need to use any singleton class. In mate all the classes and view are free from framework code, so it is decoupled framework. It is easy to move components from one place to other. </p>\n"}]
['https://Stackoverflow.com/questions/37043', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2885/']