Protected Optional_datathe data object
Protected Readonly_namethe proxy name
ProtectedfacadeReturn the Singleton Facade instance
StaticNAMEThe default name for the Proxy.
Get the data object
The current data or undefined if no data is set.
Set the data object
The data to set. Can be null.
Get the proxy name
The name of the proxy.
Create and send an Notification.
Keeps us from having to construct new Notification instances in our implementation code.
The name of the notification to be sent.
Optionalbody: anyOptional data to be included with the notification.
Optionaltype: stringOptional type of the notification.
A base
Proxyimplementation.In PureMVC,
Proxyclasses are used to manage parts of the application's data model.A
Proxymight simply manage a reference to a local data object, in which case interacting with it might involve setting and getting of its data in synchronous fashion.Proxyclasses are also used to encapsulate the application's interaction with remote services to save or retrieve data, in which case, we adopt an asynchronous idiom; setting data (or calling a method) on theProxyand listening for aNotificationto be sent when theProxyhas retrieved the data from the service.See
Model
Proxy