Tuesday, June 01, 2010

WPF – I’m Not Dead Yet!

I’ve been hearing a lot of people talking about WPF lately as it if was a poor elderly relative that is terminally ill. “Yeah, poor Fred, he always showed so much promise, but never really amounted to anything. And now he is on his way out…”

I think this perspective on WPF is rubbish, especially for the next couple years at least. Images of Monty Python’s Bring Out Your Dead scene pop to mind, except WPF is vibrant and ready for a marathon, not laying in a cart.

Part of the problem is that as developers we tend to jump on the newest shiniest toy on the playground and forget there are others that are just if not more capable.

The main reason for people talking this way is Silverlight 4. First let me start by saying I love Silverlight 4. The improvements made in this release are fantastic, and do significantly close the gap in capabilities between WPF and Silverlight. And for an awful lot of business and consumer applications out there, Silverlight 4 is now good enough to build those apps using Silverlight instead of WPF. So I am not in any way trying to bash Silverlight, just point out that it is not the only shiny toy on the playground.

The gap in capabilities is still there in substantial ways for certain scenarios that you can’t easily write off by just saying you will build all your business desktop applications in Silverlight now. At some point, maybe a couple more releases of Silverlight away, there will be parity. In fact, by that point, I hope and think the technologies will merge and for a lot of what you do you will just be using the same set of libraries from the framework, and will choose from a range of deployment modes for your application and its host. If that is the case, it doesn’t matter what you call it, it doesn’t make WPF any less relevant today. We already have somewhere between 60-80% code equivalence in WPF and Silverlight 4 depending on whether you focus on the core UI and supporting code or the hosting code.

The main feature that people point to in SL4 that they try to say “See, we don’t need to bother with WPF now” is Out-Of-Browser (OOB) elevated trust. The first important point here is that it is “Elevated” not “Full”. You have the ability to do a lot of things you couldn’t do before based on that elevated trust, but there are still a lot of things you could be blocked from doing that would be no problem in a WPF application. Additionally, for almost all the new things in Silverlight 4, you can look at the corresponding capability in WPF and realize that Silveright is still the “challenged” sibling. Even though these new features cover the 80% for most apps, that remaining 20% might be just the thing you need, and not having it could either cost you a lot of time and money trying to compensate, or penalize your users because of the lack of capability.

Let me run through some of the key differences that make me hesitate to jump too quickly to Silverlight 4 when choosing a client application technology.

File access:

WPF – Unlimited

Silverlight – User profile special folders (My Documents, My Pictures, My Videos, etc.)

Printing:

WPF – Many options, access to Print Dialog, control print queues, etc

Silverlight – Print a UI element programmatically

Documents and editing:

WPF – Flow and fixed document, RichTextBox editing and integration with flow document

Silverlight – RichTextArea control with most functionality of the WPF RichTextBox

Commands:

WPF – Support for raising commands on buttons, hyperlinks, menu items; input bindings tied to commands for keyboard shortcuts; routed commands implementation in the box

Silverlight – Support for raising commands on buttons, hyperlinks, context menu items, no input bindings, no routed commands

Communications:

WPF – Full range of WCF capabilities, able to consume and host services of any kind, full range of security options and other WS-* protocols, REST, low level communications of many kinds

Silverlight – Limited subset of WCF client capabilities, no ability to expose a service from the client, unsecured TCP or HTTP protocols, duplex less capable than WPF clients (polling HTTP or unsecured TCP only), some socket level capabilities, have to take cross domain considerations into mind in most deployment scenarios.

Clipboard:

WPF – Any kind of serializable objects

Silverlight – Text only

Drag Drop:

WPF – Any kind of object

Silverlight – Files only

External devices:

WPF: Anything with a driver, COM, Win32, or communications protocol

Silverlight: Webcam, camera, microphone, and devices with a COM API or compatible communication protocol

Input:

WPF – Keyboard, mouse, pen, touch no real limitations

