MIX09 Recap series part2 , what about WPF

In between all the positive feedback at MIX, there was a lingering question that I read a lot on twits, blog posts, and heard at the Q&A from some sessions and I think we missed it during our planning; I felt it is one of those “we can not see the forest cause the trees are on the way” mistakes.   Do you know what the question is??  

Yes, it is “With Silverlight out of the browser, is WPF dead?” ..

Here is my personal take as a person who spends a lot of time with both of these teams and with customers using the technologies ( very often at the same time):

WPF and Silverlight address different scenarios and though they look alike, it is unlikely that in the short-term, one replaces the other.

The long answer is that the scenarios each technology addresses are different enough that they have conflictive requirements.  
I see the choice between these two platforms as a trade-off between:

Size vs. Features
Full-trust (with native interop) vs. Secured or Sandboxed

Expanding even further:

Silverlight addresses our RIA needs. A good Rich Internet Application (RIA)run-time needs to be:

  • Cross-platform.  This likely means the frameworks can’t become too exploitive of OS specific features and can’t integrate that well with the host OS. It is a lot of work to create a comprehensive application  framework (like .NET) for cross-platform.
  • Easy to deploy and small in size.  Web technology needs to install quickly, and with no risk of disrupting the desktop.  When it comes to RIA frameworks, the trade-off between features and size is very tough. Compromises must be made when necessary (backing up my point that the framework is unlikely a full-desktop application replacement due to the size constraint).  
  • Secured (or better yet, sandboxed).   Internet software can’t be easily trusted because today there is no easy way to assign different trust levels across the internet.  It is better to run sand-boxed so users are safe, than to put desktop at risk, so most RIA software is therefore sandboxed. This is critical to the success of RIAs! 
    You can ignore it and get lucky (for a little while) but I think it will eventually bite those that do ignore it.  Microsoft has learned that lesson before, and we are not looking to compromise that again (ever?).  
  • Faster and richer than any thing standards and web-based software (else why use it?).

WPF addresses our Windows (desktop) application needs.  A good desktop application needs to be:

  • Exploitive.  If it runs on a single OS, it better take advantage of it. Features like desktop and shell integration, drag & drop, hardware acceleration, etc.   If the software runs on a platform that supports extended features like touch (in Windows7 or Surface), the app should embrace and support the features.
  • Comprehensive and Powerful. If the run-time is installed once,  there is no reason for it not to be a full framework ( full 3D, media, documents, accessibility, storage and databases, a complete end-to-end  framework that is not constrained by size). 
  • Trusted, verifiable, and secured.  If some one is installing software in their desktop,  they should verify who it came from and then (if needed) trust it to do its job.  If the application needs access to file system, devices, secure stores, sockets, etc.  this is the choice you make at install time; the goal is to trust the application to do its job. You installed the client run-time for that reason. If needed, the run-time can do work to ‘constrain’ the application’s permissions (like Partial Trust). Apps should explicitly declare intent and the permissions they require to run.
  • Easy to deploy/Easy to update/configurable.  I am not aiming for <30 seconds and < 5 MB download like a RIA run-time, but I have to admit Microsoft needs improvements on this.  I am optimistic here:
    • We recently added .NET 3.5 SP1 to Windows Update and hope that over time we get the majority of Windows boxes to 3.5 SP1.
    • With .NET4 we deliver on the vision for client profile.  It will be a 22 MB download, that runs side-by-side with all the other versions of .NET framework, so we will be able to use it on any box (not just clean XP like we have in Client profile with 3.5 SP1). 
      I hope the two combined get us to desktop ubiquity so people can plan a .NET app with out worries about how to install the run-time.
  • Manageable.   When we are talking desktop/enterprise software we quickly get into thousands of users,  controlled versioning, policies, software is centrally distributed , etc..  Desktop software that is installed is easy to manage.  RIA software that can be in caches, user stores, etc. is a bit harder.

Once you look at the above, it is easy to grasp why today, we do need multiple technologies to address both scenarios. Any one that tells you otherwise is heavily short changing you in one of these two scenarios (usually the desktop).  

