In This Topic
The NOV Document Object Model (abbreviated as DOM) represents the base set of objects that allows the construction of versatile visual documents. The DOM is designed to be edited, styled, evaluated and displayed via different medias. Conceptually it follows the W3C DOM model, but is further extended to meet the demands of a larger set of document types and requirements.
The DOM serves as foundation for the Nevron UI as well as the other heavier components implemented by the NOV presentation layer (rich text, chart, diagram, grid etc.). The common DOM base of the different presentation layer components ensures that most of the work required to mix different types of presentation layer content is already done by the DOM - for example: embed different widgets inside a diagram or inside a rich text document, undo-redo of integrated content, CSS of integrated content, functional dependencies between integrated content and many other. This packed with the cross-platform architecture of NOV ensures that you can create the next generation of rich visual content, that will natively display on a large set of devices.
The DOM adds build in support for the following features:
- Structure - structurally documents are hierarchies of NNode derivate objects that follow the container-collection aggregation pattern. The node hierarchies and the node aggregation methods are described by the Nodes topic.
- Metadata - each type of node is associated with an instance of the NSchema class, that defines the node properties, child node aggregation method and allows for the association of custom metadata. This means that much of the information about each specific NNode instance, can be obtained from its schema.
- Events - the DOM is designed with observation in mind. It implements strong support for events that are raised for nearly all DOM aspects of interest. DOM Events support bubbling, sinking as well as categorization. See Events for more information.
- History - the DOM implements build in support for Undo-Redo that is tightly integrated with the DOM evaluation and mutation.
- Expressions - the value of each element property can be assigned by an expression. Expressions allow for the automatic calculation of an element value that is based on other elements values. This makes it possible to create complex functional bindings between multiple element properties. See Expressions for more info.
- Styling - the content of documents is styled via style sheets, that very much resemble the W3C CSS Level 3 model. The NOV CSS model is however richer that the W3C one, because of the strongly typed nature of the NOV DOM.
- Measure and Arrange - the DOM implements a build-in layout system, that is integrated inside the document automatic evaluation.
- Display - the DOM implements core support for display inside abstract graphics.
All examples related to the NOV DOM assume that you are using the Nevron.Nov.Dom namespace and that you have referenced the Nevron.Nov.Presentation.XXX.dll for the specific runtime that you target.