Thursday, 6 June 2013

In defense of WPF

Recently there was an interesting thread on a LinkedIn WPF Group about the future of WPF.  The originator sparked the discussion by raising the question if WPF was going to be replaced by HTML5.  Many WPF developers shared the opinion that the introduction of HTML5 did not herald the end of WPF.  I agree.

From this I did a quick Google search on recent WPF news and ran across a blog posting by a former WPF disciple.  The thrust of his article was that WPF has not evolved in the six years since its introduction.  He then proceeded to highlight what he felt was wrong with WPF.  This included poor designer support, ugly syntax, complex binding expressions, etc.

The author espouses the virtues of ASP/MVC as a platform that is really going places.  Having done 10 years web development, including classic ASP and ASP.Net, I thought this was amusing.  Even more interesting that I left web development shortly after Microsoft released WPF; 10 years was more than I could stomach.  I've always felt that web applications were always attempting to do things that the platform was never designed to do, in short it was a kludge.  Is it getting better?  Sure it is, but a leopard cannot change its spots.

The comments section of this blog post quickly filled up with like-minded developers for a good old-fashioned WPF bashing.  Comments ranged from "WPF hurts my brain" to "MVC is sooo cool, and WPF ain't".  A small minority cautiously defended WPF and what it could do.

What struck me about these comments was how self-centered the viewpoints were.  The choice of technologies and preferences were largely based on them - what made their life easier.  Almost no one focused on the end product or the end user, or how they were affected by these technologies, it was all about themselves.

I challenge any of these WPF-bashers to sit down with an end user and present to them two applications:  One, a properly designed WPF desktop application; and Two, an equivalent ASP.Net/MVC application.  Then, after using both ask the user which they prefer.  I would put money on the WPF application.  Why?  Because WPF is a superior user interface framework over HTML.

My heart goes out to office workers who have been forced to use web applications day in, day out.  The truth is - web apps SUCK.  And everybody knows it.

I have been in countless design/planning meetings for new internal applications and there rarely is a discussion about whether to go down the web app route or desktop route.  Why?  Because often it is assumed that web apps are more cost effective, easier to maintain, easier to deploy.  No one ever says the reason for the decision is HTML/ASP's vastly superior UI capabilities or how it delivers an excellent user experience.  Why?  Because - web apps SUCK.  And everybody knows it.

Why do I use WPF over HTML/ASP?  Because of the end product I can create; because of the effect that product has on the end user and their work.  I don't pick a technology because it is easy for me.  I pick a technology that is going to assist me in bringing about a superior valuable product for the end user.  My goal is to change the way my users work, to assist them in performing their job, to make the whole experience more efficient and enjoyable.

16 comments:

Christopher Buteau said...

Although I won't go as far as web apps suck (I have seen some well sized internal web apps) I will agree the desktop experience gives you greater flexibility and performance. I think the biggest problem with web apps as they are now is most of the development still occurs on a single computer.

MS first offering of ASP.NET pretty much placed all the burden on the server. Which allowed you to develop a pretty rich web application but deploying it was a different story (oh, we'll pay like 10 dollars for the system that actually serves the application).

All in all a nice little rant.

rgramann said...

Thanks Chris, I didn't want to make the same mistake others did while criticising WPF. Maybe web apps don't TOTALLY SUCK. I do think they have their place in the spectrum of application development. But, to pick ASP/MVC over WPF is difficult for me to grasp.

Anonymous said...

"One, a properly designed WPF desktop application"

Somehow I actually struggle to find an app that uses WPF. Not that they don't exist, but show me ONE universally acclaimed and successful product built on WPF.

rgramann said...

That's a very good point, and one I've never considered. For me personally, I have not had the need for new software on the desktop. I have a handful of core applications that I have run for years. So, with that in mind, I'm not out there searching for anything. Since I'm not looking it's easy to miss the lack of commercial desktop applications written in WPF.
Also, I mainly travel in the enterprise/bespoke software development circles, where WPF is alive and well.

Anonymous said...

Guys Vs 2012 is WPF thats a pretty good app!!

rgramann said...

Good point, totally forgot that VS was WPF based. Yep, that's a keeper :)

Anonymous said...

yahoo messenger is WPF Based

Kevin said...

Swing Catalyst is WPF.

Screenshot:
http://www.swingcatalyst.com/images/products_new/medium/Bilde10.jpg

So is my company's app:
http://www.quantumbitdesigns.com/XMatch.png

SM said...

Hi Ron,
My 2 cents on the "web apps vs WPF":
I believe all your arguments in favor of WPF hold if you plan to stick to Microsoft platforms - PC, Windows Phone et al. However, if you plan to offer products for iOS and Android, the story changes completely. You then have to either choose that platform's native tech stack (Objective C, Java respectively) or have an HTML5 app that can run on any platform with its API/server using any technology stack of choice

rgramann said...

Totally agree SM. Since I spend 99% of my time developing bespoke LOB applications, this is generally not a consideration. Nevertheless, you've made a valid point.

Anonymous said...

I complete agree with this post. Been working on a HTML5 project with MVC and web development is still full of multi layered hacks. Browsers never the same. Height is still an issue. Just started a new WPF project and it wonderful. Dock panels etc instead of css and div alignment and write js to get around issues. Proper C# Command objects instead of javascript code. Bindings that work. The list goes on.

WPF all day long please.

R2B said...


Thank you for sharing your thoughts and bringing this up on the Web specially since nowadays many developers judge or comment on this topic without spending time and looking at all future side effects in an existing or even future product.

Don't get me wrong I am NOT against the web but there is a place and time for everything.

In order to give you all a real and tangible idea, consider my working environment which currently I'm working at. I have developed an application using WPF which been successful by far although it requires more work towards its completion, however, working with some Jr. programmers or people who have no clue what the goal is ... I have been bombarded with ideas which make you laugh!

Things such as: dropping WPF and switching to JAVA or HTML5 or dropping SQL Server and going with an open source database such as PostgreSQL and more childish ideas. Knowing that they have no idea about this tool yet and never used it yet ready to take chances!

I do believe in future we might have a web version of this application but base on experience and available technology, ideas are better to be analyzed rationally.

I guess what I am trying to say is that you as a reader SHOULD NOT accept or believe an idea only because it is posted on the web or because somebody think he/she is a great programmer.

This is a good article and I think author has tried to make a point which is clear.

rgramann said...

Thanks for your thoughts R2B. Probably the most important factor in choosing an appropriate technology is "realistic judgement". I'm not so single-minded to say "only use WPF". There are many considerations that come into play when selecting a development technology. And Software Development is not immune to fads. It always pays to ask "why?" and apply some critical thinking.

Anonymous said...

Sirona CEREC 4.0 and above. Visual Studio 2010, 2012, 2013. SQL Server Management Studio 2012

Anonymous said...

Unfortunately all versions of vs mentioned SUCK. Vs10 can't render otf fonts - wtf!!!. Vs 12 and 13 are unmitigated ugliness

Anonymous said...

I agree. I use it daily for developing desktop imaging applications. Displaying real-time scanned images basically.

The only open issue for me is the level of support from Microsoft.
I personally need to see some real commitment from Microsoft, because I have to avoid investing too much time in something they might kill off (I am thinking of how Silverlight was handled here).