Print Page | Close Window

Loading Data with Deep Linking

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2009
Forum Discription: For .NET 3.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1571
Printed Date: 25-Apr-2024 at 11:43pm


Topic: Loading Data with Deep Linking
Posted By: *Calsy
Subject: Loading Data with Deep Linking
Date Posted: 30-Nov-2009 at 8:51am
Hi, Im using deep linking in the website (through the navigation class). Just wondering if you have any advice for loading up a single page instance. That doesnt make sense at all so i explain the scenario:
1. User searches a list of customers
2. Selects a customer from the list and goes to details
3. The user than bookmarks this customer details page in their browser.
4. They now close the browser.
5. Some time later they reopen their browser and go straight to that bookmark.
 
At this point when they reopen the page from the bookmark I currently check that there is a connection to the database and retrieve the customer from the database and populate the data on the form. Bit of a load time hit to do this since ive got to connect to db and retrieve data aswell to just show the one page.
 
Do you have any ideas on how I could better approach this?
 
Thanks



Replies:
Posted By: WardBell
Date Posted: 30-Nov-2009 at 2:20pm

You could cache bookmark data (at least some of it) locally in isolated storage. This is easy to do with DevForce and is demonstrated in Model Explorer and Prism Explorer.

The challenge is to know when the user has bookmarked the current page. It may be difficult to get that information from the browser. Of course you could offer a button to press to capture the proper deep link. Or you could just save locally a rolling list of the most recently seen customer details; when the app launches with a link, you can compare it (compare the customer details id component of the URL query string) to your local store of customer details and, if you're lucky, you can present the data immediately.
 
Whether I had a hit or a miss, I would immediately launch an async query to retrieve the most current version of the customer detail. I might also provide a UI cue that the data presently on screen are old (and maybe say how old).
 
None of this is any help if you intend to send the link to someone else; that someone is unlikely to have the targeted customer detail in cache.
 
Hope this inspires you to great things.



Print Page | Close Window