Server Data Sources vs. Views Data Sources

The mapping between server objects and the world of graphic objects is based on a set of Views memory data sources. As a consequence of such mapping, the values of server object attributes are stored in the cells of Views memory table.

Two different kinds of data sources are used in the Server/Views component: Server data sources and Views data sources:

Server Data Sources

These data sources are represented by the class IlsSwServerDataSource. They can be considered as “meta data sources” because they are used by the Server/Views component to generate Views data sources.

A Server data source is a graphic object that inherits from the class IliDataGem. This object is not visible at runtime. It is stored in the panel resource file (.ilv file).

The view specification is one of the Server data source properties and as such, it is stored with the Server data source. This object is created when the panel that holds it reads its resource file. Any Server data source is destroyed when the corresponding panel is destroyed.

The purpose of a Server data source is:

  • to enable you to design your dynamic views in Server Studio by inspecting this object;

  • to create and destroy a set of Views memory data sources according to a given view specification;

  • to enable the representation of your view to locate Views data sources that must be used by IlsSwTable and IlsSwRow representation objects.

The following schema shows that a Server data source is connected to:

  • the Views representation model on one side,

  • the Views data sources on the other side.

Connection Between a Server Data Source and Views

The figure above can be commented as follows:

  1. Connection between a Server data source and Views data sources is made when the Server data source is created.

  2. Connection between the Server data source and the representation of a view (created as an instance of the class IlsSwRepresentation or one of its subclasses) is made as soon as that view is opened in the component.

  3. Connection between Views data sources and table representation objects (instances of the class IlsSwTable) is established when those table representation objects are created. Each table representation object retrieves its set of Views data sources through the Server data source using its own name.

Views Data Sources

Views data sources used by the component are IliMemoryDataSource instances that have an IlsSwMemoryTable object as their table. There are two instances of the Views data sources for each table representation. These are the data sources to which you connect your gadgets. They use the standard Views mechanism to notify gadgets.