Proxy

Proxy

new Proxy()

A base Proxy implementation.

In PureMVC, `Proxy` classes are used to manage parts of the application's data model.

A `Proxy` might 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.

`Proxy` classes 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 the `Proxy` and listening for a `Notification` to be sent when the `Proxy` has retrieved the data from the service.

Source:
See:
  • Model Model

Members

(static) NAME

Source:

(protected) _data :Object

Source:
Type:
  • Object

(protected) _proxyName :string

Source:
Type:
  • string

data

Get the data object

Source:

data

Set the data object

Source:

proxyName

Get the proxy name

Source:

Methods

onRegister()

Called by the Model when the Proxy is registered

Source:

onRemove()

Called by the Model when the Proxy is removed

Source:

Proxy

new Proxy(proxyName, dataopt)

Constructor

Source:
Parameters:
Name Type Attributes Default Description
proxyName string
data Object <optional>
null

Members

(static) NAME

Source:

(protected) _data :Object

Source:
Type:
  • Object

(protected) _proxyName :string

Source:
Type:
  • string

data

Get the data object

Source:

data

Set the data object

Source:

proxyName

Get the proxy name

Source:

Methods

onRegister()

Called by the Model when the Proxy is registered

Source:

onRemove()

Called by the Model when the Proxy is removed

Source: