Is Silverlight the new WebForms?
General By Dave Ward; Posted September 14, 2009
While there’s no question that HTML, CSS, and JavaScript form the foundation of modern web development, achieving fluency hasn’t been easy for everyone. In particular, the transition from stateful development with pixel-precise layout – such as VB6 offered – has proven to be especially difficult. HTTP’s stateless nature and HTML’s relatively imprecise layout present a new, different set of challenges.
WebForms aspired to insulate us from those inconveniences. Promising rapid, drag ‘n drop layout and event-driven programming, WebForms was an attractive choice for anyone struggling with web development closer to the metal. Unfortunately, it has become apparent over the years that the WebForms abstraction, while convenient, can easily cause more problems than it solves.
More recently, Silverlight’s WYSIWYG layout and choice of familiar CLR languages have made it a similarly enticing alternative to HTML, CSS, and JavaScript among some .NET developers, but is history repeating itself? Are we leveraging Silverlight to move the platform forward or is it being used as another crutch?
Specifically, I want you to consider three areas that are negatively impacted by overzealous use of Silverlight: Usability, accessibility, and maintainability.
Usability
The Microsoft Thrive for Developers site (which has some great content) is what originally motivated this post. I’ve been percolating these concerns for some time, but my initial experience there served as a lightening rod for them.
After landing on the page, I was greeted by this progress indicator and watched it load for several seconds:

Expecting something worthy of using Silverlight, I was content to wait on the Silverlight to load. Unfortunately, the entire thing turned out to be nothing more than a simple horizontal accordion:

Even forgiving the excessive load time, these Flash/Silverlight-based horizontal accordions are a plague on usability. If you put something in my browser that looks like links and images, it should behave like links and images!
A partial list of the various usability problems that arise include:
Context Menus – When I right click a button intent on opening a link in a new tab or window, seeing a context menu with a single “Silverlight” option is not a good experience. Eliminating the standard context menu defeats several features that you may not use, but some of your users do.
Similarly, when your site thwarts the gesture plugin I use, you’re only hurting yourself. When I can’t drag a site’s links into background tabs without interrupting what I’m doing, I’m far less likely to view as many pages as I normally would.
Browser History – Just as with WebForms before, fully Silverlight based sites break the browser’s expected history, navigation, and bookmarking features by default. There are workarounds, but it’s uncommon to see them actually used.
Text Field Interop – Because Silverlight TextBox controls are not HTML input elements, they sacrifice a wide range of functionality, from password managers to the ability to drag ‘n drop selected text to and from these fields.
Using these islands of Silverlight reminds me of the usability of WebForms Buttons and LinkButtons used for navigation, which have the same problems. It wasn’t a good idea to break the browser’s basic functionality then and it still isn’t now.
Accessibility
It’s no secret that plugin-based technologies like Silverlight obscure their content in an inaccessible manner. Tempting as it sometimes is to turn a blind eye to this problem, accessibility is something that everyone should care about.
Though Microsoft is taking great steps to mitigate Silverlight’s accessibility issues, by embracing the W3C’s ARIA initiative, ARIA is no panacea. It is a compromise to improve the situation, but not a solution to the fundamental problem. In fact, the W3C’s first recommendation when building an ARIA compliant application is:
Use native markup when possible.
Use the semantic elements that are defined in the host markup language. For example, with HTML or XHTML, it is better to use the native checkbox than to use a div element with role
checkboxas these should already be accessible through your browser.
Even if every one of your site’s users are without physical impairment, accessibly designed sites yield a variety of other benefits as byproducts. For example, what do you think a search engine spider will glean from this markup?
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" style="width: 775px; height: 273px;"> <param name="source" value="xap/ThriveSilverlight.xap"/> <param name="background" value="transparent" /> <param name="windowless" value="true" /> <param name="minRuntimeVersion" value="2.0.31005.0" /> <param name="autoUpgrade" value="true" /> </object>
Probably not much. At least it might rank well for application/x-silverlight-2.
Now, compare that to the semantic HTML markup that might be used to implement the same functionality with a bit of CSS and JavaScript:
<ul> <li id="Advance"> <h2>Advance Your Career</h2> <p>Take control of your career path. We've got industry experts and developer community leaders to give you a hand.</p> <a href="Advance/CareerResources"> <img src="GetCareerResources.png" alt="Get Career Resources" /> </a> <a href="Advance/TrainingCert"> <img src="GetTrainingResources.png" alt="Get Training Resources" /> </a> </li> <li id="Enhance"> <!-- More content here --> </li> <li id="Connect"> <!-- And again --> </li> </ul>
The difference speaks for itself.
In the same vein, an application that exposes its content accessibly is one that is resilient to change. The ability to easily screen-scrape HTML sites has led to some of the most interesting and useful applications online.
Where an accessible app out often matures into something of a loosely coupled data source toward its end of life, walled gardens of Java, ActiveX, Flash, and/or Silverlight are too opaque to offer that lasting benefit after they’ve become dated.
(un)Bonus: Mobility
Speaking of accessibility, take a look at this same site on an iPhone, which has arguably the best default mobile browser currently available:

