The Visual Query / Pipeline Designer helps you build a chain of data-preparation actions.
Now what if your data comes from another source? For many things you can use the DnnSqlDataSource - but it won't cover everything. We'll add more DataSources in the future, but if you need anything custom - just create your own.
There are many cases where you would like to create a custom DataSource - for example:
Maybe you would like to have a FileDataSource which gives you a list of files from a specific folder…
- Maybe you want to get an RSS-Feed - just create an RssDataSource
- Or you want to get JSON data - JsonDataSource
- Or you want to help all the people who worked with Ventrian Articles and would like to create a VentrianDataSource where the designer doesn't need to know SQL - similar to our DNN FormAndList DataSource
In all these cases, just create your own DataSource.
To help you get started, I've prepared a bunch of stuff for you
#1 A Demo Visual Studio Solution with a Custom DataSource
The entire solution is on GitHub here: https://github.com/2sic/eav-Custom-DataSource. Just download or fork or whatever. It contains:
A DateTimeDataSource demonstrating all kinds of features and best practices
- A Unit-Testing project to test the code
We strongly recommend that you use unit testing with all DataSources (we do too) because otherwise testing just takes too long in a live web.
- Hint: in Visual Studio - press "Ctrl+R, A" to quickly run all the unit tests automatically
#2 A App containing Demos and Configuration
This can be found here: http://2sxc.org/en/Apps/Details?AppGuid=3bbc0160-a366-49db-99a0-0d50932e8fba
- Some intro-help text
- Some demo queries using the DateTimeDataSource
- A content-type called "|Config MyCompany.DataSources.DateTimeDataSource" which the visual Query Designer opens when you want to configure your custom DataSources.
With love from Switzerland,
Daniel Mettler grew up in the jungles of Indonesia and is founder and CEO of 2sic internet solutions in
Switzerland and Liechtenstein, an 20-head web specialist with over 600
DNN projects since 1999. He is also chief architect of 2sxc (2SexyContent - see forge), an open source module for creating attractive content and DNN Apps.