Flex Certification » Flex Frameworks » The PureMVC framework
The PureMVC framework
The PureMVC framework
Although it is used for Flex, PureMVC was not actually designed as a Flex framework. The creator of PureMVC wanted the framework to be language agnostic. In fact, if you visit the site, you will see that there are implementations and code examples for a variety of languages.
PureMVC centers on the Model-View-Controller (MVC) pattern, with the stated goal of separating a project into model, view, and controller tiers. These tiers are represented by three singleton classes—Model, View, and Controller—with a fourth singleton called the Façade that is designed to facilitate communication among the tiers and act as a central repository for accessing their public methods.
Much like Cairngorm, creating a project using PureMVC involves dividing your project into several packages, then implementing your classes by extending the framework classes. PureMVC has the addition of the Façade class, which acts as the main entry point for the application.
Strengths
Like Cairngorm, PureMVC is a well-established framework and has a large and active community supporting it. It is also well suited to team development, because it provides a well-defined structure for how applications need to be created, standardizing coding across developers.
Weaknesses
Because it relies on singletons, PureMVC is prone to many of the same criticisms leveled at Cairngorm. It is not specifically a Flex framework, so it does not take advantage of the features of MXML. Like Cairngorm, PureMVC has its own method of handling events, and it can make working with the standard Flex event model more difficult. PureMVC is a fairly complex framework and has a relatively steep initial learning curve. Unless your team is familiar with it, training new employees can increase production time.
Finally, like Cairngorm, the PureMVC framework requires the creation of many classes, which can increase production time and project size.
Resources
- Documentation and licensing
- Example project
- Podcast interview with PureMVC framework creator Cliff Hall
Filed under: Flex Frameworks








