Mate Flex Framework Alpha in Spotlight
Mate (pronounced “mah-the” like latte) is gaining a lot of attention among the Flex community. Mate is a tag-based Flex framework created by AsFusion. Although it has been used internally at AsFusion for a long time, the Alpha version was just released recently.
Mate is a Flex framework that leverages the tag-based MXML language to provide a map defining how the Flex application handles events. It solves many common problems faced by developers when creating Flex applications, such as retrieving data from external services and handling business logic.
As John C. Bland II of GeekLife describes:
The majority of the frameworks out there add a bunch of extra junk you don't need or won't always use. Sometimes they have weird configurations and approaches. Most times the only thing they provide is a common code-base so a new developer can jump in and be productive because he or she already knows the chosen framework.
Bland particularly likes Mate’s event handler. He says:
Mate is a gem in this area. Simply let your events bubble, and setup EventHandlers. These handlers can perform any number of tasks, including calling a service, setting a value on a class, calling a method on a class, or dispatching another event. The joy is being able to dispatch an event 20 levels into your UI without setting a globally available property/calling a globally available method, such as ModelLocator. You can have another view/ component receive an update regardless of the location in your application. It is really nice.
While Zee Yang, a J2EE developer agrees with this positive assessment, he looks at Mate from a different angle. Yang explains:
The bottom line is none of the frameworks is doing enough to leverage the declarative nature of MXML. This makes sense, because the majority of the Flex developer base came from either the J2EE camp or the Flash/AS3 camp. For example, I come from a J2EE developer background. As my Flex skills progress, I am developing an appreciation for the beauty of MXML. At the same time, I am becoming dissatisfied with the verbose AS3-based frameworks. I like Mate, because it is a very forgiving MVC framework that makes good use of MXML.
Writing in Iconara, Theo Hultberg agrees that the MXML approach is beneficial to Flex developers. He comments, “Mate is very unintrusive. It lets you configure your application declaratively in MXML and does most of the boring things for you. Judging from the documentation and examples, it should be a good competitor in the less-than-crowded market of Flex application frameworks.”
Summarizing the core feature of Mate, Hultberg observes:
The core of Mate is the event map, which describes what should happen when your application dispatches events of different types. For each event, one or more handlers can be invoked. A handler can be anything from calling a method on an object, running a command or invoking a remote object call. There is also room for writing your own specialized handlers. Handlers can run in sequence by picking up from the previous handler's result, which makes it possible to create quite complex logic. All this is done in MXML, which means that your configuration is also the actual wiring of your application. More important, it's readable and easy to understand.
As Mate continues to enjoy the developer spotlight, InfoQ will keep pace of the discussion.
Ben Linders Aug 27, 2014
Gilad Bracha Aug 27, 2014