Replacing Winforms
Posted by Mike | Filed under Programming
If you have Visual Studio, there is a pretty good chance that you have played with the integrated visual designer. Using the visual designer in Visual Studio requires that you develop a .NET application. If you ever want to make your application crossplatform using winforms is not the best idea (although you could use the Mono platform as a crossplatform replacement for .NET). Because I wanted to have the ease of creating good UI visually without build a .NET application, I went out in search of a new GUI toolkit.
There are a few toolkits out there for building UI applications that are replacement for winforms. The three that I found to be the most popular are wxWidgets, Qt, and GTK.
wxWidgets
Excerpt from their website:
wxWidgets lets developers create applications for Win32, Mac OS X, GTK+, X11, Motif, WinCE, and more using one codebase. It can be used from languages such as C++, Python, Perl, and C#/.NET. Unlike other cross-platform toolkits, wxWidgets applications look and feel native. This is because wxWidgets uses the platform’s own native controls rather than emulating them. It’s also extensive, free, open-source, and mature.
Code::Blocks allows the integration of wxWidgets. Code::Blocks itself is a crossplatform IDE so its not a bad idea to use it in conjunction with wxWidgets if you are really looking for doing crossplatform applications. While I never really gave a really deep look into wxWidgets beyond the form designer, I didn’t find it to meet my needs. The way that you construct forms in wxWidgets was very different from the way that winforms seemed to work. With winforms you can drag and drop, but you cannot seem to do the same in wxWidgets as they work with resizers and regions instead of the easy drag and drop. I have no doubt that you can create some powerful applications, but the barrier to entry with wxWidgets was too large for me.
GTK
GTK is one of the most popular toolkits available for Linux (the other is Qt). The form builder application doesn’t seem to be too difficult. There is also binary distribution available for Windows (32 and 64 bit), Linux, and Mac OS X. Therefore you can create crossplatform applications without a lot of trouble. However, the problem with GTK is that it seems that it takes more code to do the same thing in GTK than you could in Qt, which moves me onto…
Qt
I ended up with Qt because it had almost everything that I wanted. The best thing was that the form designer was great and easy to use. Qt also has Visual Studio integration so that you can do everything from Visual Studio. Recently Qt has become under a tripe license, GPL, LGPL, and a pure commercial license. Concerns regarding the license have been a problem in the past because they only had a GPL and a Commercial license. Qt has a unique way of doing callbacks using a signal and slot method, which was one of the only things that I needed to look up and couldn’t get working without research. With the form builder there was a problem with a seemingly limited amount of widgets available compared to winforms. But for its few small problems Qt is a great piece of software for creating UI applications.
Tags: ui, visual studio, winform
RSS Feed