18 Building browsers with Glamour

Large models hold many details. Tons of details. It is precisely this sheer size that makes it so hard for us to grasp the entirety of a complex system in one shot. To ease the process of understanding we require tools to help us make sense of all these details.

To tame these models, we need to understand their inner structure and their inter-relationships. How do we best do that? By means of browsers. A browser is a specific user interface that allows us to look at the space provided by the model, to navigate from one part of this space to another, and to act upon it.

Browsers can be of many kinds, but for the purpose of this discussion we will distinguish between generic and dedicated ones.

In Smalltalk, for example, the central browser is the Inspector. This is a generic tool that allows us to manipulate objects from the point of view of the Smalltalk language. It accommodates any instance of any class, it shows us the inner structure of the instance in terms of its variables, and it allows us to execute code that involves the current instance. In Moose we have the Moose Finder fulfilling a similar role, only it does it by interpreting the objects from the point of view of the meta-model of Moose.

These are great tools, but they are not effective when it comes to navigating a set of objects from the point of view of a model that is at a higher level and that ignores the internal implementation details. Because the Inspector offers a low level point of view on the objects, whenever we want to discover a higher level structure we are required to go through many irrelevant, implementation-related, clicks to get to the objects of interest.

A better way is to use a browser that supports a flow dedicated to the model of interest. For example, when it comes to manipulating code, we use a code browser. In Smalltalk, we could write code in the Inspector, but we typically prefer not to.

Dedicated browsers are desirable, but they are expensive to build. As a result we have no dedicated way to browse the large majority of models around us. This situation needs rectification, and Glamour presents the solution in the form of an engine for building dedicated browsers.

This chapter describes the details of Glamour. It starts with a short tutorial and then it gradually introduces the architecture and the most important concepts.

User Contributed Notes

noria77 (5 March 2014, 7:46 pm)


Add a Note