Winforms is not dead

There was a time I was really fascinated by WPF and began to dig into it. Well, you know its learning curve.  I must confess: When I re-discovered the advantages of Winforms, I used more time to improve my Winforms skills than to learn all this cool WPF stuff.

In fact Winforms is finished since .NET 2.0. But I want to share some arguments to use it during the next years, especially when you develop business applications.

1. Time is money, and your customers want you to use it as effectively as possible. Many software companies have a large code base of Winforms applications, helper classes, third party libraries and so on. Also there a many active developers with years  of experience in Winforms. Is your customer willing to pay the bill when you all give it up to sell him a WPF solution?

2. Business environments often use Terminal Services (RDP) to deliver applications. Business environments also often stick to old windows version. We have even customers using Windows Server 2003 and XP. There are many discussions in the Web about WPF on Terminal Servers or on aged operating systems. This is just one of many examples. You get interesting hints about fine tuning your WPF application and your Terminal Server (here you find a case study in German).  – But: My customer does not want to discuss. He wants a solution that simply works, even on his old machines that are very reliable when he is using his specialized branch software that was written in Visual Basic 6 ten years ago. You can say about Winforms whatever you want, one thing is granted: You will get working it on old systems (maybe you have to switch your compiler options to target framework .NET 3.5 or earlier). Will you also be able to do it when using WPF?

3. Microsoft does not actively develop Winforms any more. But it makes no efforts to bury Winforms. Have a look at Visual Studio 2012 (not the Express Version) and .NET 4.5. You do not only have the platform, but you also have a lot of up to date documentation on MSDN and elsewhere.

4. The Winforms Designer: In my opinion this is one of the highlights of Winforms. I have tried several GUI designers on different platforms: NetBeans for Java Swing, Eclipse with the Android toolkit, Visual Studio WPF Designer, Qt Designer for Visual Studio C++. The Winform designer tops all of them: Easy handling, transparent, understandable code generation at design time (good for the performance) and so on. Everything appears very mature and simply works.

5. Databinding is possible: From time to time you hear about the overwhelming possibilities of WPF concerning databinding compared to Winforms. I don’t deny the  flexibility of WPF in this area. But maybe Winforms can do more for you than you thought. The MSDN documentation on Winforms is good in most cases, but for Databinding it was not satisfying for me. As Winforms did not change very much during the last years, one of the older books from .NET 2.0 times maybe helpful (for example this or this). The next version of the NotReallyORM framework will show, how LazyObjects implement the INotifyPropertyChanged and are bound to a Textbox or a ComboBox.

6. Last but not least Winforms applications are cross-plattform. The Mono project supports .NET for Linux, including an implementation of Winforms.

What are your experiences with WPF and Winforms? I would be very interested in hearing controversial opinions.