Home > View Post

10 reasons you should consider WPF for your next desktop application

There's been some buzz about the recent re-release of a paper by David Chapell called: Introducing Windows Presentation Foundation. The buzz has mostly been about the positioning of WPF and Windows Forms and when to choose which technology. David says:

"A developer creating an immersive user interface, such as the health care application shown earlier, would be happier with WPF than with Windows Forms. Someone creating a more conventional LOB application, however, might prefer Windows Forms."

"Both the current feature set and the tool support for Windows Forms are oriented toward LOB applications, while WPF has a somewhat different focus.

Great advice. However, this all sits in slight contradiction with other parts of the paper that promote WPF as "A Unified Platform for Windows-Based User Interfaces".

WPF vs other platforms

(Table image taken from the paper: Introducing Windows Presentation Foundation).

In my opinion, this polarisation exists because of the tooling. That is, the Visual Studio Designer for WPF (Cider) isn't as good at creating data-centric forms as the WinForms designer. Not yet anyway.

But this isn't a limitation of WPF as a platform, far from it. It's a limitation of the current tooling.

Expression Blend goes much further and I believe it can be used to create data-centric forms in this way but it also does so much more. It needs to in order to support all (or most) of the features WPF can offer - but that makes it much more difficult to use.

But just what is a Line of Business application anyway? I could only find two definitions on-line after a quick search. whatis.com says:

'An LOB (line-of-business) application is one of the set of critical computer applications that are vital to running an enterprise, such as accounting, supply chain management, and resource planning applications. LOB applications are usually large programs that contain a number of integrated capabilities and tie into databases and database management systems.

Increasingly, LOB applications are being connected with network applications with user interfaces on the Web and with personal applications such as e-mail and address books.'

Dragos Manolescu says in his post What is a LOB application?:

"LOB applications are (in no particular order):

* Interactive--self explanatory
* Have multiple screens--the interaction happens on screens, and typically several of them are involved
* Domain specific--examples include finance, insurance, health care, telecom, and e-commerce applications
* OLTP--transaction processing rather than analytical processing
* Have relatively simple user interface/presentation--text fields, checkboxes, buttons
* Integrate with other systems that manage the data and execute the transactions--databases, systems of record, etc."

So two very similar definitions with one notable exception. Dragos explicitly notes that LoB applications have "relatively simple user interface/presentation". However, he later updated the post to explain this point:

'[Update] The point about relatively simple UI warrants an explanation. Don't read it as "LOB applications ought to have boring UIs." Far from it. But if you find yourself implementing the functionality of a windowing system or that of a portal site, it's likely that you're over engineering.'

So neither definition rules out, in any way shape or form, any kind of mildly advanced visualisation. I'm talking about the type of thing that WPF would make mince-meat of, whilst WinForms could only make a meal of it.

I'm going to try and prove this with 10 short posts offering 10 reasons why you should consider WPF for your next desktop application, even a Line of Business one.

Note that I said "Consider" not "Must use". Therefore, let me start with an important disclaimer: 2 reasons why you might consider WinForms over and above WPF.

  1. Learning Curve.
    WPF is huge and different. It offers the best of both worlds, taking ideas from both traditional desktop development and the web and combines the two. It then goes further. Much further. It takes a while to get used to all this functionality - don't expect to be as productive with WPF as you are with your current UX platform without putting some effort in first.
  2. Tooling.
    Don't expect to open Cider (the Visual Studio WPF designer) and to start banging out forms in exactly the same way as you did with the fantastic WinForms designer. For one, it's just not reached the high standards of the older WinForms designer yet and, as David Chappell points out, these designers currently have a different focus.
Having said all that, I am a fan of WPF and I've found myself to be at least as productive with this platform once I'd cleared the learning curve.

Let the reasons begin...

You can also get the download Source Code for each of the examples.

Tags: WPF

Josh Post By Josh Twist
4:20 AM
11 Oct 2007

» Next Post: Reason Number 1. Rich Content Model
« Previous Post: Streamlining build and deploy for sharepoint workflows

Comments are closed for this post.

