Future Desktop - Browser Integration

May 24, 2010 at 9:18 AM
Edited May 24, 2010 at 9:19 AM


I've been looking for a framework allowing a workspace-like user experience while still allowing web-style browser integration and seemed to have found the answer in the Future Desktop sample. However according to this post, browser integration was removed because "... nRoute is now using Silverlight's built-in Browser HistoryManager which unfortunately can't tell when one navigates' back". Could you elaborate on that and potentially suggest ways of working around this deficiency?



May 24, 2010 at 12:04 PM

Hi Jimit, quite simply Browser History Managers (BHM) allow you to inject and intercept a browser's history stacks - so when asked to navigate back they they can intercept the browser-shell call and raise an event for you to do your own thing, plus they also allow you to inject history anchors in the back history stack. Now, like I said the problem with Silverlight's built-in BHM is that it just tells you that the history has been altered but not specifically as to if it was a navigate back call or a navigate forward call - and you need to know it so you can synchronize the browser's navigation history stack with your navigation container's history stack.

Well, there are two solutions, one you add metadata to your navigation fragements so you know what is happening - like add a number, if the number goes up it is navigation-forward or if it goes down it is navigation-back. The problem with this is that it is a very fragile and suspetable way to manange your history-stacks, plus doesn't play nice with deep-linking. The other option is to use custom BHM, and in the earlier release of nRoute (which was in Silverlight 2 timeframe) I used Unfocus History Keeper (see www.unfocus.com/projects/historykeeper/). This gives you the flexibility (at the expense of complexity) to manage and synchronize both your container's and browser-shell's history - and to see how to potentially use it see the first release of nRoute and also delve into the accompaning release of Future-Desktop app as it customized the url by adding a fragement to identify the workspace the history-item was for (you can't keep individual history for each workspace in the browser). Now, the potential problem with custom BHM is that it they need to keep abrest with changes to browsers - as you know, each browser has its own set of quirks to appease.

Hope this helps,