HTML 5, CSS3, and JavaScript are probably the future for several classes of mobile applications. In fact, mobile support can be as easy as dropping in a new view for each device. Something like the (awesome) Chipotle iPhone app could just as easily be a mobile view using jQTouch.
With the growing ubiquity of devices like the iPhone, Palm Pre, and Android-based handsets, catering to mobile browsers is becoming an important consideration. Even if it’s still a minority use case (for now), users gravitate to sites that do work well with their mobile devices in that occasional pinch.
Maintainability
Long-term maintenance is a critical consideration when using plugin-based tools.
Think about all of the decade-old web applications that your business or clients are still keeping alive today. How many of them encapsulate important functionality within ActiveX controls? Probably almost none, and there’s a good reason for that.
These monolithic rectangles rot at a frightening rate. Maintaining plugin-based functionality entails more friction and a less widely available skill set than updating HTML markup, tweaking a CSS stylesheet, or changing a JavaScript include. More often than not, these opaque rectangles simply fall by the wayside over time, and might as well be chunks of the website written in COBOL.
If segregating functionality into plugin-based walled gardens was a good idea, we’d still be using Java applets for rollovers in navigation menus.
Silverlight and WebForms aren’t the problem
To be perfectly clear, I think Silverlight is great.
Given the choice between Flash or Silverlight video, I’ll choose Silverlight every time. The video playback is smoother and Microsoft’s great development tooling tends to encourage feature-rich player applications. Even with HTML 5’s <video> element, browser-native video can’t currently compete with Silverlight.
Given the choice between developing an internal dashboard in Flash or Silverlight, I’ll choose Silverlight every time. The charting controls already available even after Silverlight’s short time on the market are awesome, and only getting better. HTML 5’s <canvas> may eventually become the best solution for this, but it’s going to be years before that’s a feasible reality.
There are plenty of scenarios where I think Silverlight is perfectly valid. Though it might be easy to take it that way, this is not an anti-Silverlight (or Microsoft) post.
In fact, I think WebForms is fine too.
Used responsibly, WebForms is still a useful and productive abstraction – especially with the great improvements coming in ASP.NET 4.0. There are plenty of times when something like Dynamic Data to scaffold an administration interface is a smart choice.
Conclusion
Bottom line? You should use idiomatic HTML, CSS, and JavaScript if they are at all able to accomplish what you’re trying to do. Embrace the platform.
More specifically, not wanting learn JavaScript is not a valid excuse for pretending it isn’t the Lingua Franca of the web. Many even find, to their surprise, that they enjoy JavaScript once it’s paired with a library like jQuery to abstract away the DOM. Using the tools currently available, it’s easier than ever to learn too.
Having keenly watched the ebb and flow of web technologies over the past fifteen years, I’m comfortable predicting that an investment in learning the underlying basics is crucial if you’re serious about developing for the web. Anything used to avoid this fundamental understanding is a crutch, not a tool.
Similar posts
What do you think?
I appreciate all of your comments, but please try to stay on topic. If you have a question unrelated to this post, I recommend posting on the ASP.NET forums or Stack Overflow instead.
If you're replying to another comment, use the threading feature by clicking "Reply to this comment" before submitting your own.
5 Mentions Elsewhere
- Tweets that mention Is Silverlight the new WebForms? | Encosia -- Topsy.com
- DotNetShoutout
- DotNetBurner - Silverlight
- Steven Gardner Blog :: stevengardner.net » Blog Archive » Silverlight – The New WebForms?
- Visoft, Inc. Blogs | Data Access and Silverlight 4




