This project is read-only.

Data Design

Apr 18, 2013 at 4:37 PM
Hi,
planning a Windows store app I decided to use the Okra Framework to make life a Little bit easier.
Because I am in an early design phase I would like to ask what is the best way to solve the data design with Okra.
The app should show at the first screen Folders and items. A click at an item would show details of the itam. This details are combined from four lists.
This lists will be filled in from different SOAP Interfaces.
Whould it be the best way to write a DataListSource for every list or is there a way to combine them to reflect the item directly?
Apr 19, 2013 at 7:30 PM
Hi,

You have an interesting scenario in your app. It's not something that is directly addressed by the Okra data framework, however it should be fairly straightforward to implement. Since the DataListSource is responsible for the in memory caching of the data for display, then it is probably best to have a separate DataListSource for each list (for example if data is retrieved at different times this would be simplest).

What you do next depends on how you wish to display the data,
  • If each data source is displayed separately (e.g. on one page, but each in a different group) then you can simply bind a list of the four data sources (along with a title for each) to a GridView with grouping enabled - note however that grouping disables virtualization so all items would be retrieved at the start.
  • Alternatively if you need them all in one list then you will need to write a custom IDataListSource implementation that would merge the data into a single list. This should be fairly straightforward, taking the four child IDataListSource references and combining the total item count, and redirecting any item request to the correct child based upon index.
Does one of these sound useful to you?
I can elaborate a little more if you require.

Regards,
Andy
Apr 22, 2013 at 9:02 AM
Edited Apr 24, 2013 at 4:51 PM
Thank you Andy, that is what I did expect. I have already started to implement a IDataListSource which will combine the different lists in an overall item data design.
Keep working on the framework!
Thank you for your quick response
HOV