Logo

18.2 Glamour architecture

The architecture of Glamour revolves around a handful of concepts. The picture below shows a UML diagram with an overview of these.

Glamour Architecture

The central concept is the Browser which encapsulates the entire interaction and presentation logic of a browser.

A Browser is composed of Panes. A pane defines physical locations in a Browser. A Pane manages its state through named Ports which can hold any objects as value.

The navigation flow is specified via Transmissions. A Transmission connects several origin ports with a destination port, and its job is to handle the propagation of values between these. In essence, when the value of an origin port changes the Browser analyzes its Transmissions and those that originate in that particular port are subject to being triggered.

Essentially, the constructs of Panes, Ports and Transmissions correspond to a components and connectors architecture in which the components are connected in a directed graph.

Panes only define the location in the Browser, but the way they should be rendered is handled by Presentations. A Presentation interprets the state of the Pane and maps it to visual characteristics through a strategy pattern. Thus, we can have multiple types of Presentations: TextPresentation, ListPresentation and so on.

Furthermore, Presentations can also be composed in a CompositePresentation. In fact, a Pane is always represented by such a composite.

Add a Note