How CT3 Fits Together
This page provides an overview of Caplin Trader’s architecture, and explains how the application is constructed, from the point that the browser makes the initial request, to the point where the required information is displayed to the user in that user’s preferred screen layout. You might find it helpful to have read the Introduction to Caplin Trader 3, before you read this.
A CT3 app conforms to the standard BladeRunner structure and conventions, the major parts of which are shown in the following diagram:
The browser requests the app’s homepage from the app-server. The app-server creates an authenticated session, either by using an SSO mechanism or by asking users for their credentials via a login form.
The app’s homepage is then returned, which contains:
-
Script tags for all the (bundled) JavaScript.
-
A set of CSS style tags appropriate for the user’s browser, theme and locale.
-
A script tag that will request a JavaScript file, which contains localised language tokens as a JSON map.
-
Some embedded JavaScript that initialises the app, after all the JavaScript has been downloaded.
Caplin Trader apps are single-page web-apps, where all the JavaScript is downloaded at start-up. As soon as it’s downloaded, the JavaScript will perform some initialisation.
First of all, any necessary XML configuration and HTML templates are requested from the app-server, using an AJAX request.
Next, the app establishes a connection to the back-end server (which handles streaming data and trading). Caplin Platform accomplishes this using the StreamLink library. The app-server passes a token to StreamLink, which was generated when the session was authenticated.
Finally, the layout manager renders the screen appropriately for the end user. If Webcentric is being used as a layout manager, it makes an AJAX request to a servlet on the app-server for its layout configuration. The servlet then retrieves the data from a relational database. Users are free to modify and save their layouts at any time.