This blog contains reflections and thoughts on my work as a software engineer

onsdag den 17. december 2008

Silverlight - the pros and cons

Some time ago the team I work with decided to go to a one-day Silverlight seminar at Microsoft Copenhagen. Today we went and with an openminded heart (read: I didn't know anything about Silverlight except that I know I at some point downloaded a plugin to be able to access a beta version on MSDN (I think it was...).  I admit it: All I knew about Silverlight in advance can be told as "It must be some sort of Flash something-something from Microsoft".

So I went - and here's the sum of my notes and the people I talked to during lunch etc. Let's start with the "What": 

Silverlight is a cross-browser plugin which enables you to write light-weight Windows Presentation Foundation (WPF) applications and embed them into a website. It doesn't require the full .NET framework  on your machine but instead the plugin you download contains a smaller, compressed version of the .NET framework which enables you to run compiled Silverlight IL code. Silverlight uses XAML which enables you to write markup language using an XML syntax to express a UI.

That's the short story. There's much more to it (please leave a comment if the above needs to be corrected) but that's the basics as I know them of tonight. However - I talked a little and reflected a little during the rest of the presentations today and finally home again I have come up with this list of pro's and con's from my notes and my memories of the conversations I had:


  • The Silverlight Toolkit on Codeplex is a good thing and it reminds me that someone at Microsoft is beginning to "get it". The toolkit is released frequently and doesn't require the client to download an updated version of the browser's Silverlight rendering engine. Any additional usercontrols except the standard set of controls (which only covers the most basic textboxes etc)  are embedded in your specific Silverlight application.
  • If you are a WPF developer writing desktop apps the switch to writing Silverlight website apps is easy to overcome because the context (XAML, .NET) are very similar. This isn't exactly the case with any other existing Flash technology where the learning curve is steeper no matter what you have tried before Flash
  • Expression Blend is a working environment aimed at designers. How much you tweak and turn Visual Studio I have never heard anyone say that it is a good working environment if you aren't committed to reading code. Designers have had more luck with products from i.e. Macromedia and I think that Expression Blend is trying to please other roles than the "system developer" - which is good  :o)


  • I was told that if you i.e. copy/paste XAML from one file to another without also copying the codebehind, the target XAML file (with an empty code-behind) would only fail runtime - the compiler wouldn't let you know that you were missing method stubs in your codebehind to match the various events you had set up in the XAML markup. Error messages could be pure nonsense and debugging XAML is impossible. Of course you don't get to succesfully build a broken XAML document missing i.e. and end tag but checking for something as simple as method stubs should be a no-brainer. What am I missing here - we're at version 2.0, not some 0.8 beta release.
  • It appears that there is a Silverlight unittesting framework available - but it sounds a bit disturbing in my ears that the suite of unittests runs in the context of a browser? In order for me to adapt to Silverlight I need to have a good testing framework around when adopting a new technology - definately something I need to check up upon.
  • Styling in XAML means no inheritance - and your styles must be explicitly set on every element... That means that you can't have a general style for i.e. all your buttons which styles every single button on your site the same way. Oh no - you explicitly have to tell each and every button how it should be styled using an attribute on the button....... The guy from Microsoft breaking the news to us tried to be diplomatic about it. I can only imagine why this problem hasn't been solved when releasing version 1.1 - I wouldn't expect such stupidity to survive much beyond a version 1.0 of any product
  • Silverlight applications on the web can't be indexed by Google. Microsoft is working on this issue which should be solved in version 3.0 (due in Spring of 2009). Google is a cornerstone in any marketing strategy so the lack of searchengine compatibility shouldn't be neglected when qualifying Silverlight as a mature product.

Bottom line is: I think it could be fun to work with Silverlight (I'm nothing but a programming scarecrow who likes to bring home new and shiny technology to my computer) and I think that Silverlight has the potential to be "big". I also think that right now I wouldn't use Silverlight for much more than menues, banners and other non-critical stuff which requires the user to have a decent visual experience but I couldn't recommend anyone using Silverlight for building fullscale websites based on what I've seen today. However this technology has come to stay and the web is increasingly getting focused on rich clients and UI so this isn't my last encounter to the Silverlight technology.

Regards Kristian



Microsoft Silverlight: 10 reasons to love it, 10 reasons to hate it

5 kommentarer:

Chad Campbell sagde ...

This is a nice summary. Thank you for posting this to the community.

Chad Campbell - Author of Silverlight 2 in Action

Casper Bang sagde ...

Should also be on the "con" side of things, how Silverlight is not really a cross-platform technology to be relied on since Microsoft only makes plugins for Windows and Mac. Although Moonlight is shaping up nicely, this is in contrast to what's available directly from the competitors such as Adobe Flex and Sun JavaFX.

Chad Campbell sagde ...

Personally, I think the Microsoft approach of getting Silverlight on Linux is a pro. The reason I believe this is because Microsoft is working with Novell, and in particular Miguel de Icaza. This approach helps to ensure a quality release on the Linux platform because of their knowledge and experience of developing on the Linux platform.

This is just my humble opinion.

Kristian Erbou sagde ...

Casper Bang: I failed to figure out on which systems are supported and which are not researching for my blogpost so I was stuck with what I was told during the seminar. Can you tell a bit more about which operating systems and browsers Silverlight doesn't support?

Anonym sagde ...

@Kristian: Check Wikipedia