But suppose that there were a general way of retaining prototype structure in saved objects? Then things could be saved and restored without restraint.
In addition, the user interface exposes prototype structure, bringing visibility as well as persistence to the prototype realm.
The project goes by the name “PrototypeJungle”, since at its core lies an extensible repository of prototype structures. See prototypejungle.org. A description of the underlying technology (which is open source) can be found here.
Here are examples of what life with the prototypes is like. Consider the following simple diagram:
Each of the seven rectangular nodes is derived from a common prototype. The same is true of the three multi-arrows. The user can edit either the instances or prototypes. Editing a prototype affects all instances according to the rules of inheritance (in which instances might override prototype properties).
Prototypes can swapped for others in the repository under the condition that they play the same role (two common roles are “vertex” and “edge”). For example, a single swap operation yields the diagram below on the left. Parts of elements can be swapped too. The diagram on the right is the result of swapping out the solid arrowhead prototype for a curved variant:
The prototypes associated with a diagram are carried with it (this is what allows users to edit those prototypes). Those diagram-internal prototypes in turn inherit from standard prototypes in the repository. This situation is pictured below for the very simple case where the “diagram” consists of two circles with a common prototype.
The repository contains “kits” as well as diagram elements like nodes and arrows. A kit provides operations for building particular sorts of diagrams — operations which are invoked by specialized menu items installed in the user interface by the kit (the operations are also accessible via code). For example, the tree-like example above was constructed with the tree kit via four presses of the “add child” button followed by adding text (the starting tree already includes the top three nodes). Kits support building diagrams from data as well.