-
Notifications
You must be signed in to change notification settings - Fork 9
Domain
A domain provides the data structures of documents, selections and operations that belong to a problem domain. Domains are mainly important, because they can be analyzed, described and implemented independently. They are not only independent of each other but also of projections.
The document data structures describe the possible states of the domain specific document objects. A document object is a piece of data that is being edited. A domain usually provides multiple document data structures. They can be used individually in simple cases or in cooperation to express more complex data.
Document objects are not limited to form a tree. It's absolutely valid to create document objects that have cycles within their references. It's also allowed to mix different domain documents by nesting them into each other.
In fact any kind of data structure is a valid document data structure. This is one of the properties of the projection editor that makes it a generic purpose data structure editor.
The selection data structures describe the possible states of domain specific selections. A selection object references some part of a document object that is being edited. A selection object is independent of document objects, it can be applied to different document objects multiple times.
The representation of a selection object is similar to a path. It specifies the part of a document object by recursively traversing down from the start of the selection to the selected part.
The operation data structures describe the possible states of domain specific operations. An operation object specifies a change to be applied to a document object. An operation object just like a selection object is independent of document objects, it can be applied to different document objects multiple times.
Changes represented by operations often require various arguments. Some of these are constant values such as numbers, strings or newly created document objects. On the other hand, operations often require to use parts of the document that is being edited. For this purpose operations may also take selections as arguments.