Silverlight – Must be OOB elevated trust full screen to have full keyboard access

 

The bottom line is that if your client application is mainly a front end for back end data – Silverlight 4 is perfect and sufficient. But if your client application needs deeper integration with the client machine and other things that reside client side, it may be possible to get it done with SL4 elevated trust OOB, but it will likely be more challenging and you may hit brick walls that kill your productivity or functionality. You really need to do a good up front requirements analysis and if you have any significant interaction with client machine resources, WPF is still going to make your life easier.

That being said, at the current time, WPF is the “Challenged” sibling in terms of a couple of newer technologies. The WCF RIA Services capabilities for generating client side code and having the DomainDataSource is very attractive for a broad range of business application use cases. That will be coming in a future release for WPF, but in the meantime, Silverlight has the leg up there. Additionally, MEF added some convenience classes in Silverlight 4 that didn’t make it back into the main .NET Framework that make certain composition scenarios a little easier and cleaner to code. But that is less of a leg up than the RIA Services part.

As developers and architects, we need to make good choices based on our requirements. Not just jump on the latest greatest thing that everyone is talking about. If you build on WPF today, you are not really going to be blocked from doing anything you need to do. You might not get all the new shiny toys as quickly because WPF releases with the Framework every few years, whereas Silverlight looks to be sticking to an annual release cycle. But I don’t think any WPF apps are ever going to become stuck in that technology. I think as Silverlight matures even further, we will get to a place where you can just change deployment modes if you want a web based, cross-platform, security context limited version of your app and it will be what we call a Silverlight app today. If you want a deeply integrated version with the desktop you’ll choose a deployment mode that matches what a WPF app is today.

But if you are getting the feeling that you should avoid WPF because it might go away or because Silverlight is the better platform, or that WPF code will become obsolete, I think you are getting the wrong impressions and should rethink.





Tuesday, June 01, 2010 7:09:54 PM (GMT Standard Time, UTC+00:00)
Comments [15]  | 


Wednesday, June 02, 2010 7:53:24 AM (GMT Standard Time, UTC+00:00)

I couldn't agree more with you on WPF being not dead and I just wrote a blog post summing up my thoughts related on that and posted it here

5 reasons why Silverlight sucks in LOB (compared to WPF)
Wednesday, June 02, 2010 3:13:45 PM (GMT Standard Time, UTC+00:00)
Hear! hear!

