Frontend Models

Frontend models contain the data that SuiteCommerce Advanced (SCA) uses. Frontend models are part of the Backbone.js framework that defines the data component within the MVC paradigm. Each frontend model is an extension of Backbone.Model which is defined in BackboneExtras. Backbone.Model defines inheritable methods that are available to all models defined in SCA. If necessary, a model can override these core methods. For example, many modules override the initialize method to set values of properties that are specific to that model.

Note:

If you are customizing SCA 2020.1 and later, do not use Backbone.Model as described in the following sections and examples. For release 2020.1 and later, you should use SCModel as described in the extensibility API reference. SCModel is the SuiteCommerce implementation of Backbone.Model and it inherits all methods and properties of Backbone.Model

Most feature modules define models that hold the data they require. Models in SCA are defined in the following ways:

When a router or view initializes a model, it may pass properties that the model requires. These can be properties that the frontend model uses internally or properties that are passed to the backend model.

In general, frontend models contain code that performs the following tasks:

All frontend modules define the following properties:

Related Topics

SCA Models, Collections, and Services
Collections
Services and Backend Models
Services and Backend Models in Custom Modules

General Notices