As time goes by and I work more with the PureMVC framework, the more I like Mate for Flex development. As I’ve mentioned in previous posts, I find true value in frameworks that do three things:

  1. Provide design patterns that can be standardized by a team without enforcing a rigid standard.
  2. Provide flexibility on how to implement design patterns.
  3. Make development faster for experienced, and new, team members.

Obviously, PureMVC easily fulfills goal numero uno, but it does not fulfill goal numero dos or tres. I actually feel better about this decision now that I’m nearing completion of a full application written in PureMVC. I’m comfortable with the architecture, and can easily explain it to others and know all the basic mechanisms. I still don’t like it.

I’ll itemize my areas of concern:

  • It doesn’t use the event model provided by Flex. Sure, I understand the concept behind using Notifications instead, but we’re developing in Flex, we’ll be deploying in Flex, and continue to do so for the foreseeable future. Completely unnecessary overhead for our team.
  • The Application Facade. Again, for us, a bloated and unnecessary feature, especially when we need to implement PureMVC Proxies for our data model.
  • I prefer an Observer pattern over a Mediator pattern simply so I can avoid the common result of the Mediator pattern, a 1200-line long file.

When it comes down to brass tacks, Cairgorm, PureMVC and Mate provide the EXACT SAME capabilities, but they differ in how they expose the features and how flexible you can implement them. Cairngorm cannot do anything that Mate cannot. PureMVC cannot do anything that Cairngorm cannot, etc.

Given the choice between three things that perform the same function (in much the same way I buy a car – they all get me from A to B) I will choose the one with the lowest cost of ownership. This is where I know I differ from many people in my opinion about a Flex architecture. Many folks I talk to have a “rules will set you free” mentality – meaning that if you have a rigid implementation strategy, then there’s no thinking involved.

I agree.

However the strategy should be developed by the team so that it fits the goals of the organization and/or product rather than forcing one upon everyone.

So who can tell me why I’m wrong?