Monday, 28 June 2010

Reasons to hate Silverlight Part I

Looking back now, I nearly fell for it, I feel so stupid but I am glad that my natural underlying cynicism of all things new and shinny let me look at this emerging Microsoft technology with an impartial mind.  The marketing that came out of Microsoft was truly outlandish. I do of course talk about Silverlight which is the latest evil incarnation of that festering sore on the landscape of web development known as the browser plugin.  I have hated flash from an end user point of view for a long time, this was further intensified when I worked for a web agency which meant lots of interaction with this island of proprietary insanity that sits menacingly in prominent areas of public facing websites.

Looking back now, the hysteria and hype that greeted the build up and subsequent launch of silverlight was completely over the top.  It was flaunted as a game changer which was the future of the web.   Funny how they flaunted a flash clone as original and ground breaking but originality is not something Microsoft is renowned for. JavaScript and CSS were nothing more than short term hacks that were keeping the ubiquitous seat warm until Silverlight was ready for market.  I debated this on the once popular ALT.NET forum in this thread some time ago, were I was told by developers that this was the future.  The most hilarious argument I got was that "I would be left be behind", if I did not open my arms and embrace this brave new world with the warmth and affection that is best compared to a mother and a new borne baby.  Before getting into the technical details of why this "brave new world", is just a rehash of the last "brave new world" promoted by Microsoft, a.k.a. Webforms, let me spell it out to you the reader, who and what Microsoft are aiming this "ugly girl at the dance" at.  

Webforms is now grossly out of favour with the intelligencia of .NET that were formerly the artist known as ALT.NET.  These cool kids have moved onto ASP.NET MVC which follows a more traditional and honest web development model.  It is now a commonly agreed perception that Webforms is a leaky abstraction directed totally at VB6 developers who could not leave the paradigm of statefull VB6 forms behind them.  

Let me illustrate this with a vignette from my employment history…….

I worked as a consultant for a leading educational software provider in London (I am so tempted to mention them by name)  were they had an army of old VB6 developers gleefully and eloquently creating heinous crimes in the field of web development that are analogous to Hitler's holocaust.  Their ignorant approach was to use datasets bound to datagrids throughout the application, not only was the average page size gargantuan with ViewState multiplying exponentially with every postback but they stuffed everything in the Session which was stored in SQL Server.  It was truly unbelievable that something so ugly was being used by the leading educational organisations of the UK.  This is a fairly common web forms shop were square pegs are hammered into round holes who develop time bomb websites that are primed to explode in incendiary expansions of cash.  The very fact that they had to hire consultants like myself to unscramble the mess is testimony that this just did not work.  They got the website up and working quickly and then spent a lot of time and money rewriting it to perform like a high traffic website should.

The type of developer webforms is aimed at is the mission statement of the vast majority of Microsoft products, it is of course the drag and drop world of development.  You simply choose what you want from the designer and press F5, hey presto, you have yourself a piece of demoware software that is held together with double side sticky tape and string and has a shelf life of two days.  Microsoft loves this space, even Scott Hanselman has joined in with this more measured 30 minute application.  This is the developer who Microsoft are aiming this at.  This is the market that EF is marketed at.  They love this shit.  They like impractical apps in 30 milliseconds for shows like MIX.