We do need to acknowledge that RIAs need stickiness, and off-line launching, and that is why Silverlight Out Of Browser was created, I call this scenario the “off-line RIA”; and it is very, very different from the “full-trust desktop app”.

Three more reasons to explain why WPF will be around for a long while: 

  • WPF adoption is going well. We have a lot of partners doing WPF. If you went to PDC, we did a video with just a few of the partners doing WPF, it included Lenovo, HP, AMD, Autodesk, T-Online, Disney, Blockbuster, Roxio, SNCF, SAP, Terra, Cewe, and many others.   These are the types of partners that use WPF to connect with millions of users.  We have equal number of successes in the enterprise with partners who buy lots of Windows licenses and are very important to Microsoft.  We are not walking away from that any time soon.

Inside Microsoft adoption is also strong;  we see our business platform – the Dynamics team- using it; we have consumer apps like LifeCam and SongSmith, we have office apps like Semblio, our internal IT teams are using it, and our own development division is betting heavily on WPF to create Visual Studio 2010 and Expression Blend.

Announcement:  Starting next Tuesday (seems like a good day for recurrent series) I will try to start a new “blog series” similar to Tim Sneath’s “Great WPF applications” series; I am not as eloquent as Tim, but I am happy to keep you on the loop on some of the great WPF apps out there. I don’t think we do enough of sharing those successes(again, trees blocking the forest).

  • We are investing into the platform. You did not see that at MIX because most of the announcements were at PDC and we are now in the middle of the .NET 4 release, but you can watch Kevin Gjertadt’s MIX session and hopefully get the message that:
    • WPF will make the most important developer features in Windows 7 accessible to .NET developers.  We are talking Touch!! that is not a small feature. We also have ribbon, taskbar, etc.
    • We continue to improve the fundamentals. Performance and Text are good examples of significant investments in the .NET 4 time-frame. 
    • We thrive to improve deployment so every one can get full .NET Framework applications with much less friction. Details above.
  • WPF is the recommended UI stack in the .NET framework. There are a lot of people that need the full framework for their applications (Workflow, advanced Web services, encrypted stores, Office integration, parallelism, MEF, etc.)  Silverlight is a high-fidelity subset of the framework, and it serves quite well all RIA needs, but we can’t cram the rest of the framework into Silverlight.

In closing,  WPF will be around a while.  One size does not fit all, today. 

  • It is fair for MIX attendees to wonder about which one to choose, but that is mostly because MIX is a web conference.  These attendees do need off-line, sandboxed RIAs and I am totally psyched that we are able to meet their needs. 
  • For the other customers that need desktop applications that call native Win32 code, access to devices, or integration with desktop and office, then those customers will be able to use WPF.

The story on the WPF and Silverlight convergence is actually much better than this post discusses because here I aimed at explaining the different scenarios each addresses; stay tuned for Part 3 to discuss the synergies amongst Silverlight and WPF.

Comments

  • Anonymous
    March 30, 2009
    I am glad to hear that .Net 4 Client Profile will be approx 22 MB, and able to install to any PC. I am wondering how fast is the installation time. Also, would there be any improvement in Client Profile Configuration Designer? One of the reasons that people are moving to Silverlight development for small apps is because the current .Net 3.5 + ClickOnce installation experience is slow and terrible. And, I often receive complaints from my users for this.

  • Anonymous
    March 31, 2009
    Well said Jaime. I agree that WPF will be around for awhile, even if Silverlight might become a superstar. By the way, I think of it as "Full .NET framework vs. Silverlight" and not "WPF vs. Silverlight". Silverlight hasn't been only about WPF ever since it was WPF/E back in the days when there was no .NET framework in WPF/E and you had to code with Javascript. When you choose Silverlight, you aren't just foregoing some missing features from WPF, but the entire .NET framework and all the richness and productivity it provides that isn't crammed in Silverlight's 4.4 MB compact edition of .NET.

  • Anonymous
    April 30, 2009
    Development related: Persistence ignorance in the Entity Framework discussed with reference to the EFPocoAdapter