Tuesday, July 28, 2009

Migrating to the Mate Framework

When BigBlueButton started, we used the Cairngorm framework. Then we switched to PureMVC. Now, we're switching to Mate.

While switching to different frameworks takes time and energy, you gain not only by using a better framework, but because the switch forces you to refactor code you've developed since the last time you did it.

Mate is a declarative programming framework for Flex. It lets you write business code the same way you write your Flex UI - using mxml tags. Of course, mxml code simply gets compiled to ActionScript. Mate abstracts this AS code for you, and lets you write clean, simple, minimalistic code.

And because Mate is centered around Events, the code you write is decoupled as there are no direct object-to-object calls, except when you want them

While Mate sounds great, it still has limitations. The framework provides components for most common tasks, such as calling HTTP Services, SQL queries, RemoteObjects, etc... However, when we started using Mate we noticed a lack of component for handling calls to Remote SharedObjects.

Luckily Mate is extensible, so we created our own SharedObjectInvoker. You can read about it and get the source here