RIA The Death of Server Page Development

March 26th, 2009

A good friend of mine and fellow Elegant Coder forwarded me an article the other day, Silverlight 3 might kill Windows Presentation Foundation, and wanted to know my opinion.   This article is interesting but I think they have it slightly wrong.  I do not believe people fully understand the technologies and how they stack up together or should I say work together because they do work together quite well!    

There are clear distinctions and usages for both WPF and Silverlight with a clear roadmap from the product teams.  But do not take my word for it. Here are two very good videos from Microsoft about these technologies:  

The first from Scott Guthrie Inside Silverlight 3 and the second from Jeff Wilcox Sharing Skills and Code with Silverlight & WPF 

Now, before I jump on my soapbox on Server Page development and its demise it is probably important to clarify a few more distinctions between Silverlight 3 and WPF.   First, I am ecstatic that Microsoft is doing everything in their power to make the programming experience between their two XAML based platforms more seamless. But there are some big differences that help a developer decide between the two.

Silverlight 3 is an RIA (rich internet application) platform product and as such means that it has certain limitations by design, mainly the browser security sandbox. Yes, Silverlight 3 can run outside of the browser now, but it still has the same security restrictions applied, it cannot run as a full trust app, it cannot take advantage of ClinkOnce, which is very important for certain business needs.  The Silverlight framework is lean and mean which is awesome and needed for an RIA based application that has to compete and utterly destroy FLEX/AIR (that is the goal right).  However, these lean frameworks come at a price.  Silverlight or FLEX cannot achieve the same performance levels as WPF running under the full .Net framework in full trust mode.  Complex engineering/manufacturing/etc. systems will run much more performant, with a greater set of capabilities under WPF.  

At my particular place of employment almost all the systems we build are expert systems that at some point will require modules which need to import large amounts of data from other systems for local manipulation and processing.  We also find ourselves having to have local data stores with sync capabilities against the master DB i.e. our engineers and power users can work in the field for days at a time before reconnecting.  WPF has to be used for these scenarios.

All other scenarios Silverlight is more than adequate to handle and is preferred.   This is a total guess on my part but I bet it is at least a 20 to 1 ratio between Silverlight vs. full WPF in terms of applications produced.

My company has a very successful Adobe FLEX development team.  I have seen first hand how powerful the RIA FLEX/AIR platform has become.  They have successfully met all their deadlines and under budget.  More importantly, the quality of the applications produced by our FLEX team has been outstanding.  FLEX has not been able to replace any of the more complicated think client expert systems (as no RIA can) but our web apps are a whole other store.  They replaced all there classic Server Page based applications (JSP and PHP) with much more capable and performant FLEX apps. 

As the .Net team lead at my company I HAD grounds to be nervous.  These are not successes an old .Net programmer wants to see from the competition so to speak. 

What my team is actually doing at work is NOT choosing between the Silverlight and WPF platforms.  We build both a WPF and Silverlight client using the PrismV2 or I should say Composite WPF and Silverlight Guidance as well as the CSLA Business Object framework to make the job even easier when working between these products. 

We start with the WPF project.  That is where all the base classes and lower level API stuff is created, i.e. the Model(s), Controller(s), ViewModel(s) and Services.  Then we create the Silverlight project and reference all the libs from the WPF side of the solution.  In some cases we can even share the same XAML Views but in most each project will need its own set of views.  Using Prism and CSLA we can bridge the shortcomings of Silverlight, i.e. its commanding, tunnel eventing and data binding models do not quite match up with WPFs power.  Prism and CSLA make these differences negligible.  At the end of the day, I would say I am getting almost 85% to 90% code reuse between our WPF client app and its Silverlight counter part.  Our clients get the best of both worlds with very little extra expense. 

As unfortunate as it is, ASP.Net does not stand a chance in my case with competing with the FLEX/AIR power house.  However, with Microsoft’s two very powerful XAML based products WPF and Silverlight 3 I not only stand a chance but can out perform the Adobe counter part quite easily.         

With Silverlight 3 I have already told our director that we will never build another Server Page anything (thin client) again.  No offense to our JQuery and AJAX friends but it has totally been obsoleted with Silverlight 3 and FLEX/AIR.  In my future, I do not see a need for ASP.Net developers.  I only want XAML developers to build me Silverlight (lots of them) and WPF (less of a ratio) apps.

I’ll admit these are bold words, but in a shop like mine where corporate LOB (line of business) app development is the norm RIA platforms have become the new King of the Hill with the occasional thick client counter part.   

