Monthly Archives: July 2013

Event Scavenger 5

Seems like life is just getting more hectic these days. I’ve been running version 5 of my Event gathering tool for a while after I ‘upgraded’ the product last year already but never had the time to actually create any way to package it so others can also use it.

Part of the problem was that I decided to use a new Installer technology (thanks to the brilliant minds at MindLessoft formerly known as Microsoft…) – Wix. Unfortunately Wix is not exactly a walk in the park thing to learn and with limited time it was very hard to create anything that is kinda useful.

Anyway, to make a short story long… I decided to just go ahead and publish the latest version with whatever installers I managed to create up to now (and hope for the best).

So, there is a new ‘stable’ release of Event Scavenger on the CodePlex site. Good luck and may the force be with you…

Windows Forms vs WPF

The following short piece is about my opinion of comparing old fashioned Windows Forms development to using WPF (Windows Presentation Foundation).

After some real experimenting, researching, googling, scratching, digging, hair pulling (what is left of it), swearing, yelling, kicking around getting a very simple WPF application to work I can seriously say that WPF is a load of … brown stuff. I’m not denying that it could be used to create really beautiful and powerful applications given enough time, patience (and hair) but, the effort to do this is making me question whether this is worth while. It has a few benefits over WinForms but they are offset by some really annoying and lacking features, not to mention that it also have all the same disadvantages that WinForm applications have (compare to stuff like Web/mobile applications). Essentially, anything you can do with WPF can also be done with WinForms with less time and effort.

Let me give a few examples.

Basic layout and design of a form

I’m sure once you are completely fluent with WPF and all the possible permutations of properties, behavior, styles etc. that you can also do basic layouts of an application very quickly. For me, knowing exactly what I wanted and even what I’m looking for, it took more that two days to create a basic interface (which I could have done in 5 minutes in WinForms). Yes, part of the problem was I’m not fluent in all that is WPF but thanks to Google I could find solution quickly every time. Despite this I had to retest every possible basic behavior of all controls – even simple things like clicking on a blank space inside a control to ensure all ‘basic’ functionality as a plain user would expect (people that have been using Windows app for years), are still the same. One of the most important fundamental concepts of UI design is to have consistency – like behavior of controls. Something like keyboard navigation was seriously not part of the WPF designers ideas.

The ListView control.

This control has been changed in several ways which could both be seen and good and bad. In WinForms this is/was one of my favorites. The way you design, code and use columns are very different from WinForm ListViews. It does give you more powerful ‘formatting’ options but this make it incredibly complex as well. Doing basic stuff like right aligning a column is not straight forward anymore. Yes, it can be done but this requires doing ‘non-standard’ things like ‘Styles’, custom code and so on. Then behavior like selecting items in the ListView has changed and even something like ‘unselecting’ all items by clicking on a blank space inside the control now requires you to write ‘extra’ code just to accomplish it. Essentially this is not the same ListView control that we were used to in WinForms but a new control that superficially looks like it.

There is however one aspect/feature of this control that I really like. The way you can bind columns to properties of an object – which by the way is the only way to use it! In general I do NOT use databinding features because it removes your ability to do really powerful things with the control and more importantly databinding controls never really work well with huge sets of data. For that reason I always populated my controls myself so I have ‘real’ control over them. That does come at the cost of having to manually always sync the displayed values on a control with the underlying data.

Summary

There might be people out there that prefer WPF over an ‘old’ technology like WinForms and possible they can create even better applications if they put their mind to it but I’m still in the WinForms camp. Then you have to keep in mind that WPF just like WinForms as a development technology is in danger of being abandoned thanks to the whole HTML5 and JavaScript mobile revolution.  WPF might become just another one of those potential (good) technologies that Microsoft killed before it had time to evolved into something really good. That is a shame.

Update:

I also discovered that WPF does not even support some VERY basic dialog boxes like browsing for a folder. I mean, FFS Microsoft, what were the developers of WPF smoking when they created this abortion of a tool/technology??

Also, they changed the very standard way of returning results from dialog/messages boxes to use a nullable boolean in stead of a usable structure. WTF??