RIA The Death of Server Page Development
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.


