Asked by:
How do I handle viewing large results set from a query to database of images in a Windows 8 app?

-
I don't know yet how to get started with this. My app does something like the following. Enable user to geotag photo's and upload them along with the coordinates to Azure SQL database. They can view all the photos that are found in a location. So I need the script on Azure to return a specific set of photos. Uploading seems pretty straightforward. But how do I handle the download of data. In particular the viewing of the images. Potentially the query can return thousands at images at a location. I'm not sure returning that many objects to the device makes sense. What is the best way to handle this?
Question
All Replies
-
Hi,
Since the issue is related to SQL Azure, I have moved this thread to SQL Azure forum for getting a better support.
Thanks for your understanding.
QinDian Tang
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help. -
I think I found part of the answer,
Loading data incrementally
You can bind list controls to arbitrarily large data sources, and still achieve high performance, by using incremental loading. For example, you can bind list controls to Bing image query results without having to load all the results at once. Instead, you load only some results immediately, and load additional results as needed. To support incremental loading, you must implement ISupportIncrementalLoading on a data source that supports collection change notification. When the data binding engine requests more data, your data source must make the appropriate requests, integrate the results, and then send the appropriate notifications in order to update the UI. For more info, see the XAML data binding sample.
-
you should not return huge dataset to a device unless its really really needed, you can use async paged downloads and only bring data that you need + little more so the user experience is not suffered, you can also think about alternative strategy for example if a user is just bringing pages and pages of data down to a device may be content of his interest is not there and may be suggesting him alternate search term would be more appropriate.
if you give little more details about the solution you are trying to develop it will be easier to suggest alternatives.
------------------------
Please mark as answered if it helped.
Please mark as answered if it helped Vishal Narayan Saxena http://twitter.com/vishalishere http://www.ogleogle.com/vishal/
-
Its mostly how I described it in the first post. Here are some more details
For Uploading
User saves a photo along with geo coordinates to Azure SQL database probably via mobile services. So say I start with a simple database where we have latitude, longitude, and a link to the image(s) in blob storage. Say there are many photo entries in the database eventually.
For Viewing
When user opens app, the app sends the users current geocoordinate to Azure. On Azure I run a script to calculate all the images within a predefined radius around the users geocoordinate. This returns an indertminate number of images. I want the xaml page to show the photos incrementally, so as they scroll, more photos are added to the grid.