I'd add Platform/Language as a catgory:
WPF - all the features of .NET available
SL - missing many core language features (e.g. type descriptors) and UI features (data template selectors, UpdateTarget)
Geoff Cox
Wednesday, June 02, 2010 3:20:20 PM (GMT Standard Time, UTC+00:00)
I recently developed an application to download movie subtitles from the internet using mvvm (i wanted to learn the concept ;) ) and wpf... and loved it. Sure, silverlight is amazing but the "no limits" sensation from wpf is nice. I can't imagine all my desktop applications written in silverlight, and honestly think that we are very far from that.
(sorry for my bad english)
Leo
Monday, June 14, 2010 4:48:06 AM (GMT Standard Time, UTC+00:00)
A lot of students like to buy essays using the paper writing services referring to this good post.
Thursday, June 17, 2010 6:59:06 AM (GMT Standard Time, UTC+00:00)
I agree you! excellent review!vibram five fingers have been popular for a long time,for its excellent quality and further features,I’ve always wanted to have a pair of beauty fivefingers running shoes, yesterday my best friend bought a pair of 2010 fashion vibram shoes ,I feel happy. Then he told me buy suitable shoes on http://www.fivefingersrunning.com , many differ fivefingers kso designs ,also vibram fivefingers kso and more others. The suit shoes win the Customer trust.
Thursday, June 17, 2010 7:03:07 AM (GMT Standard Time, UTC+00:00)
Thanks for sharing ,really helped a lot here! We are the best and professional online retailer, offering top quality Classic uggs sale, Short ugg boots and free shipping worldwide. And we have engaged in uggs shoes sale for years. Buying Sheepskin ugg boots is the best choice to enjoy the benefits.so I said that. Official Uggs online store be established by may retailers, and we have good reputation, competing price and fast delivery. Any questions please feel free to contact us by email or Live Chat.
Thursday, June 17, 2010 7:04:24 AM (GMT Standard Time, UTC+00:00)
ugg boots shop offer powerful training shoes ,Tall ugg shoes. A large number of UGG Tall Boots available at discount Ugg Boots sale are extremely hot recently. Uggs Sale is having its biggest sale of the year.
Thursday, June 17, 2010 7:05:51 AM (GMT Standard Time, UTC+00:00)
Thank you again for all the knowledge you distribute,Nowadays,people pay more attention to high quality life style. High quality means ,comfortable and healthy, very useful womens ugg boots is very popular now.Made from sheepskin, bailey button uggs is very comfortable and warm.It is fit for indoor and outdoor wear.bailey button ugg boots is hot on sale,It is time for you to buy uggs boots for collection.Ugg Boots Cheap is worth for collection
Thursday, June 17, 2010 7:07:25 AM (GMT Standard Time, UTC+00:00)
Wow - really powerful post. Thanks for taking time to share this personal perspective that not only we as individuals should heed, but organizations as well. Ugg Boots UK becoming more and more popular,new style Ugg Boots will be the best seller for this Christmas,in Ugg Boots Online shopping Uggs on Sale is hot for these years,you canBuy Ugg Boots in here,there are all shopping cheap
Thursday, June 17, 2010 7:08:33 AM (GMT Standard Time, UTC+00:00)
Thanks for sharing !So nice to see you !I will buy a wallet for my best friend! Shopping Cheap EdHardy can be used on various occasions and in different ways. Do you know all these? It’s the time for you to know; It is true that everyone wants to wear the latest trend and wish to buy that pair which is in heavy demand. But it would be better to check what kind of ed hardy clothing that you love.Especial ed hardy hoodies and don ed hardy will improve their appearance.one day i went shopping outside,and in an ed hardy store,I found some kinds of ed hardy sale is hot Thank you for the informationchristian audigier
Thursday, June 17, 2010 7:09:41 AM (GMT Standard Time, UTC+00:00)
I really love your website, it's so useful, i'm just sharing for my friends!Strong winter weather is hitting most of the United States right now. Many of the states that are not used to seeing even the slightest amount of snow, are being bombarded with strong winter weather. If you want to keep warm in this winter
you might try adding some clothes to your inventory like abercrombie & fitch clothing. And The best sell is hollister . In winter Many people are out enjoying this weather while it lasts and snow skiing and snow boarding are two of the most popular winter time sports. Both of these sports require good clothing right? Good . abercrombie and fitch is our best choice.,Womens Abercrombie Fitch is very comfortable and warm.It is fit for all people.now abercrombie Outlet is high It is time for you to buy Abercrombie clothing for collection
Friday, June 18, 2010 4:56:18 AM (GMT Standard Time, UTC+00:00)
Flyff-FR
Have you heard Fly for Fun money, If you played Fly for Fun gold, you certainly know about it buy cheap Flyff penya, you can get Flyff penya, it can help you beat the monster, To some players.
Monday, June 28, 2010 6:44:40 AM (GMT Standard Time, UTC+00:00)
What do people think about mbt shoes?
With the development of the world economy, there are some kind shoes like <strong>air jordan<strong> shoes and <strong>chiristian louboutin<strong> are world legendary on tide souk. Just say <strong>mbt trainers shoes<strong>, people all over the world are more and more interested in them since 1996. And more and more people own their own <strong>cheap Air Jordan<strong> shoes.
What do people think about <strong>coach handbags<strong>? Different people have different opinions.
<strong>christian louboutin shoes<strong> look like a symbole of elegant and grace, however the <strong>gucci handbags<strong> could make you more charming and sensible.
mbt shoes
Wednesday, July 07, 2010 12:49:26 AM (GMT Standard Time, UTC+00:00)
Microsoft Office 2007 can give you more convenient life.
Choose Office 2007 Professional is the most lucky thing in the world.
Many people like the Office 2007 Pro with their work.
Microsoft company invent the Office 2007 home for many people.
MS Office 2007 can change people’s life.
Office Professional 2007 is many people’s favorite.
Buy Office ultimate 2007 you can get many convenience.
The invention of Microsoft Office 2010 is a big change of the world.
By using Office 2010 Professional, you can save your money and time
Office 2010 Pro is the best software of all Microsoft
MS Office 2010 –save your time and save your money.
Many people like buy Office 2010 Home.
Office Professional 2010 is great!
Windows 7 Home makes life beautiful.

