THIS IS NOT AN OFFICIAL PORT OF PUREMVC, WHICH IS CURRENTLY PENDING COPYRIGHT APPROVAL.
This repository may be removed if not approved officially, since PureMVC is currently planning its own official port.
Basically, it relies on well known and proven design patterns, which allows
communication between the different tiers (
components, and hides the complexity from the developer.
Here's a quick overview:
A Singleton that caches named references to Proxies.
- Proxies Helps to expose an API for manipulating the Data Model.
A Singleton that caches named references to Mediators.
- Mediators Create, adapt or reuse existing user interface components.
A Singleton that maintains named mappings to Commands.
Contains business-logic and orchestrate complex or system-wide activities.
May retrieve and interact with
Proxies, communicate with
Mediatorsor execute other
Commands. May be a
SimpleCommand(triggered by a
MacroCommand), or a
- Commands Contains business-logic and orchestrate complex or system-wide activities. May retrieve and interact with
A Singleton that initializes and caches the Core actors (
Controller), and provides a single place to access all of their public methods.
Commands communicate with each other through
Notifications. Even on platforms with native Event implementations (like
Notifications are important to:
- Ensure that the framework works without relying on an specific language;
- Provide a standard way of communication, leaving native Events to listen and
trigger native interactions (like the
mouseoverevents in JS).
In PureMVC's context:
Proxiesbroadcast, but do not listen for
Mediatorsbroadcast AND listen for
Commandsbroadcast AND are triggered by
Observer pattern is responsible for carrying a reference to an object
which wishes to be notified, and the method that should be called when when a
Notification is broadcast. The
View maps the
Notification names to
Observers, and notify them when a
Notification is broadcast.
Most of the PureMVC implementation is internal to the framework, so you don't need to worry about dealing with all patterns. Regarding PureMVC's framework, you will only be working with:
- Proxies Handling AJAX requests and Data Objects.
Initializing plugins, listing and handling
Widget, by registering
Proxies, and creating
ViewComponents- more on those later.
Setups a page, initializing
Widgetsby calling their
Starts the application, calling the correct
MacroCommand. Is referenced by
Notificationsand register/remove them.
Read more about the PureMVC: