I’ve been a programmer for a long time, but admittedly, most of my efforts have been devoted to web-based projects (PHP, ASP) and command line desktop programs with a very limited audience. Recently, I’ve decided to swallow my pride and accept that I need to learn to make desktop apps that…don’t suck. Where do I start?

I’m fortunate to have a group of software engineer friends — if I ever have a question about Dungeons & Dragons or programming, they have me covered. Over a couple of beers, I presented them a seemingly mundane question got these code monkeys a little hot under the collar:

Hey, guys… What framework should I develop in?

With the ensuing noise you would have thought I’d just thrown an unopened Chewbacca action figure out of a moving vehicle. Unsurprisingly, debates over the best framework can send nerds into a tizzy — after all, they’ve devoted a hell of a lot of time becoming well-versed in something that the opposition considers a “waste of time!” Once the bickering subsided, two contenders rose to the top of everybody’s lists: Nokia’s Qt and Microsoft’s .NET.

Qt is better than .NET? How about you say that to my face?

All you need to do is Google Qt versus .NET to see that the debate rages on, but there is no clear winner. However, depending on your situation, there is definitely a best fit for you. Some discussion and research led me to a few considerations when choosing where to focus your learning efforts.

What are your platform needs?

Both Qt’s SDK and Microsoft’s Visual Studio have a full set of tools for developing desktop apps complete with user interface controls, but if you intend to make software to work across all major platforms (Windows, OS X, Linux), you may want to think carefully. Qt is available under GPL for all platforms and will let you deploy desktop apps that don’t require the user to install a framework like .NET does. The .NET framework is pre-installed in modern versions of Windows, but the Mono framework allows for .NET-compatibility in Linux and OS X. Any way you cut it, you can probably make software that works on any machine — but Qt definitely has the advantage here.

Personally, I like the idea of developing cross-platform software from a single IDE installation (à la Qt), but you can’t ignore the fact that .NET works with WPF and Windows Forms to deliver some pretty awesome functionality without a lot of effort. How much emphasis do you put on cross-platform compatibility? If the answer is “a lot,” then Qt is for you. If you’re content to stick with Windows development, .NET will more than satisfy you.

Do you have strong programming fundamentals?

If you’re a student, the answer is probably “not yet.” Because Qt is a framework that uses C++, it requires you to learn certain concepts like pointers, memory management, and other lower language abilities that are greatly abstracted in .NET’s C#. The idea here is that if you are a burgeoning programmer, you should gain familiarity with practices inherent to a language like C++ because it will make the transition to C# much easier.

So, if you’re looking to be the best programmer you can ever be and you’re not very experienced in baseline techniques, pick up Qt. If you’re more interested in getting a good job quickly, .NET developers are a hot commodity.

How much time are you willing to invest in learning?

The general consensus is that C++ isn’t an easy language to master, but it is pretty close to the metal when it comes to the stack, I/O devices, and memory management. Gaining proficiency in Qt is definitely going to take some time, but perhaps will make you a more well-rounded programmer in the end. However, don’t underestimate the value of getting something done quickly and smoothly — because .NET and C# will allow you to do that.

In the end, both are great frameworks

The truth is that there is no “best” framework, and it will ultimately come down to your needs, professional goals, and personal interests. For fast-paced commercial programming, .NET/C# has an edge, but for open-source cross-platform development, Qt will lead you to good places. There is a lot of functional overlap in these two frameworks, so it may be wise to try them both…and don’t be quick to dismiss either.

Published by Brian Nelson

Brian Nelson is a North Dakota native with a passion for computer programming and biological research. He enjoys podcasting, web development, brewing beer, and that dull sense of satisfaction he gets when a C program compiles on the first try.