How CT3 Works in a Browser

This page explains how Caplin’s services are implemented and displayed in a browser via a layout manager, and describes Webcentric and Presenter; Caplin main layout managers. You may find it useful to read How CT3 Fits Together if you have not already done so.


ct3 ov diagram inside browser

Once the homepage is fully loaded, the app is initialised by JavaScript code. There will be a single "main" class (the name of which can be anything you choose) that is responsible for bootstrapping the app. This class will:

  • Create instances of the service implementations required by the app.

  • Add these service instances to the ServiceRegistry.

  • Perform any other required initialisation.

  • Create a layout manager, instructing it to draw the app on the screen.

The layout manager is responsible for managing and arranging a set of "display component" instances on the screen. Caplin Trader provides both Webcentric and Presenter as layout managers. Layout managers retrieve instances of components from the Component Service, which is itself accessed via the Service Registry.


When Webcentric starts, it retrieves an XML-based configuration file from the server. It uses this information to configure itself, creating a menu structure and an area where a set of "layouts" is displayed. The information for each layout is held in an XML document, which is stored in a relational database on the server. Webcentric makes a series of requests to a servlet to retrieve the set of layouts for the current user. Screen layouts are displayed within a tabbed container, with only a single layout being visible at any one time. The user can change and copy their layouts, saving them back to the database.


Presenter allows you to build an app by laying it out in standard HTML/CSS, and then embedding Caplin components by tying them to the DOM elements with special data-bind attributes, like this one:

<div data-bind='component:grid'> ... </div>

Presenter supports nested HTML templates that can also be used to display lists of objects. You can therefore create apps ranging from a single grid in a web-page to a complex multi-view system, with menus and modal dialogs. Presenter can be used to create Caplin components as well as manage them, so it’s also often used to build trade tickets that are embedded in Webcentric panels and dialogs.