PureMVC is for zealots
Posted by Steve Brownlee on February 27, 2009Feb 27
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:
- Provide design patterns that can be standardized by a team without enforcing a rigid standard.
- Provide flexibility on how to implement design patterns.
- 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?


Have you looked into Swiz?
Yes, Nathan, I have looked into Swiz and a teammate of mine has actually implemented a rudimentary application with it. So far we’ve liked it, but the architecture, we feel, isn’t mature enough to consider for all of our apps.
Framework dependency can almost always become a huge problem over time… The less dependency my app has the happier I am with it… And out of Cairngorm, PureMVC and Mate… I guess Mate seems to be the most flexible at this stage…
I don’t like how PureMVC is being ported to other laguages… To me it is a clear indication that the PureMVC project will never take advantage of platform specific features… I really don’t get why we need another event model when AS3 events are soooo flexible as it is…?
[...] Mate will change things. I’ve read some great reviews from Tony Hillerson, Rapture in Venice, FusionCube, Explorers Club and Richard Lord from Flash On The Beach. There’s some buzz going arround [...]