Parts of the Client-Side Framework

By working together, the parts of the Client-Side Framework properly handle a Genero application.

Client-Side Framework

The Client-Side Framework (CSF) is the core of the Client-Side part of the Genero Web Client. It handles:
  • The page update according the Genero application state.
  • The user interactions with the page.
The CSF namespace object is gwc and is located in the file csf.js.

Toolkit

The gwc namespace object includes the tk namespace object (gwc.tk) that contain a set of general purpose tools (classes and function) that help to create components.

For example:
var interrupter = tk.listenEvent(elt, 'click', myClickHandler);

Components

Components are stored in the namespace object gwc.componentSet, located in the file components.js.

A component handles the interactive part of a HTML markup fragment. This fragment can be a whole template snippet or just a tiny part of the page. This mean that a single template snippet may be related to several components.

Bootstrap

The bootstrap (bootstrap.xhtml) is code that runs before the Client-Side Framework and the application page are loaded. The bootstrap collects information such as browser and device capabilities. This information is transmitted to the Client-Side Framework through the cookie gwc_cookies=gwcUserAgentFeatures. The main snippet page is then able to read these information through the meta variable gwcUserAgentFeatures. The bootstrap has a userAgentFeaturesTests variable that contains the set of functions that collect information.