The PureMVC framework
The PureMVC Framework Code at the Speed of Thought
in...
Stable and feature-frozen since 2008
While the "release early, release often" development philosophy can help a team learn what their product should do, if that product is a framework, adopters often tire of trying to hit a moving target. With PureMVC, we nailed down the scope early on, fixed the bugs, and let it be.
MVC is simple, there's no reason to keep changing it
Many so-called Model-View-Controller frameworks today seem to include everything but the kitchen sink. We decided that basic separation of responsibilities according to the MVC meta-pattern could be expressed with a handful of actors. We gave them a built-in means to communicate with each other which reinforces the classic MVC collaboration patterns, and did so with the simplest possible language features. That's why it's been ported to so many languages from the original ActionScript. It just works, with no "magic happens here" bits.
The Model is both a class and a region of the application.
It manages Proxies, which deal with different parts of the application's data.
Proxies can notify the View and Controller.
The View is both a class and a region of the application.
It manages Mediators, which handle events from, and pass data to View Components.
Mediators can update the Model and notify the Controller.
The Controller is both a class and a region of the application.
It manages Commands, which house the application's business logic.
Commands can notify the View and update the Model.
The Facade connects the Model, View, and Controller
Available to all Proxies, Commands, and Mediators, it exposes the Model, View, and Controller methods all in one place, obviating the need to work with those classes directly.
It also provides the means for sending notifications according to a simple publish/subscribe scheme.
Multicore enables modular programming
While the basic MVC paradigm implemented in the PureMVC Standard Framework is adequate for many applications, the Multicore version (available in most supported languages) allows self-contained subsystems, each with its own Facade, Model, View, Controller, and attendant actors. This is really useful when many teams are contributing to the application. Scalability: Infinite.
Conceptual Diagram
Literally,the 50,000 foot view of PureMVC. Created by the architect on a cross-country plane ride while returning home from a client, this diagram not only gives you a visual representation of the actors and their roles, responsibilities, and collaboration patterns, but it would also look nice as a lower-back tattoo.
-
PureMVC Conceptual Diagram
Cliff HallRead PDF
Framework Overview
This document goes into a bit more detail, using UML to show the class relationships and interface methods.
-
PureMVC Framework Overview
Cliff HallRead PDF
Implementation Idioms and Best Practices
An in-depth document written by the architect, describing the best practices for use of PureMVC in your applications. While the examples are in ActionScript 3 and Flex, the narrative focuses on delivering a platform-neutral view of the framework. Translated by the community into five languages beyond the original English.
The O'Reilly Book
The Developer's Guide offers advanced techniques and knowledge gleaned from years of community discussion since the IIBP was written. Takes a different approach from the simple demos in the GitHub repositories and the unconnected code fragments in IIBP. Pieces of a non-trivial application are built as each section visits various concerns within its architecture. Examples are in ActionScript 3 and Flex, but the narrative focuses on delivering a platform-neutral view of the framework.
-
Actionscript Developer's Guide to PureMVC
Cliff HallBuy Book
Join and learn from the community
In the years since PureMVC was released, the vibrant community that sprang up around it has ported it, written demos and utilities for it, built impressive real-world applications with it, and discussed nearly every architectural issue you might run into. Learn from their examples, and connect with other developers and companies who use PureMVC.
PureMVC is available under the BSD 3-Clause Open Source License.