Overview

As described in the previous chapters, Server provides a powerful class library that allows you to build complex object models. Once your object model is built and running, you can use the dynamic view services to map from the object server to a graphical representation.

If you choose to work within the Server/Data Access environment, the server object model is mapped to Data Access data sources. In the examples that follow, we will use a Server data source as the mechanism to map to Data Access data sources. Connecting gadgets to data sources actually consists in connecting them to the underlying Data Access data sources rather than directly to the Server data source. An Data Access data source is a table that contains a series of rows. Hence, when you map to an Data Access data source you must create the table and the associated row template that will describe the rows to be inserted into the table.

At runtime, each time an instance of a server object that is mapped to a table object is created, a new data source is created. The only exception to this rule is when the data source is explicitly declared at the time of creation. In the same way, each time an instance of a server object that is associated with a row object is created, a new row is inserted into the data source that is referenced by the row.

The Server/Data Access integration provides a predefined mapping that provides a table representation () and a row representation (). Mapping consists in associating the table representation with an object in the server model and, similarly, the row of the table with another (or the same) object in the model. As we will see later, Server Studio provides simple drag-drop operations to perform the necessary associations.

When we create a table representation, Server Studio creates two data sources.

  • The first data source, which we refer to as the Main data source, is the data source that has an associated row and that will contain many rows at runtime.

  • The second data source, which we refer to as the Properties data source, is created to allow you to map properties that are normally related to the object that owns the table representation.

Note

The Properties data source will never contain more than one row, which is the representation of the object associated with the table representation.