PureMVC

From Wikipedia, the free encyclopedia

PureMVC
Image:PureMVC-Icon.jpg
Developed by Futurescale, Inc.
Latest release 2.0.3 / March 17th, 2008
OS Cross-platform
Genre Framework
License CC +Attribution
Website puremvc.org

PureMVC is a lightweight framework for creating applications based upon the classic Model, View and Controller concept. Based upon proven design patterns, this free, open source framework which was originally implemented in the ActionScript 3 language for use with Adobe Flex, Flash and AIR, has now been ported to nearly all major development platforms.

Contents

[edit] Implementation

[edit] Standard Version

The Model, View and Controller application tiers are represented by three Singletons (a class where only one instance may be created).

The MVC Singletons maintain named caches of Proxies, Mediators and Commands, respectively. The Façade, also a Singleton, provides a single interface for communications throughout the application. These four Singletons are referred to as the Core Actors.

  • Data objects, be they local or remote, are managed by Proxies.
  • The View Components that make up the User Interface are managed by Mediators.
  • Commands may interact with Proxies, Mediators, as well as trigger or execute other Commands.

All actors discover and communicate with each other via the Façade, rather than work directly with Model, View and Controller.

PureMVC also introduces a Publish/subscribe-style Observer notification scheme. This allows asynchronous, event-driven communications between the actors of the system, and also promotes a loose coupling between those actors, since the subscriber never needs to have direct knowledge of the publisher.

The Standard Version Reference Implementation is written in ActionScript 3.

[edit] MultiCore Version

This variation supports modular programming, allowing the use of independent program modules each with their own independent PureMVC 'Core'. A Core is a set of the four main actors used in the Standard framework (Model, View, Controller and Facade) This version of the framework uses Multitons instead of Singletons. Rather than storing a single instance of the class, a Multiton stores a map of instances. Each Core is referenced by an associated Multiton Key.

The MultiCore Version of the framework was developed due to the widespread need for modular support in a world of ever-more ambitious Rich Internet Applications which must load and unload large pieces of functionality at runtime. For instance a PDA application might need to dynamically load and unload modules for managing task list, calendar, email, contacts, and files.

The MultiCore Version Reference Implementation is written in ActionScript 3.

[edit] Ports

There are several active PureMVC Ports; implementations for various programming languages, each contributed and supported by PureMVC community members. Each Port, in turn supports one or more target development platforms, which cover most major mobile, browser, desktop and server environments.

[edit] AS2

The ActionScript 2 Port is modeled after the Standard Version 
It supports development for Flex 1.5, Flash 8, FlashLite
* PureMVC AS2 Port Home

[edit] AS3

Both AS3 Ports support development for Flex 2, 3, Flash 9/CS3, AIR.
* PureMVC AS3 Standard Port Home - Original reference implementation
* PureMVC AS3 MultiCore Port Home - Modular programming via Flex Modules or SWFs

[edit] C#

The C# Port is modeled after the Standard Version 
It supports development for .NET 1.0/2.0 Silverlight, Windows Mobile and Pocket PC
* PureMVC C# Port Home

[edit] ColdFusion

The ColdFusion Port is modeled after the Standard Version 
It supports development for ColdFusion 8
* PureMVC ColdFusion Port Home

[edit] haXe

The haXe Port is modeled after the Standard Version 
It supports development for JavaScript, Flash 8, Flash 9 and the Neko VM
* PureMVC haXe Port Home

[edit] Java

The Java Port is modeled after the Standard Version 
It supports Java Mobile, Standard and Enterprise Editions (ME, SE, EE), 
JavaFX, Servlets, Applets
* PureMVC Java Port Home

[edit] PHP

The PHP Port is modeled after the Standard Version 
It supports development for PHP 5 and 6 
* PureMVC PHP Port Home

[edit] Python

The Python Port supports is modeled after the Standard Version 
It supports development in Python 2.5 for  wxPython and Google App Engine
* PureMVC Python Port Home