As promised, I am penning down my experince till now with MATE framework.
To begin with its an awesome framework. It really is, I mean it. The documentation of the framework is as good as the framework itself.The most and vital thing about MATE is, it completely separates the VIEW from CONTROLLER.Loosely coupled means loosely coupled :). Everything starts with an event.
Personally till now while creating my own frameworks or while working with a custom framework of any company I have always seen this as the first lines in the VIEW
This is just to initialise the controller. Then CONTROLLER takes charge of everything and controlls the VIEW.But the problem with this is my view and controller are tightly coupled. I have to write the same initialisation code on all my views just to initialise its controller !!
Well on MATE, its the EVENT ecosystem. Upon VIEW creation on Flex, Flex has a sweet ‘creationComplete’ event dispatched. Now, we can directly bind this event to any eventhadler or make a custom event at this point and dispatch it. Now MATE’s event Map can bind this event to any event handler on any class. So what I will get is VIEW dispatches one event and MATE gives this event to my CONTROLLER and CONTROLLER then handles the situation. VIEW does not know really from where it is being controlled :) sweet as very sweet.
How MATE works? Its a three step process.
1. Create a view (dispatch EVENT for every thing you need to controll)
2. Create an EventMap (maps each EVENT to an EVENTHANDLER)
3. Create a controller (Which handles the EVENT)
Thats it?!! YEAH, thats it. Cool, is not it?