WTL are not what the framework, is the use of generic characteristics of the win API layer encapsulation, design ideas also did not get rid of the impact of MFC, in fact, with the generic UI framework can only be regarded as a behavioral art, the idea of continued development will become useless, such as The code is too complex, the compilation is too slow, error is not good debugging and other problems difficult to solve.
And the package is not complete, but also ubiquitous HWND hdc and other things.
The main purpose is to write some very small programs, or as a back-end implementation of other UI frameworks, such as I wrote a small framework for the loading and unloading program, very small, where the creation of the Management window part of the WTL.
MFC is the more advanced point of the win API package, more than the WTL package is complete, it is difficult to see the HWND hdc, but also provides a number of utility classes, such as advanced controls, generic containers, IO access, network protocols and so on. In addition, there are some basic frameworks, such as Document/view, which is a simplified version of MVC, only MV, but for the management of data, message delivery, etc. without any constraints, causing Doc/view to be used in a muddle. Especially in the case of event processing model, message mapping is simple, and error-prone way, the only advantage is good performance. From VC + + 1.X has MFC, then the whole UI design ideas are relatively backward (in addition to Apple), MFC also burdened with a heavy compatibility burden, such as VC + + 1.52 MFC program to the VC2003 a little modification can be compiled, resulting in the late MFC no development, is to refine the details along the old lines, add some components, but the fundamental design problem is not improved.
GTK, this ate the language of the loss, with C write object-oriented is painful, although in the mind than MFC to advanced some, but written out of the code than MFC much more wordy. Compared to MFC, more layout concept, event processing on the Signal/slot, although it is very troublesome to use.
WxWidgets, this basic is a cross-platform MFC, the differences between the various platforms to do an abstraction, in fact, most of the backend is still using the Platform native API implementation, a lot of controls are directly using the system is native. There is a wxwidgets for GTK + version, and the back end is Gtk+,wxwidgets is a shell. This is also the advantage of wxwidgets, it compiles the program release package is relatively small, performance is also good.
These are the technical levels of the UI framework for the 90 's, and they are still not making much progress.
Let's talk about the technology of the 21st century.
Qt, although it was also in the 90 's, but it has made great strides in the 21st century. It should be said that its starting point is relatively high, the first to locate the cross-platform, and not satisfied with the simple encapsulation system API, but to create a complete set of APIs and frameworks, and even replace the system API, so not only to do the UI, but involves the application development of all things, including the network, database, Multimedia, scripting engines, and more. Signal/slot is the invention of QT, which is the best implementation of the C + + language in the event notification model, even I think it should be written into the C + + standard, estimated that the C + + committee of the old stubborn are never write GUI.
The early Qt is also no directui concept, each qwidget corresponds to a native window, starting from Qt4.4, only the top qwidget is the native window, and the child widget is a alien widget, but an abstract layer does not correspond to the native window, This implements the concept of Directui, and many graphic effects become possible, such as the window cascade transparency effect.
QPA (QT Platform abstraction) was implemented after 4.8, which made porting Qt easy, and QT is currently one of the most platform-supported frameworks.
Due to the early licensing issues, QT is not very friendly to the open source community, resulting in the promotion is not very smooth, until it changed into a LGPL way, if QT can early to open, I am afraid there is no wxwidgets space.
QT's shortcomings are also some, is too big, but can cut their own, I can cut the QT library to the release package compressed 2.5MB.
WPF, Microsoft has come to a dead end in the idea of win form, and finally made a decision to develop the UI library in the right way. The UI of the 21st century must be defined and never written in code, so with XAML, this powerful definition tool not only defines the UI layout, but also includes graphics animation effects, message responses, and so on. With the good language of C #, it is even more powerful. But the problem is also very obvious, is too large, not only to use the development of a huge IDE and design tools, the release of the installation package is also very large, so there are few people who write generic software client, mostly to do enterprise projects when writing dedicated client.
About 4-5 years ago. I used WPF to write a QQ, but only realized the basic ability is much better than the C + + client, and run slowly, mainly to eat too much memory, and then WPF optimization is not enough.
Finally, I would like to add the real UI Library of the king, Cocoa.
Apple's success has many reasons, one of which is the COCOA,COCOA concept is very advanced, and came early, I suspect that Qt and WPF have a lot of ideas are to learn from cocoa.
A defined UI that uses Xib to define most of the details of the UI and provides WYSIWYG visual design tools.
Strict MVC, and the definition is very clear, the Division of labor is clear.
Signal/slot, although not called this name, but the idea is, and really is to drag the mouse to connect.
Arc, closures, and reflections are provided to provide great convenience for UI development, thanks to the language of objective-c.
Add the Borland Owl and VCL.
I started with Borland c++3.0 and Delphi 1.0, at that time the Borland seemed promising, but later a series of decision-making mistakes led to the company almost disappeared, the students do not go to this pit jump.
Owl used to be a competitor to MFC, design ideas are similar, personally feel Owl's API design more elegant, but in the market owl was completely defeated by MFC.
Delphi is a god-made, and it has no opponents for a long time in RAD (Rapid application development), until the BS architecture replaces the CS architecture. Delphi is characterized by simple, rapid development, simply write a basic available application, it may not be faster than him, but the disadvantage is ugly, the basic majority of Delphi application is a lot of control stacked together, very unattractive, in addition, due to the limitations of Pascal language and the existing large number of C/ C + + code fusion. Although there was a C + + Builder later, the simple and fast advantages of builder disappeared. The Borland C + + compiler is getting worse, resulting in an open source project that is less likely to be compatible with the compiler.
VCL is not exactly a UI library, but a set of component interface specifications, similar to COM ActiveX. Both Delphi and C++builder build the base library based on this specification.
UI Library is a big topic, enough to write several books to discuss, I am here to write a little bit of my feelings.
It is meaningless to discuss the merits of each library, but to put it into the specific application scenario, each library has its own good scene.
If only under Windows, the pursuit of small programs, with WTL, insufficient place to implement their own, but the visual effect is hehe.
If you can be a little bigger, but also to look good, then Qt.
If you do not care about the size, as long as the visual effect is gorgeous, use WPF, if the development tool price is also taken into account, then local tyrants will choose WPF.
MFC is a chicken, unless your existing engineers will not use anything else, or have legacy code to remain compatible.
If cross-platform is required, then there is no advantage in using qt,wxwidgets and GTK + with current QT.
If it's iOS Android, then it's best to use the native UI library unless you're writing a game.
Reference: http://www.zhihu.com/question/23480014
What are the characteristics of MFC, WTL, WPF, WxWidgets, Qt, GTK, Cocoa, VCL?