Data System
The Lynicon data 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. Â 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.
- Three layers of processing: 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.