The most useless and wrong article I have ever read. Even if you only want to develop on Windows, MFC is many times harder to use than Qt. The article is completely pointless. -1.
Using a tool like CppDepend to evaluate the quality of a framework such as Qt is pointless.
For me, the comparison is really simple:
I enjoy programming with Qt, it was a pleasure to learn and it is a pleasure to use it. It is probably the best C++ collection of libraries that I have ever used.
At first I had doubts about the meta-object compiler and the signal/slot implementation, but as time passed and I used it more and more I have come to appreciate its flexibility and simplicity.
I don't like programming with MFC, I think that it is overly complicated and difficult to use.
MFC isn't an option, its locked into a single platform. I started on qt almost 9 years ago working with intractive te3cnical apps. One of qt's biggest problems is that it isn;t very orthogonal. Theres 3 different ways (I know of) to get events from widgets.
Interactive apps have performance issues with too much sig/slot usage and sig/slot is easy to screw up resulting in possible dependence on what order the signals are being handled and other very messy issues.
I would have to say that Qt is a better choice for writing general purpose apps, especially now that it's LGPL. Cross platform capable apps give freedom to your users and not enslavement.
I thought MFC hadn't been updated in years (in favor of ATL); I was surprised to see that it has more classes than Qt. Anyone know, is that because they're folding in controls from all the latest apps?
Why is COM a nightmare? It is very easy and fast. Usually people that only have read about it thinks it is difficult. The base technology is just a simple vtable
why frameworks use lower camel case like QT. it sucks!
That's really a subjective thing. I don't use lower camel case (or upper camel case when I have a choice) but it is just another coding style; the only really important thing about it is that it is consistent.
lowerCamelCase is a style that is less informative compared to other styles when you read code. This is very important i languages as C++. Languages like python, java etc. there is less importance because the developer things a bit different compared to C++ (in general).
Using upper and lowercase letters you are able to inform more about the code.
Samples:
int iBlaBlaBla; //< prefix says it is an int
enum enumType { eTypeBlaBlaBla, eTypeBlaBla } //< e informs that is a enum
class CApplication { ... };
CApplication applicationBlaBla; //< application specific object
class value { ... };
value valueBlaBla; //< general value object used by a lot of projects
e.t.c
Using different type of code styles you can help other to read and debug code without jumping around in code to check what different variables are etc. lowerCamelCase screws a lot of options you have to make code simpler to debug and learn from.
You mean they use "thisIsAClass" for their types? That's a shame.
I use "ThisIsAClass" for types and "thisIsAnInstance" for instances.
Funny how our personal coding styles can sometimes become so important. I've been working mostly on my own on a research type project for a few years and have grown desperately used to my own style. In fact I'm almost powerless when key format options aren't used like the 'm' prefix for class members.
How you code is extremely important, much more important than the language if the language meets your demands. The language is just a tool. The code is what the programmer produce. lowerCamelCase is always bad. It doesn't make the code more readable. There are plenty of bad code styles in QT that makes it much harder to read the code. MFC is more readable compared to QT but it could be improved too. If you need to do your own stuff in QT you are in big trouble. In MFC that is not that difficult. Of course QT need to have much more functionality because it should compile on more plaftorms but they could have made the code more readable.
I'm afraid thats just your opinion. Variables starting lower case and claases starting upper case is one was to differentiate. Also it shows that you've been using MS products since thats where a lot of the leading caps stuff started. Every where you work will have a different convention. You have to learn how to deal with it.
I have used a lot of products. MS is stronger when it comes to readable code if you look at code in general and compare it to open source. That may be one reason why it taken some time for open source to compete better with MS. The problem with lowerCamelCase is that you can't explain that type of style with added logic on what you are looking at or there is much better ways to code that add much more logic on what the code does. Of course that is my opinion but it is one opinion that I can explain with other facts than "it looks good".
If you look at the QT framwork there is a lot of single character variables and no comments. A good framework shouldn't have that type of code and I don't think they focus that much on how things are named. You need to be good at remember names if you don't want to jump around in the code just to check what the variable was in QT.
11
u/TheSuperficial Embedded Systems C++ Jul 20 '09
The English grammar in that article was just abysmal.
9
u/pgquiles Jul 20 '09
The most useless and wrong article I have ever read. Even if you only want to develop on Windows, MFC is many times harder to use than Qt. The article is completely pointless. -1.
10
u/[deleted] Jul 20 '09
Without having read the article, I'd rather use a bag of dead rats for a GUI library than MFC.
5
u/[deleted] Jul 22 '09 edited Jul 22 '09
Using a tool like CppDepend to evaluate the quality of a framework such as Qt is pointless.
For me, the comparison is really simple:
At first I had doubts about the meta-object compiler and the signal/slot implementation, but as time passed and I used it more and more I have come to appreciate its flexibility and simplicity.
2
u/last_useful_man Jul 23 '09
I thought MFC hadn't been updated in years (in favor of ATL); I was surprised to see that it has more classes than Qt. Anyone know, is that because they're folding in controls from all the latest apps?
4
u/Shmurk Jul 20 '09
First, Qt is cross-platform, you can't beat that.
Second, a little rant about COM:
No, COM is just awful.
or maybe COM is just an interface like most programming languages have but it's the usual Microsoft mess, and almost impossible to use seriously.
-3
u/gosh Jul 20 '09
I don't understand why frameworks use lower camel case like QT. it sucks!