Posted by Pete W @ 12 Oct 2007 6:00 AM
I just wanted to take a moment and show some gratitude for this great article series. My team is currently on the fence of choosing a presentation technology for a very large project we are about to rewrite, and all of this information is going to serve useful in meetings in the near future. I look forward to the rest of the series!

Posted by Josh @ 14 Oct 2007 8:44 AM
Thanks Pete - comments like this really motivate me to keep blogging.

I have a couple of meetings this week but hopefully I'll have another installment for you soon.


Posted by Otad @ 26 Jan 2008 5:25 AM
1, One, great reason not to consider it beyond building toys and reading blog propaganda:

It's so slow, that dreadful Java GUIs appear more competative on CPU and RAM handling..

Nice try though..

Posted by e124 @ 26 Jan 2008 5:26 AM
Oh, it is verbose and clunky..

Posted by Leonard Rosenthol @ 27 Jan 2008 6:41 AM
I would like to point out that the column for PDF in that table is completely inaccurate.
While the current version of PDF is 1.7, each one of those features has been around for many years previous - I'll address each one in turn.

Forms and Controls - PDF 1.2 (1996)
On screen (reflowable) Documents - PDF 1.4 (2001)
Images - PDF 1.0 (1993)
video & audio - PDF 1.2 (1996)
2D graphics - PDF 1.0 (1993)
3D graphics - PDF 1.6 (2004)

Please update the graphic accordingly.

Leonard Rosenthol
PDF Standards Evangelist
Adobe Systems

Posted by Glenn Block @ 04 Feb 2008 10:56 AM
I can't over-emphasize the "consider" statement above. WPF as a platform exponentially exceeds the capabilities of Winforms. However the path to developing a traditional LOB application is signficant for the afore-mentioned reasons. Putting it point blank there's a reason why there's no WPF Upgrade wizard.

Posted by James Foster @ 06 Feb 2008 4:53 PM
I certainly think that the potential of the WPF platform is huge, but is currently shadowed by the emphasis on the flashy animation. There is a significant learning curve and new design patterns will evolve as best practices (for example, to leverage the data binding of WPF).

The lack of Controls is also a major item to consider. Luckily, more and more third party vendors are jumping on the WPF bandwagon and producing controls to fill the gap left by Microsoft.

Posted by Nathan Rose @ 09 Jul 2008 11:44 AM
WPF is still in its infancy. Look at the evolution of any language and tell me the first version was good enough. You can't.

I suspect WPF will begin to be a major player in about two years. As it catches on and as more and more people download the .NET Framework 3.0 (or 3.5), it will become more mainstream. As such, more updates will be added.

Another factor is WPF/e (Silverlight). While this was not initially a competitor with Flash, something tells me it may be in the next few years. While I do not believe it will overtake Flash in terms of market share, I do believe it will be competitive.

Finally, since all you need is the .NET Framework to run either WPF or WPF/e, I predict that Microsoft will eventually turn the framework into a recommended, if not critical, update (is it already?). That way, anyone that runs Windows can automatically run WPF applications without having to go to some third-party site first.

Posted by Josh @ 10 Jul 2008 1:46 AM
Hi Nathan,

Thanks for dropping - some comments 'inline'

>> Look at the evolution of any language and tell me the first version was good enough. You can't.

WPF isn't a language it's more of a framework and .NET 1.0 was more than 'good enough'. That was easy :). Sure, it will get better with future revisions and I even highlight some of the current weaknesses in the post above. Many of which will be answered in .NET 3.5 SP1 with the introduction of more controls.

>> Finally, since all you need is the .NET Framework to run either WPF or WPF/e.

FYI, Silverlight (WPF/e) doesn't require the .NET framework. It comes with its own version of the framework - that's how it can work on the Mac (and you'll need this even if you have the full one installed).

Posted by Arnauld @ 21 Jul 2008 1:37 AM
Excellent, thank you!

Posted by bindya @ 25 Feb 2009 4:02 AM
Thank You

Posted by Ewerton @ 17 Mar 2010 2:14 PM
Awesome BlogPost

© 2005 - 2022 Josh Twist - All Rights Reserved.