The core architecture of Proxima consists of a number of layers, each communicating with its upper and lower neighbors. The layered structure is based on the staged nature of the presentation process and its inverse, the interpretation process. The positions at which the document, the rendering, and the intermediate data structures reside are called levels. Between each pair of levels we have a layer that maintains the mappings between its adjacent levels. Each layer consists of a presentation component and an interpretation component and may be parameterized by a sheet. The figure below schematically shows the levels and layers of Proxima. From a document type definition, a code generator generates a number of Haskell modules, which are compiled together with the sheets and the Proxima base modules to yield an editor. Note that the picture shows the architecture of the stand-alone Proxima, but the only difference with Proxima 2.0 is that the rendering and the edit gestures are passed to and from the user through a web server.
A data level in Proxima is not simply an intermediate value in the presentation computation. It is an entity in its own right and maintains part of the state of the editor. The six levels of Proxima are:
- Document: The document structure.
- Enriched Document: The document attributed with derived values and structures, such as the type of a function or a table of contents.
- Presentation: A logical description of the presentation of the document, consisting of rows and columns of presentation elements with attributes. The presentation also supports formatting based on available space (e.g. line breaking).
- Layout: A presentation with explicit white space.
- Arrangement: A formatted layout with absolute size and position information.
- Rendering: A HTML rendering of the arrangement.
After an edit operation on the document, all levels from document to rendering are updated to reflect the update. After an edit operation on the layout level, the modified layout is scanned, parsed and reduced, to obtain the corresponding updated document, from which an updated rendering is computed. Scanning and parsing does not occur after every presentation edit operation. Depending on the editor, it may occur either on a navigation operation, after a certain time interval, or at an explicit request by the user.
A detailed description of the levels and layers of Proxima is provided in Chapter 3
of Martijn Schrage's PhD thesis. An overview of the data type definition and the sheets that must be provided to create an editor is provided in at Building an editor
- 09 Mar 2010