Scott Nichols Esoterica

  1. March 26th, 2009 at 03:31 | #1

    While I agree with you Scott, I still see the RIA future that you are predicting is atleast couple of years or more away. I don’t see ASP.NET stopping any time soon!

    Also remember Microsoft is leaving out Linux machines, which may be a business decision in my opinion but it will ensure thin clients will always be around. Flex also doesn’t run seamless across all Linux Machines(need to check that, not sure!).

  2. Steve Sheldon
    March 26th, 2009 at 07:26 | #2

    I’m afraid I don’t buy the argument.

    I think this makes sense for what you are doing… a expert knowledge system where you have a lot of UI features.

    But it doesn’t make sense for everyone.

    It’s a bit like saying now that we have airplanes, the automobile is dead. Or my favorite… now that we have PDAs the desktop PC is dead.(predicted by Infoworld in 1997) They’re cooperative technologies, not competitors.

  3. March 26th, 2009 at 10:20 | #3

    Glad to see my title pulled in some hits and got a few responses. You guys are correct and I do not necessarily disagree. Server Page development (ASP.Net JSP, PHP, etc.) will be around for years to come. I guess the main point I have is that I think RIA platforms will pull more people out of the Server Page development arena than the Thick client space.

    In addition, my perspective is coming from a LOB development shop as noted at the end of the post. The dynamics are a bit different there i.e. you control your environment for the most part. The open free market of the web is a slightly different animal as we are all aware.

    I would like to comment on the old Linux argument. I did some consulting (help build an ASP.Net site) for a marketing firm a couple of years back. They spent some money on their clients behalf to try and find some accurate numbers for what percentage of the market does each major browser platform vendor hold. They liked MACs and were more concerned with those numbers.

    The end result was that ALL the combined Linux/Unix distributions combined had less than 2% market penetration. And of the Linux crowd a large majority of them have access to a PC or MAC. The end result for the client who was having us build an e-commerce site to sell their products was to only concentrate on PC and MAC browser compatibility issues.

    I do not want to start a holy war about the Linux/Unix browser story but from my experience customers who are looking for the next greatest thing to make them stand out amongst their competition really do not care a whole lot about the Linux compatibility issues. Especially when they see major fortune 500 companies totality revamping their sites with RIA products i.e. FLEX and Silverlight.

    Oh, and Both FLEX and Silverlight have stories to address the Linux crowd, granted they are a version or so behind.

  4. March 26th, 2009 at 13:57 | #4

    The Moonlight project http://www.mono-project.com/Moonlight has gotten a lot of support from Microsoft to create a viable “silverlight for linux” platform. Microsoft has supplied things like codec libraries and unit tests to the moonlight team so that they’ll be able to handle the content types and so that moonlight will be as compatible with silverlight as they can possibly make it.

    yes, moonlight still lagging behind silverlight, but at least as of now the silverlight is taking this issue very seriously.

  5. March 26th, 2009 at 14:36 | #5

    Let me know when you are done crafting your web service layer.
    I’ll be out back having a beer.

    Oh, and what, exactly, are you going to host this Silverlight application on?
    Interesting.

  6. March 26th, 2009 at 19:06 | #6

    Actually Chris old buddy, I will be about 5 steps behind you in the beer line. Using WCF and some custom templates in my code generator I can design and build the service proxy layer over my existing DAL objects quite easily and quickly. I do not use the crappy wizard in Visual Studio to build my WCF services. That is the worst thing anyone could do. I’ll need to blog on that one day. Granted my technique is not point and click as some of the solutions I know you work with but in under 2 days we build a fully functional SOA messaging layer which exposed all our DAL methods in SOAP, .Net Remoting, and JSON. I just love WCF!!!

    Not sure what you mean host the Silverlight apps on? Our Web & Apps servers are Win2003 host. PC and MACs running IE or Firefox run Silverlight just fine.

    Unless you are referring to web hosting companies. That is true, there are not a lot of hosting providers today that host FLEX or Silverlight. Although as a former partner in a web hosting company it will not take long for them to retool. If there is a buck to be made there will be providers fighting for the business, very competitive industry.

  7. Rad
    April 21st, 2009 at 14:14 | #7

    I also want to build Silverlight and WPF apps using Composite WPF and Silverlight Guidance and CSLA framework. I was wondering if you could share a sample application and your templates to build SOA messaging layer.
    If you can share anything please send it my email address.
    Thanks.

  8. April 21st, 2009 at 22:30 | #8

    I have some bad news and some good news regarding what I can share. The bad news is that I cannot openly share source from my companies apps. The good news is that I have abstracted out one of our systems which my company has no interest in maintaining intellectual property on. I plan to open source this code base on CodePlex. This system is called “Enterprise Services” and takes advantage of all the tools and design strategies I mentioned in the original Blog post.

    Once I have posted this source I will update the Blog post with the information on where to find it.

Comments are closed.