This blog post describes how to use data sources in SPEAK.
A central concept in SPEAK is a Data Source. A data sources provides data to other components.
SPEAK does not impose any restriction on what can be a data source.
Data sources are usually used in data-binding scenarios where other components bind properties to a property on the data source. Whenever the data source is updated, the components respond to the event by updating themselves.
A classic example is the search scenario which consists of a text box, a data source and a list control. The controls are data-bound in such a way that the data source listen for changes in the text box and the list control listen for updates to the data source. The user changes the text box which makes the data source update, which in turn makes the list control update.
Currently SPEAK contains 2 data sources; SearchDataSource and QueryDataSource. Both these data sources expose Sitecore items, but a data source can expose any kind of data. The important point is that the components that bind to the data source understands that data that is exposed.
For instance it is possible to implement a data source that exposes data from a SQL Table on a server. Such a data source could call a web service to retrieve that data from the SQL Table and expose the records as a Json data structure.
The data source component should expose a property that represents the current data. This property should be read-only.
An item-based data source is a special kind of data source that exposes Sitecore items. An item-based data source is implemented in the same way as a generic data source.
By convention the property that exposes the items is called Items.
Hi Jakob, I am trying to implement Sitecore Analytics Reporting using SPEAK Charting application. Do you have any example that explains the implementation of datasource that exposes data from SQL Table?