OpenDoc provides an object-oriented user model, where documents are objects that contain other objects, and where each object may have distinct behaviors. However, object isn't a term that typical users understand in a document context, so we use part instead (for "part of the document"). Parts enable all kinds of content to be combined into a single document. The user sees each part as a self-contained entity with its own content, behavior, and set of properties. Each part contains one kind of data that's intrinsic to it, and may contain other parts as well.
A component is the fundamental building block of a compound document. It consists, as shown in Figure 9, of the component data and the part handler, which is the code to change and display the data. OpenDoc also has the concept of component viewers, which are a subsets of the part handler. They can display and print the data of a part but not change the content.
Figure 9. OpenDoc Parts
Compnents are independently functional units, similar to am executable program with following differences:
° Components are compiled as DLLs note EXE. ° Components are loaded dynamically.
Components are task-specific and specific for a certain data type. The kind of data may be text, graphics, a spreadsheet, sound, video, image or even a button with a function. Each kind of data is handled by a specific part handler. Components are designed to work cooperatively with other components and are replacing today's monolithic applications. Applications have become a configured set of components.
The following describes the differences between a document, consisting of parts versus the document, created by conventional applications:
° An OpenDoc document is built and manipulated in the way that you assemble your document out of parts of any graphics part handler of your choice. For example, you may select a text component to write a letter. If you wish to embed illustrations in that text, you simply select and embed a graphics component in your text component.
° While editing, copying, or pasting a part, you do not need to be aware of which part handler is being executed. You directly manipulate the component within the context of the document.
Subtopics: