As I’ve been working on a major Silverlight project recently, I was talking with some app devs, who kindly reminded me that I can’t account for every click and every end user behavior. But I’m determined to user-proof my app as much as I can.  I want the user experience to be as enjoyable as possible.  (Yes, a UX tie… this is a Sarah on User eXperience – SUX – post in disguise.)  These are just some of the considerations that I’ve been thinking about wh

ile working on my out-of-browser (OOB) Silverlight app.

How do I handle OOB behavior when the app is in-browser?

Silverlight in the browser really gets cranky when it sees those Application.MainWindow calls.  So I’ve had to make sure that OOB-specific calls are hidden away well enough that the in-browser side doesn’t see them.  Of course, there’s the Application.IsRunningOutsideOfBrowser Property – very handy for checking if the app is running OOB first before making those calls.

Of course, if the app is starting in the browser, some other things to consider include:

  • An in-browser interface.  What’s the app going to do while it’s in-browser?
  • How will the end user install the app?  Do you have them right-click on the app and install from the Install menu or do you add functionality to the in-browser app and use the Application.Install Method?
Once the app is OOB, how do I store user preferences?
As long as Application Storage is enabled on the client, look into Isolated Storage.  If that option isn’t available, then you may want to look into storing the user preferences in a database.
What if I’m looking for a something I stored and get an error where the key isn’t found?
Whenever you have a case where you’re dealing with storage that a user could easily manipulate and – especially in this case – delete, make sure to use try-catch.
What if I have an app that needs to get data from an online source and the client’s Internet connection dies?
More error checking… this time, look into the NetworkInterface.GetIsNetworkAvailable method.  Also, make sure to handle the NetworkChange.NetworkAddressChanged event.
These are just some of the questions that came to mind as I was figuring out how I was going to build the app.  Of course, this is just a small view of out-of-browser considerations that I’ve had to keep in mind.  Want to know more about Silverlight and its OOB support?  Check out the Out-of-Browser Support page on MSDN.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.