A Programmer’s Dilemma: Choosing between Qt and .NET

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.


Posted

in

, , , ,

by

Tags:

Comments

8 responses to “A Programmer’s Dilemma: Choosing between Qt and .NET”

  1. Farrukh Avatar

    A simple and informative article.

    I myself is working as Software Engineer, but mostly I have to work with scripting, xml, configurations, deployments etc and wanted to work with Desktop application development thingies.

    Thanks

  2. Sophronis Avatar
    Sophronis

    So Brian you introduce two different platforms but you do not have a favorite??  That is kind of lame.  A good programmer if you ask me is one that can write in either platform.  And since both platforms have C++ in common then a good programmer should know C++ or C#.  So the answer to your question no matter what the platform is you need to know a C based language.  So there you are.  Learn C and you can do anything you want!! 

  3. paidj0 Avatar
    paidj0

    do .net support linux very well?

    1. Todd A. Stedel Avatar
      Todd A. Stedel

      No, if you look at the mono project, you will notice that WPF is left out completely. Silverlight works on Mac and windows pretty much identically (hardware acceleration only works in windows) but moonlight is very far behind

  4. Bub123456 Avatar
    Bub123456

    Another good way of comparing the two is by comparing their documentation. Personally I like the format and way that Qt’s documentation is done much better then Microsoft has done with C#/.NET However I’m also a biased C++ developer and like making fast, memory efficient apps.

  5. Tomas Samot Avatar
    Tomas Samot

    Time wasting article. If you dont tell which one is the best – why write that in title? We all know that everything is conditional… and never is something which is the best in all cases.

    1. Abhinav rawat Avatar
      Abhinav rawat

      its upto you to decide between QT & .NET. Article gives you knowledge about both. Its upto your taste.!

  6. Abhinav rawat Avatar
    Abhinav rawat

    I would say if you are designing an application for embedded, then go for QT otherwise .NET is good. !

Leave a Reply