Registries and Managers
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:
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:
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:
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:
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.
- Layout Manager: A layout manager instantiates the layout container and also helps performing certain standard operations during layout switching and other sub workspace related activities.
- App Manager: The app manager requests the server for the app meta data, forms the portlet of every app or widget, and instantiates the corresponding view according to the view meta data.
- Multi App Manager: The Multi app manager requests the server for the appropriate multi app meta data and instantiates the registered multi app component.
- Canvas Download Manager: The Canvas download manager has a complete control on the static content that is being downloaded by the application. While the core/lib layers request static content like JavaScript files for configured modules, the download manager makes sure the content being fed actually corresponds to library that is being accessed in the current session. The business app developers can also make use of this directly, in case they wish to download content on demand for any of their functionality.
- Canvas Form Manager: The form manager controls the entire life cycle of forms being rendered in any Canvas application. The form manager instantiates the form panel and exposes certain standard utility APIs and Canvas defined events to the business app developers, using which they can perform all their business operations on the fields.
- 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.