09 May 2009

New project: WPF or Windows Forms?

I’m evaluating the possibility to build a new software product. As part of my research, I’m trying to figure out which would be the best technology to use,

As Joel Spolsky commented in a recent StackOverflow podcast, there are very few occasions to start a new big project from scratch. If the the system you’re building is going to be around in five years, you better choose the right technology.

I firmly believe that WPF/Silverlight will dominate Windows software development in the next years. This means that, even though Windows Forms will be around for a long time, the cool apps are going to be developed using WPF.

Does forgetting Windows Forms and jumping into WPF makes sense?

I don’t know. I see some disadvantages that, although some will eventually vanish, are very important right now.

First of all, you can’t rely on the.NET Framework 3.5 SP1 being installed in the user’s computer. In fact, users with this version installed are for sure the minority. Getting a seamlessly install experience is not going to be easy.

Second, in order to really leverage the advantages of WPF you need a designer. There’s no way I can design an interface like this:

And finally, the lack of third-party controls. There are a few but no way near the diversity you can find in Winforms. I’m going to need a scheduler control and I don’t think it exists yet.

(UPDATE: Telerik and ComponentOne have a scheduler control for WPF). scheduler_control

All in all, WPF is here to stay so, we better get our hands dirty with it. Adam Natham writes in WPF Unleashed:

So unless running on Windows 98 is important (which is still supported by Windows Forms 2.0 but not by WPF), I would recommend WPF over Windows Forms for a broad range of applications-especially after the release of Visual Studio 2008 is released. But Windows Forms isn’t going away anytime soon; there just won’t be major enhancements made to it after version 2.0 was released in 2005. Microsoft is clearly investing in WPF-not Windows Forms-as the future presentation platform.

If I decide to finally go ahead with this project, I plan to start working on the model and database and postpone the UI decision as long as possible. Meanwhile I’ll be experimenting with WPF.