Excellent post.
Very well written.
Great post. Most of the content that I see in silverlight can be done using html & javascript. Silverlight is only a tool. As developers we need to be better at making the decision to of when to use silverlight. If I were to guess, I would say the two biggest reasons for inappropriate use of silverlight are:
1. Lack of skills required to get the same experience in html & javascript.
2. Taking the new tool out for a spin.
The biggest ideological difference between WebForms and Silverlight is that state, in Silverlight, exists client side. Where-as state on WebForms was server side and was really a monkey patch on-top of the stateless HTTP protocol. Silverlight is really more like a web-enabled app that just happens to live in the browser. The same cannot be said for WebForms.
Doesn’t JavaScript run faster in Silverlight? Also, isn’t there more support for rich media like video in Silverlight?
JavaScript runs in the browser. Silverlight talks to the browser’s JavaScript, and is controlled by the browser’s JavaScript.
Video is rendered by Silverlight – and yes – Silverlight has more support for video than the browser.
Great post!Silverlight is completely break browser experience intentionally-it place itself in position of browser of the future(IE10/11=Silverlight 5/6?).It has simply have to go long way,before it becomes any useful.
Nice to the point-Silvelight compensate lack of video support in browsers,but completely ignore “legacy” features.It simply customizable video player for web:)Sad,but true…
Thanks Christian, and thanks Dave for a very insightful article. The biggest question I have is why Microsoft didn’t stress the fundamental differences from day one – I have lost much time trying to get my head around Silverlight and have come to the same conclusion that the HTML5/CSS3/JavaScript triumvirate is the way to go as we move forward as Web Developers :-)
Great post, I agree, people need to be very aware of the tools they choose to complete a task, sometimes Silverlight isn’t the answer when simple JQuery should be used, but for some rich RIA apps using video or lots of animation then it is.
WebForms however is never the answer ;-)
“WebForms however is never the answer ;-)”
Bullshit.
Lots of web applications have been developed using webforms. If you prefer some other development environment/platform/language so be it, but that doesn’t mean it isn’t any good.
DHTML, ASP.Net, & Silverlight are compimentary tools. They are not replacements for each other.
I think it’s hard (particularly w/ line of business apps) to write the best app w/o leveraging all of these platforms together.
Silverlight excels adding rich stateful content such as datagrids and allowing server code and business logic to be reused and run on the client.
But it is a mistake to create entire apps in Silverlight and ignore the places where HTML/CSS/JS and ASP.Net can offer a better, lightweight, more accessible experience.
Good post but I thought I should mention a couple of things. MS have made progress around accessibility – for example, it is possible (via UIAutomation) to expose controls to the likes of screen readers etc. You also get access to SystemColours to make sure your app responds to user’s individual settings.
There is also improved navigation support allowing you to specifiy url’s that target ‘pages’ within your SL apps.
In general I think the issue is that we haven’t yet found the sweet spot for SL. We know it’s more than a media player but we should also know when HTML/CSS/JS is a better option. I see the future of SL being to targeted users who require a rich, dynamic, lots of business logic, highly interactive application that benefits from being delivered over the web.
What compelling reason would I have to put my business in the presentation layer (browser)? Is SOA the only route to go here?
It looks more and more like a choice between Web Forms and MVC depending on the situation, with Silverlight only being used in exceptional, media-rich apps.
Good post.
I think the question isn’t Silverlight versus webforms, it’s Silverlight versus Windows forms.
Best of both worlds could be mix of HTML/XAML a’la SVG in some browsers. In general,I see too much XML-XAML is too verbose(too much noise),to be really useful.It try to put all concepts under XML umbrella-not really nice.How about rake,fluent nhibernate,CSS and alike DSLs? MS forget history with XML,and it repeats.
Beside of all complaints,HTML5 on Silvelight could be very useful IMHO.
There’s no desktop in “future”,
remember?:)
Dave,just take look at Gestalt,it seems,MS is very interested in that project-it maybe future of SL.
Thanks.
There might be information in the ThriveSilverlight.xap file that a search engine could look at and index.
Which isn’t to say I’m a Silverlight fan…just sayin, if Google can index some Flash content, it can probably index some Silverlight content.
That’s true, you’re right that they’re indexing inside SWFs now. Doing that misses so much semantic context, as compared to good HTML markup, I don’t think it will ever be very competitive in practice though.
Amen. It is so good to hear someone say this.
Very good post.
I still scream silently when I hear a developer say “I can’t do that because I don’t know JavaScript” but is then prepared to spend 6 months getting to grips with Silverlight to provide a website with text input, buttons and links.
Or you get to test some monumental Frankensite of Telerik and Web Form horror which has all been thrown together in a visual IDE with no regard for the underlying technology – leaving the browser to groan under the weight of massive scripts and stylesheets, duplicate page requests and hundreds of KBs of ViewState. “It doesn’t matter because it’ll get cached”, they say. “You haven’t enabled caching”, I say. They reply “I don’t know how to do that and I don’t have access to the web server to change anything” – and my head slams into the desk yet again.
There needs to be a minimum standard of ability/understanding of the fundamentals for web developers – you wouldn’t get away with such amateurishness in any other engineering discipline.
I agree with you that there is relationship between Silverlight and WebForms. In fact, I would even dare to say that Silverlight is WebForms approach done right.
What I mean by that is that WebForms tried to abstract and hide web guts (stateless and content) but they were still there so when era of Ajax have arrived – this all collapsed.
Silverlight is doing this time the right thing – getting rid of the web guts entirely so nothing to abstract\hide any more while all of the productivity gains and DEV scalability is there.
There is nothing wrong with using designers over the typing in HTML (presuming designers are working fine like in case of Blend)and I am pretty sure they would get maintainability (Prism is good step toward that), mobile platform, accessibility, browser integration etc. As far for the skill sets being generally less available then css\jscript\html that’s true but considering the fact how much MS is betting on Silverlight as soon as plugin adoption would grow above 80% (which would happen sooner or later) you would have ton of programmers who would prefer c# over jscript, reusing the skill set in desktop programming, no more “18 different technologies” need to be learned make a web page etc..
That all been said, IMHO in the future I still see html/css/jscript being widely used but more for content centric sites while all of the web app type of sites (currently done with heavy ajax jscript coding) would migrate to more cost effective platform – Silverlight
Great post, Dave. Usability and accessibility are indeed major problems with Silverlight. For playing video clips, it’s probably the best choice, though.
Hi Dave, good post. But to me it looks like developers are little spoiled and don’t want to learn. As soon as we get into smallest problem we give up and say that technology suc…
When you look into development of some big web app you will end up using 4-5 different technologies (HTML/ ASP/ JavaScript/jQuery/css) and what is the best you will never make it to run in it all browsers. And people say it is great, which is little unbelievable to me. I’m not saying it is bad, but still far away from great.
Finally MS is giving us unique platform which is already working for medium scale solutions and you still can find people that say it is not good, it is not working and it is bad. Actually lot of people on Internet say that it is bad and they haven’t work with it for more than a week.
As I can see it, Silverlight has promising future especially if MS continue to push it as they are doing now…
Right now Silverlight is the best option for RIAs. Thanks to your post, it will be very helpful to the Silverlight Developer Team to improve the next versions of the platform.
I love both technologies (Flash and Silv) as I’m a web designer working with a huge team of developers.
David Vera.
There are some things WebForms does well. One of them is rendering differently based on your browsercaps. If you use any html generation framework you have to think about what kind of html is coming out (Sometimes) and often the rendering ability of web forms will take care of that for you.
The problem, and it’s a serious problem, I have with web forms is ViewState. Sure you can offload it server side, etc, but the default behavior is keeping state for all of the controls on the page in a LOS encoded field. So many folks have a total lack of understanding for how it works makes web systems not only slow, but sometimes un-scalable. By hiding the fact that we’re indeed using a stateless platform, you’re encouraging all of the nasty little bugs that arise therein to show up, say, on the day of a release.
I know it’s up to the developers to know what is going on, but with web forms, there exists, and is encouraged by default, a culture of ignorance about what is actually happening, and in turn, what can go wrong and how to deal with it.
As for silverlight, it’s great for what it is: a tool to do media rich/intensely interactive content when necessary. It’s not a replacement for anything. it’s an extension.
Quite possibly the best thing to happen to asp.net has been MVC. The day I see sharepoint support MVC officially is the day I will jump up and down again about how great the windows platform is for developing scalable and maintainable enterprise applications.
And by the way, I wholeheartedly agree that JQuery is the shiznitlebiznang.
Silverlight screams proprietary tools whereas html and the other are standards of the w3c, so anyone can use them. I think that to say that the future of the web ria is in the hands of only one company is very bold.
I agree with just about everything in this article, but I want to add something that I think is missing from the discussion.
There is a big difference between web-sites and web-applications. I am a strong believer in not using Silverlight for web-sites but I don’t think the same goes for web-applications. Web-applications are becoming more and more a substitution for the traditional client-server solution, not simply web-sites + ajax.
If you think of Silverlight as bringing windows applications closer to the web and not as a way of bringing the web closer to windows applications (this is the problem with webforms), then I see no problem in using it.
I agree with Orion – WebForms only pretends that i can behave like a desktop app, Silverlight actually can do it!
Don’t get me wrong, I’m a fun of a jQ/DOM too.
“fully Silverlight based sites break the browser’s expected history, navigation, and bookmarking features by default. There are workarounds, but it’s uncommon to see them actually used.”
In SL3 you have deep linking support…
Deep linking support is nice, but how many sites will devote the extra time to properly implement it? It’s a non-trivial endeavor, especially if you support browser navigation instead of just bookmarking.
As with AJAX history support, you’ll probably only see a small fraction of Silverlight based sites include a good history implementation.
As all … support exits but not everyone uses all features…
As result those who do use have better software and UX
It’s hard to do the best yet is pays well.
As for SL3 I think the best place for it is replacing smart clients: simpler deployment.
Building a good UX in html+jquery can be harder than with SL3.
For LOB i just think of SL3.
Is it harder to learn standards based approaches (like HTML and JavaScript/jQuery) once, or to continually apply bandaids like deep linking to every project?
It’s the same sort of choice we faced with WebForms, but I think that too many of us have forgotten that the “easy” abstraction comes with hidden baggage.
WebForms are the wizard programmers dream (just click next, next, next). Easy to use, and the Update Panel… is for most part like dream come true.
Yet as you say there’s a price to pay.
With users demanding more and more complex UI / UX it’s less ans less the best solution.
Nowadays we are looking for other paradigms (ASP.NET MVC + jQuery + REST is each time more a great tool)
For me it’s clear.. LOB = SL3 all the rest MVC.
The price of implentation is bigger but down the road it pays well
Great article, and a lot of the issues need to be addressed by the SL team.
However, you simply can’t keep comparing apples to oranges. SL’s value is not in becoming a better HTML Browser based application. SL’s value is bringing a desktop application to the web, actually what it should have been from the start of the internet.
HTML will always be used for simple apps, but it will never make it to higher end apps where you need threading, IOC, Testability frameworks, and other modern coding and development practices.
SL 4 is a great step in the right direction, but it’s still baby steps. However, I finally feel that I can deliver value so much greater than the HTML/CSS/Javascript apps we’ve been delivering, that it’s really worth it to customers.
Finally, I still use Javascript to provide a language for users to dynamically automate server(Webservices) processes. Javascript is decent, and is at least a language every web developer should know… long live Javascript!
Don’t misunderstand my point. I’m definitely not saying that Silverlight is bad. I wouldn’t dream of suggesting that something like the Winter Olympics player should use HTML5 video today, for example.
The problem I see isn’t with the technology, but with developers who use it as an excuse to avoid mastering HTML, CSS, and JavaScript (hence the WebForms comparison). Examples like the simple horizontal accordion I provided are just like using Java applets for navigation rollovers. Indefensible.
The idea of using Silverlight as basically WPF-lite + ClickOnce that actually works is interesting, but it’s also important not to confuse that with web development. It’s not that the Internet never fulfilled it’s destiny of being delivery mechanism for thin-client apps to mimic the desktop; we’ve already been down that road with ActiveX and Java applets in the late 90s. That is a largely failed model for all but apps which require elevated permissions and/or access to hardware. Aside from the tremendous marketing effort behind Silverlight, there’s no reason to believe it will fare better than its predecessors in that area.
Silverlight is still phenomenal for things like video though. I’ll take SL video over Flash video every single time.
I cannot help but feel that Silverlight’s raison d’etre is not solely based on Web apps. I think Microsoft has yet to reveal its hand on where Silverlight will eventually fit it. It’s got to be about the combination of “TV/PortableDevice/Web” and where that will lead us in the coming years – we have to look at it as an all-encompassing technology in this context. I also think that it’s no coincidence that Microsoft has been buying up TV-related assets even before Silverlight came out… just a thought ;-)
The phone implementation could definitely be huge. Silverlight and Blend/VS are a dream compared to Objective-C and Xcode. No question about that.
I still wouldn’t want to see developers using mobile Silverlight as an excuse to avoid lighter, standards-based alternatives when the full power of Silverlight isn’t required. Using slightly modified views and/or a library like jQTouch is often all that’s necessary to provide mobile versions of existing LoB apps. The day one of my clients’ CEO bought an iPhone, I gave him an iPhone native-looking mobile version of his dashboard with jQTouch. That beats all the gratuitous animation in the world.
Great article.
I agree with the sentiments many of you have commented.
Web forms is hacky for “web sites”. But if designed well, extremly good for data heavy LOB apps, Dashboards etc.
As someone who spends the vast majority creating LOB apps, i see silverlight as the way to go. With V3 it’s becoming very relevent for b2b and Lob scenarios. ASP.Net MVC is too young for some the business requirements we have.
I’d be curious what business requirements Silverlight satisfies that MVC (or WebForms) doesn’t.
For a basic example (no exageration):
A dynamic listing of data grids, all indiviually, editable, pageable and sortable. With the user given the ability to load additional grids into the dashboard and submit all the data from all grids into a single service submission. Charts indicating data fill also required in the dash board.
90% > unit test code coverage of presenter / view model operataions must also be acheived.
For scenarios like this, id definently pick silverlight (with MVVM) or webforms (with MVP) over MVC. Im sure an MVC guru could get it happening, but I doubt it would be pretty.
Personlly I think if you start to have in the View (.aspx) you are going down a bad track, as this conditional logic is untestable. But thats just my preference of MVP over MVC patters.
In MVC, you shouldn’t have that conditional logic in the view. Your controller would compose appropriate partial views, which is testable.
I agree that the WebForms MVP pattern is nice too. Even without implementing a strict MVP pattern, it’s not difficult to use WebForms well if you avoid things like the *DataSource, GridView, and LinkButton controls.
I think I mentioned it explicitly in the article, but the point of this isn’t that WebForms is bad. The point is that using Silverlight as a crutch to avoid learning web development is exactly the same mistake that many VB6 developers made a decade ago with WebForms. In that sense, using Silverlight just to avoid learning HTML, CSS, and JavaScript makes it the new WebForms.
This one isnt fair as only SL can do this, but we are also getting requests to be able to work offline while people are on the road then submit data when connected again. SL3′s Out of the Browser can support this.
Native offline storage is easy enough with Gears (which is being deprecated in favor of HTML5′s standards based storage; even better.).