An application 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.
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 key components of an App Extension include:
A
app.js
scriptDefines new page and API endpoints
Specifies extensions on which dependencies exist
Specifies whether an extension should be loaded
A Pages directory - The page controllers will be resolved from this directory.
An API directory - The API controllers will be resolved from this directory.
A themes directory - This directory serves a similar function to the App themes directory and the Caramel framework will attempt to resolve resources in this directory under each theme name.
An App Extension looks similar to an Asset Extension; however, they differ in the following ways:
The
app.js
script is a mandatory file unlike theasset.js
file.- The Asset Extension allows partials to be altered without specifying a controller; whereas, in an App Extension a controller must be present for the Caramel framework to attempt to resolve resources in the themes directory.
Related Links
Child pages (Children Display)