In development, we often talk about personas, a persona is a mythical user of the system who has the traits of the type of user the software is aimed at.  Let us create the persona of a Silverlight developer, we will call him Bob.  Bob is a lazy fuckwit.  Bob has no real interest in development or doing things right, Bob just wants to cut and paste code from Google whenever he is stuck.  Bob does not look up from the developer world that Microsoft has painted for him, he would never dream of looking at another web framework in order to foster some new ideas.  Bob hates JavaScript and CSS, he has absolutely no interest in learning them.  Bob loves other languages, as long as they are C#.  Poor hapless Bob could not even compile his code if you took Visual Studio away from him, he only ever uses the command line to issue the iisreset command.  Bob will never develop anything that cannot be developed in Visual Studio.  Bob likes the designer surfaces of Visual Studio.  Bob sees Silvelight as a shortcut to browser development which means he can stay totally in the world of C# and not have to learn horrible JavaScript.  Bob has heard of the jaw dropingly cool JavaScript framework called JQuery, but Bob has no idea how something so popular could be written in anything other than C#.  Bob will stay in his blinkered hole, unaware of the outside world that truly is changing to a brave new world.  Bob is exactly who Microsoft want in their development army.  Microsoft do not want you to develop in anything other than Visual Studio or perhaps Expression blend.  They do not want you to learn the ubiquitous browser display language of HTML, they do not even really want you to learn XAML, they want you hooked on your inability to do anything outside of a designer.  Are you a Bob?  Do you ever lift your head above the one world view of visual studio?  I will move onto XAML in a future post but I want to put forth the conspiracy theory that Microsoft prospers from your own inadequacies.  They want you to have a reliance on Visual Studio in the same way as a super fly pimp guy wants his ho's dependant on heroin to gain their dependence.

Another conspiracy theory I have is that Microsoft has got cold feet over IronRuby as it might lead to a further brain drain of the developers formerly known as ALT.NET.  More and more of these guys have had enough after tasting the crack cocaine of Ruby on Rails that gives the addict, the feeling of how efficient a web framework can be.  The IronRuby story is getting picked up by some but not many.  I do not expect to hear Microsoft making any big noises about IronRuby on rails anytime soon.  The majority of the posts I have seen, show how to use IronRuby used with WPF!!  You could not make it up.  I found this example which passes for great ironic humour were the author sets out to show how IronRuby can be used with sharepoint.  Ironic IronRuby on rails is a more fitting title for this total farce that just goes to show how Microsoft or indeed its developers do not get Ruby on Rails and are instead shoe horning IronRuby into impractical and ridiculous places.

In writing this post, I could have very easily just reworded Steve Jobs post about flash and do a search and replace on the word flash and replace it with the word Silverlight.  The arguments against Silverlight are just as valid as those against flash.  I will simply link to the post and let you judge for yourself.  Instead of rewording that post, I wanted to take a different slant on why you should hate silverlight.  I want to paint a warning to anybody actively indulging in silverlight development that you could be making a serious career wrong turn.  The world is changing and HTML 5 is the actual brave new world that Silverlight claimed to be.  By staying in Silverlight, you will be learning skills that cannot be transferred to any other platform.  If you know HTML and JavaScript, you can easily take these skills with you from platform to platform.   Spending every waking hour knee deep in Visual Studio and only ever developing in C# will make you a shallow uneducated developer. 

I think it is worth noting that Microsoft is getting wise to HTML 5 and are now fully embracing it in IE9 with some demoware here.  Do not expect Microsoft to do anything less than drop Silverlight like a stone if HTML 5 is popular on IE9.

There are enough posts written about the joys of HTML 5 for me not to bother mentioning its freshness and newness.  Yes, it is turning into the catchall for anything web related, just like web 2.0 did and apple's HTML 5 is in someways just as proprietary as silverlight but this is the future of the web.  JavaScript and CSS have had a resurrection, not the flaunted death.  The talent of the JQuery team are testimony to who are now developing JavaScript.  Are these similar types of developer drawn to Silverlight like a moth to a flame?  Are the likes of Jim weirich singing the praises about RIA and oData? I think you will find nobody of any note is drawn to this platform in the same way as tired Java developers fled to Ruby on Rails.  oData is another tenant of the strangely name RIA platform.  What oDATA has done to the ATOM specification is nothing short of rape and yet another reason to be truly repulsed by RIA services. 

We no longer need these ugly plugins that do not play by natural browser rules, alienating themselves like inner city ghettos in no go areas of the web page.  We as developers need skills that are transferable.  There is a world outside of Visual Studio that can only progress you as a developer.  Or are you a Bob, blinkered, ignorant and tied, like a dependant crack addict to the rocks of Visual Studio.  Don't be a follower, don't be a sheep and learn to think for yourself.  The pragmatic programmer book stated that you should learn a new language a year, how about learning a language outside of Visual Studio?  If this scares you then you need to seriously do some soul searching or maybe go and work with Bob.

