Thought Processes from a Silverlight OOB App Dev

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.


SUX: Silverlight Edition

Sometimes, things appear in the SUX (Sarah on User eXperience) series because they work contrary to my expectations. Silverlight is one of those things.

For a web technology, Silverlight is more an app developer’s domain than a website developer’s domain. It really requires an application development train of thought. In these past few weeks, I’ve been working on a Silverlight app and running into quirks that probably wouldn’t have thrown me off if I spent more time writing apps rather than websites. However, I typically focus on websites more than apps, which is a slight paradigm shift. So imagine the frustrations I ran into with Silverlight, thinking that a web technology would be aligned with the web train of thought.

For one, they don’t do margins the web way. Margins in the web world – think CSS attributes – are top-right-bottom-left. Margins in an app world (and in the Silverlight realm) are done left-top-right-bottom.

Another thing that required a little searching was finding a dropdown box. Yes, as a website developer, I’m used to the terms dropdown, DropDownList, or even the old <select> lists. But as I look at my toolbox, I’m not seeing any of those terms. Ah… but there’s ComboBox, similar to the control I was familiar with back in my VB 6 days. Ugh… another app term, not the web developer term.

The last grumbling I have on this is the lack of transparent window support. Transparent PNG supported was enhanced in Silverlight 4, which I really like. But there still isn’t any support for transparent windows. On this project, we would’ve loved to have a transparent window, especially on an out-of-browser app. Sure, we could’ve done this in WPF, where transparency is supported. But WPF on a Mac isn’t supported – Mono doesn’t have plans on implementing it. Silverlight, on the other hand, is supported on Macs, which is why we planned going this route. Until they port transparent window support from WPF into Silverlight, we’ll work with the technology constraints and go with a custom chrome. But transparent windows would be awesome!

Thankfully, I’m getting around Silverlight a lot better than I anticipated, but I still need to remember that I need to treat it like an application tool and not necessarily a web development tool. Don’t get me wrong – it is a web technology after all. But first and foremost, it is a subset of an application development tool, not a web development tool. Once I get that through my head, I understand why they went this route.

Looking into PHP on Windows…

While I was looking at the Web Application Gallery that I have available via my DiscountASP control panel, I noticed an old familiar app on the list.  I did a double take, as I couldn’t believe it.  Yes, one of the apps I used to play with back before I became a dev full-time – phpBB – is now available in the Web Application Gallery and also in the Web Platform Installer.

When I first heard about the PHP initiative that Microsoft was taking on, I was a little skeptical.  I have a PHP/MySQL background, and I know the stability on a Linux platform under Apache.  But PHP on Windows?  That sounds a bit strange.  Then again, I’ve also looked into Mono a bit – and .NET on Linux seems just as strange!

I have to admit that I’m quite excited to see PHP working on Windows.  I am looking forward to using some of the other PHP-based apps that I love – including WordPress and Joomla.  (At the time of this post, WordPress and Joomla appear in the Web Platform Installer, but they are not listed in my webhost’s version of the Web Application Gallery.) I miss those apps, their ease of use and maintenance, and their stability.  I can only hope that the features I like get ported over.

We’ll see over the next couple of years what the future of PHP + Windows has in store for us!  I’m excited to see where this will go!

Summer Speaking Engagements

It looks like I’ll have a busy summer, as I’ve received confirmation over the past couple months on some of my talks.

So if you’ve missed some of my talks, some of them are getting redelivered and some new ones are coming out.  Below are some of my confirmed talks for the summer.


In addition to helping with publicity, I’ve got two talks for PyOhio this year.  This first talk was set to debut later this summer, but it looks like PyOhio will get to hear it first.

A Lap Around IronPython

It’s not just C# and VB.NET that can be used in WinForms, WPF, Silverlight, and ASP.NET. You could also use IronPython! In this session, you will get a quick overview of IronPython and a look into using it with each of the following: WinForms, WPF, Silverlight, and ASP.NET.

The other talk I’m delivering at PyOhio is one that I’ve delivered in other places – including Cincinnati and Dayton this past February.  

Python 101 for the .NET Developer

The first part of the session will cover the basics of Python – its history, how its data structures compare to those we’re familiar with in the primary .NET languages, its strong and weak points, who’s using it, and why you as a developer – both generally speaking and as a .NET developer – should care about Python. The second part of the session will get into the demos – starting with some basic Python scripts and getting into IronPython scripts, if time allows. By the end of this session, you’ll have an idea of what Python is, why you should know it as a developer and specifically as a .NET developer, and how to get setup and write a basic app in both Python and IronPython.



I was a little hesitant about submitting talks to devLink this year after being bit by the demo gods last year.  But after talking with friends, I submitted a few talks – for the previous year’s devLink, I had submitted something around 5 talks and got 1 accepted.  This year, I submitted 5 talks and managed to get 4 accepted. As you’ll notice, I’m not focused on just one topic – welcome to my world, where I need to know all of these things.

This first talk is an updated version of my talk from Kalamazoo X 2009, with more of a business twist, to apply social networking to your careers.

Social Networking Made Simple

Whether it’s meeting like-minded individuals to talk tech with or connecting with people to hopefully find a job lead in this economy, social networking sites such as Twitter, Facebook, and LinkedIn can help boost your career and expand your knowledge. We will look at examples of how people use these tools to get ahead and how you can learn from their experiences and apply their lessons to your life.

The second talk is for those of you who may run your own websites and need to understand analytics.

A Webmaster’s Guide to Web Analytics

As a web developer, it’s nice to see when your site comes together and works well. But have you wondered which pages were getting hit a lot? What about those pages that used to be on your site that are no longer there? Do you have relationships with other websites and want to find out who’s generating traffic to your site? In this session, you will learn the base metrics that come in most web analytics packages and what they mean to you as a web developer. You will also get to see output from some of the popular analytics packages in use and learn more on what might be right for your site.

The talk that is debuting at PyOhio was also accepted for devLink, so if you miss it there, you can see it here too.

A Lap Around IronPython

It’s not just C# and VB.NET that can be used in WinForms, WPF, Silverlight, and ASP.NET. You could also use IronPython! In this session, you will get a quick overview of IronPython and a look into using it with each of the following: WinForms, WPF, Silverlight, and ASP.NET.

Finally, I’ll be showing off how a tool that some people see as an IT tool can actually be used by us developers as well, which could make our IT team’s lives a bit easier with our help.

PowerShell for Developers

PowerShell is a powerful .NET language that bridges the IT and developer realm. Come to this session to see how PowerShell can be used to benefit the developer’s side of things and possibly make IT professionals a little more appreciative of their developers. We’ll start with a few basic scripts to get a feel for the syntax, and from there, look into how we can use PowerShell in our day-to-day tasks – including scripting out website settings in your dev environment for your IT to deploy to live servers or having a quick way to do things like test regular expressions and get assembly information for those DLLs that you are using in your projects. In the end, we’ll look at how to build and use your own custom PowerShell modules in your development projects.

These are the talks confirmed for the summer conferences so far.  I hope to see you at some of them!