What is Mate?

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.

In addition, Mate provides a mechanism for dependency injection to make it easy for the different parts of your application to get the data and objects they need.


Presenting online at FlexMania

Everybody is invited to FlexMania. Tomorrow, July 7th, I'll be presenting about Mate (in English). It will probably be a shorter version of the presentation I gave at 360|Flex, about scaling Mate applications, so if you missed it, you can see it now.

Presenting at the San Diego Flash User Group

Tomorrow we'll be driving down to San Diego to present at their Flash user group.

Hope to see you there!

A new article about Mate has been published on the Edge newsletter

Brian Rinaldi wrote a great introductory article. He created an example to show how you can build an application with Mate. The code is available for download and you can read the whole article here.

New AIR Example

Tim Hoff created a new Mate example. This example is not as simple as the examples that we have in our site. It shows different features such as: SQLite database, Presentation Models, localization, Degrafa and a bunch of other things. I think that he did a great job showing how you can build a bigger application with AIR using Mate.

The project is open source and the code is available from SVN from the mate examples website.

You can read more in his blog and also view the screencast that he created.

What's new in 08.8

One of the requested features was to implement a way to do bindings without creating a strong reference. The PropertyInjector tag establishes a binding between the source and the target. Internally, it uses the BindingUtils to create the binding. The problem with this approach is that BindingUtils always creates a strong reference - at least in Flex 3 (Flex 4 has some improvements for that).

To fix that, we added a new attribute called "softBinding" to the PropertyInjector tag that will create a binding using weak references. This feature is very handy if you are using modules because your module will be garbage collected when you unload it.

What else is new?

The ability to use an ISmartObject as the value for a service method call. In other words, now you can use a value coming from an event or any ISmartObject to define the method that a RemoteObjectInvoker or WebserviceInvoker will use. Also, I added a patch to MessangeHandlers that avoids calling the subscribe method in the consumer twice (thanks to Dirk Stevens for the patch).

Ok that is all for 08.8. I didn't do a post about what was new for 08.7, so here it is . The major feature was Injection by interfaces, what that means is that you can add an interface as a target of the Injector tag and if that matches the current object, the object will get injected. Also, if you add a super class as a target and the current object extends that class, the injection will also run. But there is something that you should be aware of: to make it work, you need to set "includeDerivatives" to true. By default, this attribute is false because injecting by super classes and injecting by interfaces is more expensive than the normal injection. So if you don't need it, I would suggest that you don't change that attribute.

The other main thing in 08.7 is the addition of the new tag called CacheSetter. I will not cover all the details of that. There is a thread in the forums that you can read