Next I am going to rant about the truly, ugly mess that is XAML.  XAML is an xml grammar that cannot even be defined in an XSD schema because it is so ugly.  XAML is like XHTML only it can crash an IDE.


  1. Hmmm... Hmm... quite a self important most-other-developers-are-idiots style flame-bait post. Adulation over the not-complete-or-even-really-available html5 is somewhat premature and just as hype ridden as you deride silverlight for.

    All that aside the development experience for Silverlight (not restricted to Javascript, browser differences almost entirely abstracted away, large set of APIs available *now* in all supported browsers) are the raison d'etre of Silverlight and not in the slightest diminished by any points you make.

    Market penetration for Silverlight is around 50%, so I'm still not sure I'd use it for a public web app - but it is great for business apps.

  2. @Michael,

    All the latest JavaScript frameworks mask browser deficiencies to a pretty high degree. Apple and google are banking their future on HTML 5 and MS are now following suit. I think we can say that this is for once not all hype. I agree it is a long way off being ratified. Silverlight and flash give you proprietary, non-transferable skills. I think they represent a wrong turn in browser based development.

  3. Well, I was able to "transfer" from a desktop .NET development job *to* a Silverlight development job - so "non-transferable" skills is incorrect. A big factor was the architectural and general development skills I learned which are "non-proprietary".

    If you only learn "proprietary" skills when using any set of APIs then it doesn't matter which tools you happen to be using 'coz you aren't learning much anyway.

  4. @Michael

    When I said transferable, I actually meant away from .NET.

    As I said in the post, it is useful to see the world outside of Visual Studio.

  5. I don't think the author has ever done hardcore Silverlight or Flash development. By hardocre I mean working on a project like
    Flash programming is not a skill. Silverlight programming is not a skill. Interactive development is a skill. And great interactive developers will find their way to use HTML 5 or Silverlight, or Flash. You can learn the syntax and basics of any of these languages in a couple weeks, maximum months. (Btw Flash can be used on all platforms, except iPhone... It can also be used on the Desktop with Air.So I don't see in terms of the author's knowledge why this would be less transferable knowledge...)

    HTML 5 is not yet widely used because the penetration of the appropriate browsers is too low. The standards are quite chaotic right now. Nor we, or the big companies are going to write the future. We can not say what is the future or what is not. It's just a wrong debate.

    And my question is, why is the author "hating" flash or silverlight apps? Or is he meaning the crazy full-flash sites, and banners? Does he thinks if there will be tools for HTML5 designers won't do this madness?

    I'm excited about all of these technologies. They are tools for us, developers, to create rich experiences. But as long as HTML5 is a "myth" (E.g. apple's HTML5 demos that run only under Safari) I'd like to take my time and wait until being so harsh.

    Because maybe in the next years we will not need different plugins to browse the web, but many different browsers..

  6. Can't wait for XAML rant...

  7. Thanks for the information, we will add this story to our blog, as we have a audience in this sector that loves reading like this” web development

  8. Superb blog and i really like it. Thanks for sharing useful information.
    web application development india

  9. "I want to paint a warning to anybody actively indulging in silverlight development that you could be making a serious career wrong turn"

    This is exactly what i felt, the first day i had to work on a C#/Silverlight/Outlook project 2 years ago. That day i quit and picked up RoR, recently Scala/Lift and i must say, my love for coding has only increased since then. There is so much new to do , read, understand outside the microsoft world(i am happy i dont have to use their drag/drop, right click, doubleclick frameworks)

  10. I really hope the web will one day be "pure" enough for you and you can code in the ultimate most open source non MS purest of the pure code all written in notepad and compiled only using dozens of terse the meantime I'll be making money and using whatever tool makes me the most in the least amount of time.

  11. With that attitude, you might as well use sharepoint.

  12. Oh hai thar.

    This is me, kitzypop, asking you would you pleez use spellchecker.