Thursday, July 15, 2010 3:12:22 AM (GMT Standard Time, UTC+00:00)
What do people think about mbt shoes?
With the development of the world economy, there are some kind shoes like <strong>air jordan<strong> shoes and <strong>chiristian louboutin<strong> are world legendary on tide souk. Just say <strong>mbt trainers shoes<strong>, people all over the world are more and more interested in them since 1996. And more and more people own their own <strong>cheap Air Jordan<strong> shoes.
What do people think about <strong>coach handbags<strong>? Different people have different opinions.
<strong>christian louboutin shoes<strong> look like a symbole of elegant and grace, however the <strong>gucci handbags<strong> could make you more charming and sensible.

Comments are closed.















February, 2012 (1)
January, 2012 (1)
November, 2011 (4)
October, 2011 (1)
September, 2011 (2)
August, 2011 (1)
July, 2011 (1)
May, 2011 (5)
March, 2011 (4)
February, 2011 (2)
January, 2011 (3)
November, 2010 (4)
October, 2010 (1)
September, 2010 (5)
August, 2010 (5)
July, 2010 (6)
June, 2010 (8)
May, 2010 (2)
April, 2010 (2)
January, 2010 (1)
December, 2009 (3)
November, 2009 (2)
October, 2009 (3)
September, 2009 (3)
August, 2009 (2)
July, 2009 (3)
May, 2009 (3)
April, 2009 (2)
March, 2009 (1)
February, 2009 (2)
January, 2009 (2)
December, 2008 (1)
November, 2008 (2)
October, 2008 (5)
September, 2008 (4)
August, 2008 (2)
July, 2008 (1)
June, 2008 (2)
May, 2008 (2)
April, 2008 (3)
February, 2008 (6)
January, 2008 (3)
December, 2007 (1)
November, 2007 (1)
October, 2007 (5)
September, 2007 (1)
July, 2007 (3)
June, 2007 (8)
April, 2007 (2)
March, 2007 (4)
February, 2007 (1)
December, 2006 (2)
November, 2006 (9)
October, 2006 (5)
September, 2006 (3)
August, 2006 (2)
July, 2006 (4)
June, 2006 (5)
May, 2006 (10)
April, 2006 (4)
March, 2006 (2)
February, 2006 (12)
January, 2006 (7)
December, 2005 (2)
November, 2005 (15)
October, 2005 (6)
September, 2005 (7)
August, 2005 (3)
July, 2005 (10)
June, 2005 (11)
May, 2005 (7)
April, 2005 (8)
March, 2005 (6)
February, 2005 (2)
January, 2005 (6)
December, 2004 (3)
November, 2004 (5)
October, 2004 (2)
September, 2004 (5)
August, 2004 (13)
July, 2004 (6)
June, 2004 (14)
May, 2004 (17)
April, 2004 (12)
March, 2004 (8)
February, 2004 (10)
January, 2004 (14)
December, 2003 (9)
November, 2003 (13)
October, 2003 (3)





Sign In
Copyright © 2006-2007 Brian Noyes. All rights reserved.

designed by NUKEATION STUDIOS