Mate, a tag-based, event-driven framework for Flex applications
I discovered Mate a little over a week ago and I am already using it in a live project. The Mate website describes it as ..
Mate is a tag-based, event-driven Flex framework.
Flex applications are event-driven. Mate framework has been created to make it easy to handle the events your Flex application creates. Mate allows you to define who is handling those events, whether data needs to be retrieved from the server, or other events need to be triggered.
Over the last 2 years, that I’ve been building applications with Flex, I’ve explored various application frameworks from time to time, but somehow I was never able to commit to any one of them for various reasons, some of the prominent ones being .. too much boiler plate code to do simple things, too much enforced structure to my code causing unnecessary clunk and clutter etc. etc.
Over time I realized I had somewhat developed my own framework that used standard design patterns and a structure that I had become comfortable with. This approach mostly works and I’m sure many other developers do the same, but this approach has a scalability problem when working in teams. Luckily for me though all my flex projects till now have involved 1 to 3 developers, so this has never been a problem for me.
Finally a framework I like
Then, I found Mate and I was impressed at the very first look, its declarative, yes MXML .. on digging further here are some of the features I liked ..
- Its declarative – Mate uses MXML for the most part and hence the code is very clean, readable and very easy to understand even for people who are new to Flex programming
- Highly decoupled – Mate uses two design patterns .. implicit invocation and dependency injection that enforce very high decoupling between various parts of your application. All the communication happens via an application wide event bus and all dependencies are injected via an EventMap.mxml file that maps dependencies between different parts of your code.
- Unobtrusive – Mate is also very unobtrusive of your code, which means that it does not enforce any unnecessary structure to your code, you don’t have to implement framework interfaces all over your code and the boiler plate code needed to do simple things is minimized.
- Easy and quick to learn – this is the best part, the framework is very easy to grasp and the guys at asfusion have put in a lot of effort to provide detailed documentation.
Many of the above features are somewhat lacking in the other application framework options available out there. So, if you build Flex applications and you’re into MVC then I would strongly recommend checking out Mate framework for Flex applications.





July 7th, 2008
mrinal,
what about easyMVC for flex.
did you evaluated this framework,would like to know your thoughts on this.
July 8th, 2008
gee… everybody seems to have their beloved frameworks..
check this one…. ‘gaia’ its a flash framework
http://www.horwith.com/index.cfm/2008/7/1/gaia-a-great-lightweight-flash-framework
will definitely check mate… thnx fr the info.
July 9th, 2008
Hi Mrinal,
Thanks for the review!
I am glad you like Mate and let us know if you have any feedback or suggestion.
Cheers!
July 9th, 2008
@saurabh,
I just checked out easyMVC .. looks nice, a lot like my own implementation of standard design patters. Given the nature of patterns used by Mate I do find it more decoupled than the other frameworks I’ve seen.
I think the choice of which framework to use is definitely a preference thing, no one framework can be deemed better than the other.. just find one that you and your team like and stick with it. One mistake that I’ve seen teams make is blindly use a framework without any thought on the needs of the application they are building .. that is not a good thing to do. Don’t skip designing the architecture of your application just because you’re using a framework.
July 9th, 2008
@Varun,
Gaia is nice but it seems more like an alternative for the Flex framework itself.
July 9th, 2008
Hi Laura,
Good job building and documenting Mate … I’m really liking it
Mrinal
July 9th, 2008
true mrinal!!!
i do find people confused when people just want to go ahead with implementing an app. using an architecture in the name of best practices.Its very important to actually evaluate and analyze the pros and cons associated with all the frameworks around n then embark on design/architecture of the application.
July 9th, 2008
Hey Mrinal,
Nice to hear that you liked a framework!You are always against Frameworks.There must be really something good in it
July 10th, 2008
I learned of Matte right after deciding on PureMVC over Caringorm. It looks interesting, but I don’t even want to deal with second guessing my decision
One thing though, how does Matte accomplish allowing a view to be notified about events that it might be interested in? And how does it get around the curious display list traversal Flex event model?
I like PureMVC and think it is well thought out and comes naturally to a person with a Java EE and Swing background. It’s a bit heavy initially, but I know it will pay off.
July 11th, 2008
Hi Andrew,
I thought I should answer your question. If you want a view to be notified of any event you can use the Listener tag. You can read the docs for that tag here: http://mate.asfusion.com/page/documentation/tags/listener
You just need to make sure the event that you dispatch bubbles up.
I hope that you give Mate a try someday
July 18th, 2008
Hi Mrinal,
nice review. It seems that Mate is the framework that I should use in my project : most of the team members comes from CF programming with only few knowledge of OOP. I will give it a try quickly and do my own review later.
July 22nd, 2008
Hey Mrinal,
Just to clarify, Gaia is not meant to be an alternative to Flex. Flex is primarily for building applications, whereas Gaia is primarily for building traditional Flash sites, microsites, things of that ilk. I see them as two different Flash frameworks that provide two different solutions for two different goals. And thanks to Varun for the props!
-Steven
July 22nd, 2008
Hi Steven,
Thanks for the clarification, I haven’t really checked out Gaia .. will do when I find some time.
Cheers,
Mrinal