Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

An application app extension unlike an asset extension only allows a developer to either develop new endpoints (pages or APIs) or override existing endpoints. This is useful whenever a common page that is accessible by all asset types needs to be developed. As an example, the ES Store application provides a top-assets view that displays the top assets for each of the asset types. In the app extension model, store_common and store_apis are the default implementation of an app extension.

 

App extension components

An application may have one or more extensions as shown in the diagram above. However, it is advised to group all customizations into a single extension to improve maintainability. The next diagram presents a closer look at an extension. The following diagram illustrates the structure of an app extension:

The key components of an App Extension app extension include: 

  • A app.js script

    • Defines new page and API endpoints.

    • Specifies extensions on which dependencies exist.

    • Specifies whether an extension should be loaded.

    • For more information, see app.js Script.

  • A Pages pages directory - The page controllers will be resolved are picked up from this directory.

  • An API apis directory - The API controllers will be resolved are picked up from this directory.

  • A themes directory - This directory serves a similar function to the App app themes directory, and the Caramel ES rendering framework will attempt attempts to resolve pick up resources in this directory under each theme name.

An App Extension app extension looks similar to an Asset Extensionasset extension; however, they differ in the following ways: 

  • The app.js script is a mandatory file unlike the asset.js file.

  • The Asset Extension asset extension allows partials to be altered without specifying a controller; whereas, in an App Extension app extension a controller must be present for the Caramel ES rendering framework to attempt to resolve pick up resources in the themes directory.

Child pages (Children Display)