Usually, whether a user interface library has a large number of users depends on the following factors: whether the supported operating systems are diverse, whether the supported operating systems have a large market share, and whether they are easy to use, whether there are good "WYSIWYG" development tool support, whether there is strong economic support of large companies, and so on. I will share with you several C ++ interface libraries I have used.
1. MFC (MicroSoft Foundation classes ):I believe that all the colleagues who develop in windows have used MFC for interface development. I remember that when I first came into contact with MFC, I set up a subject about digital image processing at the university. I used the ide vs 6.0, and then I did something like "repeat the wheel, it was a huge wheel. At that time, I didn't know that VS had a wizard for generating the MFC program. As a result, I sat down in front of the computer and listened to the automatically generated code on a reference book for several days and nights. The result was cruel, not running. I was shocked and thought it was so difficult to develop software. Now I think that some of the language features in the automatically generated code of MFC may not be fully understood by myself until now. Later, I learned sun Xin's VC ++ deep programming, which is a step-by-step introduction to MFC. However, after that, I learned only about its table and applied it to MFC for quite some time, do not understand its nature. It was not until I saw teacher Hou Jie's "let alone MFC" that I had an essential understanding of MFC. Mr. Hou Jie's writing style is very good. This is my first time I really like a computer book.) as Mr. Hou Jie said, to learn about MFC, I must first understand the event-driven features of windows programs, messages are generated, obtained, distributed, judged, and processed. You must also understand the encapsulation, inheritance, and Polymorphism of C ++ ). Later, teacher Hou Jie simulated six key technologies of MFC: the initialization process of MFC, the type recognition during RTTI execution), dynamic generation, and permanent Persistence of Persistence), message ing, and message bypass, so far, MFC has been thoroughly analyzed and carefully analyzed. You can also master the nature of MFC!
My User Experience: I have used the IDE that supports MFC VS 6.0 and 2008,201 0, among which AppWizard, ClassWizard, and Resource Editor allow us to quickly build an MFC program. I think it is good to use MFC to implement simple UI functions, but to implement complicated and beautiful UI and code is too complicated, there are actually many interface libraries implemented based on MFC, it has good interface effects, but some of them charge fees. I have used Codejock. xtreme. toolkit. pro ). The MFC program generated with vs6.0 and vs 2008 depends on the corresponding VC component for running. The generated executable program contains a large number of libraries. The executable programs generated by vs 2010 only need to be accompanied by the runtime dll.
2. WTL (windows Template Library ):A c ++ UI component used to develop Windows applications. It extends the ATL (Active Template Library) to provide a series of dialog boxes, frames, and GDI objects. The Kingsoft guard we use is developed with wtl ..... The following is a reference from WTL for MFC Programmers. "WTL has two sides. It does not have the interface GUI of MFC.) the class library is as powerful, but can generate very small executable files. If you use MFC for interface programming like me, you will feel that the interface control provided by MFC is very comfortable to encapsulate and use, not to mention the built-in Message Processing Mechanism of MFC. Of course, if you don't want your program to increase the size of several hundred kb simply by using the MFC framework, WTL is your choice. Of course, we also need to overcome some obstacles: 1) the ATL style template class looks a little weird at the beginning; 2) There is no Class Wizard support, so we need to manually process all message mappings. 3) MSDN does not support official documentation. You need to collect relevant documents everywhere, or even view the source code of WTL. 4) cannot buy reference books. 5) No official support from Microsoft. 6) The ATL/WTL window is very different from the MFC window, not all of the knowledge you know about MFC applies to WTL. On the other hand, WTL also has its own advantages: 1) You do not need to learn or master complex document/view frameworks. 2) It has the basic interface features of MFC, such as the automatic update function of DDX/DDV and command status. The translator adds: Check mark and Enable mark of menu ). 3) enhanced some MFC features, such as easier-to-use window separation ). 4) generate executable files smaller than the static link MFC program. The translator adds that all source code of WTL is statically linked to your program ). 5) you can fix the wtl bug you are using without affecting other applications (in contrast, if you fix a BUG in the dynamic library of MFC/CRT, other applications may crash. If you still need to use MFC, the windows of MFC and the windows of ATL/WTL can "coexist peacefully ".
My User Experience: I have heard of these features in the process of using WTL for a long time. I have been studying these features in private due to my passion for new technologies, the books used are WTL for MFC Programmers, which makes it very convenient to use WTL for development. I happened to have access to an open-source software development developed using WTL at work. In addition, we can also learn some of Kingsoft guard's open source code. The development environment is still the VS series. You can download the corresponding WTL version and integrate it into VS as a plug-in.
3. Qt:Compared with the above two interface libraries, its biggest advantage is cross-platform. The following is taken from the open source Chinese community: "Qt is a cross-platform C ++ graphical user interface application framework developed by Nokia. It provides the functions required for application developers to create an artistic graphical user interface. Qt is fully object-oriented, easily scalable, and allows true component programming. Qt has the following advantages: Excellent cross-platform features: Qt supports the following operating systems: Microsoft Windows 95/98, Microsoft Windows NT, Linux, Solaris, SunOS, HP-UX, Digital UNIX (OSF/1, tru64), Irix, FreeBSD, BSD/OS, SCO, AIX, OS390, QNX, etc. The good encapsulation mechanism of object-oriented Qt makes Qt highly modular and reusable, it is very convenient for user development. Qt provides a security type called signals/slots to replace callback, which makes the collaboration between various components very simple; the rich API Qt includes more than 250 C ++ classes, and provides for Template-based collections, serialization, file, I/O device, directory m Anagement, date/time class. It even includes the processing functions of regular expressions, 2D/3D rendering, OpenGL, a large number of development documents, and XML support;
My User Experience: I am still developing Qt based on my passion for new technologies. I feel that implementing complex UI functions and effects is much easier than the above two interface libraries, the ide I use is Qt Creator, which is very dazzling, but I feel that the running efficiency is not as good as the VS block experience on the windows platform.) especially, the gradual debugging process is slow, sometimes the GCC compiler does not respond or you can select a windows compiler.) In addition, We found that during database operations, Qt encapsulated SQLite and executed SQL statements very slowly. I tested it, it takes 393 ms to execute an SQL statement with table Association and paging IN THE sqlite management tool, but 1410 ms to execute SQLite statement with Qt encapsulation. Who is the problem ?)
The above describes three self-used C ++ interface libraries. There are many comparisons in the industry on the three interface libraries, which have advantages and disadvantages and are not suitable for cloud use, I think it is unfair to deny the other without going through practical application. This also reflects our conservative attitude towards technology, some people will conflict with new technologies. I still think it is best to learn more related technologies and apply them in the most appropriate scenarios, for example, if you want to distribute the client over the network, I will discard the MFC and select WTL to reduce the amount of network data transmission. In cross-platform scenarios, I will prefer Qt, you know.
This article from "forever friends" blog, please be sure to keep this source http://yaocoder.blog.51cto.com/2668309/780787