Facade class

A base Multiton IFacade implementation.

The Facade Pattern suggests providing a single class to act as a central point of communication for a subsystem.

In PureMVC, the IFacade acts as an interface between the core MVC actors IModel, IView, IController, and the rest of your application, which (aside from view components and data objects) is mostly expressed with ICommands, IMediators, and IProxys.

This means you don't need to communicate with the IModel, IView, IController instances directly, you can just go through the IFacade. And conveniently, ICommands, IMediators, and IProxys all have a built-in reference to their IFacade after initialization, so they're all plugged in and ready to communicate with each other.

See Model, View, Controller, INotification, ICommand, IMediator, IProxy

Implemented types

Constructors

Facade(String key)
Constructor. [...]

Properties

controller IController
read / write, override
hashCode int
The hash code for this object. [...]
read-only, inherited
model IModel
read / write, override
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
view IView
read / write, override

Methods

executeCommand(String name, [dynamic body = null, String type = null]) → void
override
hasCommand(String noteName) bool
Check if an ICommand is registered for a given INotification name with the IController. [...]
override
hasMediator(String mediatorName) bool
Check if a Mediator is registered or not [...]
override
hasProxy(String proxyName) bool
Check if an IProxy is registered with the IModel. [...]
override
initializeController() → void
Initialize the IController. [...]
initializeFacade() → void
Initialize the Multiton Facade instance. [...]
initializeModel() → void
Initialize the IModel. [...]
initializeNotifier(String key) → void
Initialize this INotifier. [...]
override
initializeView() → void
Initialize the IView. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
notifyObservers(INotification note) → void
Notify IObservers. [...]
override
registerCommand(String noteName, Function commandFactory) → void
Register an INotification to ICommand mapping with the Controller. [...]
override
registerMediator(IMediator mediator) → void
Register an IMediator instance with the IView. [...]
override
registerObserver(String noteName, IObserver observer) → void
Register an IObserver to be notified of INotifications with a given name. [...]
override
registerProxy(IProxy proxy) → dynamic
Register an IProxy instance with the IModel. [...]
override
removeCommand(String noteName) → void
Remove a previously registered INotification to ICommand mapping from the IController. [...]
override
removeMediator(String mediatorName) IMediator
Remove an IMediator from the IView. [...]
override
removeObserver(String noteName, Object notifyContext) → void
Remove an IObserver from the list for a given INotification name. [...]
override
removeProxy(String proxyName) IProxy
Remove an IProxy instance from the IModel. [...]
override
retrieveMediator(String mediatorName) IMediator
Retrieve an IMediator from the IView. [...]
override
retrieveProxy(String proxyName) IProxy
Retrieve an IProxy instance from the IModel. [...]
override
sendNotification(String noteName, [dynamic body, String type]) → void
Send an INotification. [...]
override
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited

Static Properties

instanceMap Map<String, IFacade>
read / write

Static Methods

getInstance(String key) IFacade
IFacade Multiton Factory method [...]
hasCore(String key) bool
Check if a Core is registered or not. [...]
removeCore(String key) → void
Remove a Core. [...]