Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Lynicon data API system provides functionality for persisting data objects.  It uses a provider pattern where there is a default provider and specific providers can be registered for each type of data object.  All data manipulation done in Content Routing is done via the data API.  Features of the data API  The data system is used to automatically fetch content for content managed routes created using DataRoute.  It can also be accessed directly from client code in models for such purposes as providing lists of related items when rendering a content page.

Features of the data system include:

  • Provider based persistence, a provider can be registered for each data type persisted.
  • Two Three layers of processing: repositories retrieve data container objects directly from the appropriate persistence mechanism, data sources provide a very simple interface to different sources of data (databases, files etc); repositories distribute requests for different types of data and pre- and post-process data via global events; collators may combine data from several containers, and return the original contained data.
  • All data actions trigger a global event which can be caught in order for extension modules to change the way data is handled or record data changes.
  • API data types can be extended both by modules and by client code.
  • The data API supports the concept of a Summary which is used to efficiently retrieve a subset of the fields of a data type which are needed to represent and link to items of that type from other pages.
  • The data API supports a generic versioning system which can be used by modules to provide various kinds of versioning of data items, e.g. multi-lingual, change-control versioning.
  • It supports use of interfaces and parent types as a content type filter when retrieving records, e.g. get me all content records of a type implementing a given interface.