The Canvas Core Layer, could be further broken down into the component registries and Component Managers. The following sections provide an extensive view of all such registries and managers and their significance in leading up to an omni-channel framework.
...
Component Registries
Component registries form the heart and soul of the Canvas core layer. These are nothing but global JavaScript name spaces, that internally maintain the component – meta data mapping and keep them ready for the managers to consume. The details of various component registries are as follows:
...
...
CLCR – Core Layer Component Registry
What is this registry:
This is the registry in which all the Library components are registered against the configuration specific meta data.
Who uses this:
Library Framework developers.
Registry Capability: This registry is capable of storing component definitions against a key value pair of meta data configuration.
Library developers responsibilities: Library developers are expected to register their component definitions against their component meta data.
Syntax:
Code Block | ||
---|---|---|
| ||
CLCR.registerCmp({'KEY':'VALUE'},<<Your Namespace>>); |
...
CMHR – Context Menu Handler Registry.
What is this registry: This is a custom handler registry that is used by application developers to write their functionality.
Who uses this: Business functionality developers.
Registry Capability:This registry is capable of storing functions against menu IDs for menus configured against Views in VIEW_CONTEXT_MENU_DEFINITION.
Library developers responsibilities: Developers who are creating context Menu Supported View types have to raise this event and pass the JSON of the corresponding node to the business developers.
Syntax:
Code Block | ||
---|---|---|
| ||
CMHR.registerHandler("MENU_ID", function (config){ |
...
//config.record.data gives data of the clicked node in grid |
...
} |
CWEH – Canvas Widget Event Handler Registry.
What is this registry: This is the App/Widget registry that is responsible for triggering all the action events defined for any view.
Who uses this: Business functionality developers.
Registry Capability:This registry is capable of storing functions against Widget IDs for all those widgets that require action listeners, e.g. Cell Double-Click or Cell Single Click.
Library developers responsibilities: Developers have to know the supported list of events their view has to support from Canvas Components Developers Guide and have to fire the corresponding supported events. Additionally, developers have to update the traceability document on the events.
Syntax:
Code Block | ||
---|---|---|
| ||
CWEH.registerHandler("APP_ID",CWEC.<<EventId>>,function(){ |
...
// Business functionality here |
...
}); |
...
CWMH – Canvas Workspace Menu Handler Registry
What is this registry: This is the registry that stores workspace menu handlers for all the configured menu Items in WORKSPACE_MENU_DEFINITION table.
Who uses this: Business functionality developers.
Registry Capability:This registry is capable of storing functions against Menu IDs for all those Workspace Menus that require action listeners,e.g. Load, Click, Drill-down.
Library developers responsibilities: Developers have to support events, such as Load, Click, Drill-Down on applicable menu items. The information about this can be found in the Canvas Components Developers Guide.
Syntax:
IWMH
Code Block | ||
---|---|---|
| ||
CWMH.registerHandler("MENU_ID", |
...
CWMC.<<Event Id>>, function (){ |
...
// Business functionality here |
...
} |
...
|
Component Managers
Component Managers are those entities that control the flow of the application. These entities consume the components registered in the component registry and instantiate those with appropriate meta data information. These also act as a bridge between the application developers and the underlying technology. They provide a standard set of utility APIs that can be used for various useful JavaScript operations. The details of various component managers are as follows:
- Workspace Manager: As the name indicates, the workspace manager handles the various workspace related operations. It instantiates the application container and also offers certain APIs like workspace selection handler that takes care of downloading the application related JavaScript files, which have been configured for a workspace.
...
- Dynamic Widget Manager: This is more of a utility class that lets the business app developers instantiate and render apps inline to the layout or as a pop up window. The dynamic widget manager takes care of fetching the widget meta data from the data source and instantiates the registered library class passing this meta data for rendition.
...
Canvas library rendering mechanism
The following picture depicts the rendering mechanism behind a Canvas technology application and how the requirements of various device bands are satisfied successfully.