Readme (Eng.) - mediaexplorer74/miniblink49 GitHub Wiki
Miniblink is a chromium-based browser control that can also be used to develop software (similar to electron). For more information, please refer to the official website .
blinkUI is a UI interface library based on blink, which only retains UI-related code, removes browser functions, and is only used to develop UI interfaces. Use web (js+HTML+CSS) to write the interface, and C++ to write the logic. Both the development efficiency of the web and the running speed of C++
Because blink is too coupled and has too much UI-independent code, I chose to crop and extract UI code from miniblink, and removed nodejs, and used C++ to develop logic instead, so that I can have the running speed of C++.
This project is only used for technical research for the time being, and it only takes 1 to 2 weeks to cut and change, so there will be many details and bugs that have not been perfected. After the work is done, we will continue the open source project.
-Extremely compact size -C++, C#, QT, MFC, Delphi and other language frameworks can all be combined with each other to reduce the risk to 0 (if this interface library cannot implement the function, you can use the native library to implement it) -Support Windows xp, npapi -HTML5 support, friendly to various front-end libraries, such as vue, etc.
-Support TypeScript, which is more convenient for developing large-scale projects, and does not have the various historical burdens of js -Cross-PC platform -Cross-mobile platform
##1. Introduction to the reasons: -Separation of business logic from interface: js script does the interface, c++ does the logic.Changing the interface will not affect the logic, which greatly reduces the bug rate and improves maintenance efficiency.
-Performance: Electron and others use nodejs to write logic, the performance is much worse than c++, so the logic part is still written in C++. The web only does the interface, and it has no effect on performance (it can reach 60 frames in one second, and the naked eye can't see the difference) If the interface code affects the performance, it must be a problem with the code design, because even antique machines from 20 years ago can do 60 frames per second. (Ordinary software is not a game, there are very few animations, and it doesn't need to be so high-performance)
-Efficient and rapid development: The development efficiency of scripts is much faster than that of C++, and a lot less code is written. Moreover, the interface is changed very frequently, and it is separated from the logic by putting it in the script, which can not only reduce the bug rate, but also can be done without compilation.
-The web interface is the most powerful and complete: The underlying design concept of the web interface is completely different from ordinary DirectUI, and it can realize various cool and perverted interface requirements very quickly. Not only is the amount of code dozens of times smaller, but there is no need for developers to understand the interface principle.
##2. The development efficiency is several times or even dozens of times worse: For example, if you want to realize the animation function, MFC has to write the animation logic by itself. Simple animations need to write hundreds of lines, and complex animations need to write thousands of lines, and it is difficult to generalize. The web implements the same animation, as long as a few lines of code, up to dozens of lines of code.The amount of code is [100 times less], and the development speed is naturally 100 times faster.
The MFC self-painted button, the well-known open source library ButtonST, also took more than 3,000 lines of code to implement. But the web still only needs a few lines of code to achieve these effects, and it can also achieve effects that it can't do, such as special-shaped buttons, and the outer ring of the button area glows (it has to make more than 5,000 lines, or even more).
##3. The web has the most powerful ecological support: Although the efficiency of js is not as good as scripts such as lua, html is not as concise as json. But the web has the most powerful ecological support, such as: -The most complete support for various documents, as long as you know C++, you can learn most of the grammar in a few hours.If you encounter a new problem, you can also search for a solution quickly. Other self-created interface libraries haven't figured out the way in a few hours, and when they encounter new problems, they can only look at the source code or even debug the source code to solve them.
-Although other interface libraries can also implement all the functions of the web, the most powerful and reliable is the web. For example, QT's QML, HTMLayout, Jinshan's kdgui, etc., have all created their own set of syntax and system., However, there are still many bugs, or dark pits, or not convenient enough, insufficient documentation, and it is difficult to solve new problems. You have to debug the interface library code by yourself.
-There are so many web open source contributors
##4. Low experience requirements for developers: MFC and VC++ require at least 3 years of interface development experience (QT also requires 1~3 years of experience) in order to quickly implement a variety of complex and cool interfaces. For example, if you want to implement a cool button button, you have to call the underlying API to draw it yourself, and you need to understand the interface principles (such as message mechanism, GDI drawing, etc.), In particular, the messaging mechanism is the most complex, and without 3 years of interface experience, it is basically impenetrable. Even if there are open source libraries that can be used, these open source libraries are still not powerful enough. When encountering more complex interfaces, you still have to draw and understand the principles of the interface by yourself.
On the web, only one ordinary fresh graduate is required to achieve these functions. Because the web does not need to understand the underlying messaging mechanism and does not need to be self-painted, it can combine and assemble the interface at will to realize all complex and cool interfaces, including animation, which can be achieved in just a few lines of code.
The web is easy to recruit, and the salary is also low Few people can develop windows now, and even fewer people can C++, and the talents have been broken for generations. But web programmers grab a lot of them, and fresh graduates can also get started quickly.
##5. Other advantages: -Automated testing, most frameworks can only automate the test logic, but the web can also automate the test interface (although others can also be implemented, you need to develop the basic library yourself) -Dynamic debugging, changing the interface, etc., as well as a bunch of web benefits, this is not an example.
##6. A simple summary is: It takes [1 month] for C++ to be developed, and the web can be done in [1 week] at most, and even some can be done in one or two days (because there are many ready-made open source libraries) Generally, writing gadgets has no performance requirements, I use js or python to do it.
The more complex and cool the interface, the more perverted the requirements, the more it can reflect the power of web functions and the advantages of development efficiency.
##1. Tencent's GF interface Library Basically only the QQ department is left to use, not even the WeChat department. At that time, it cost tens of millions of dollars, and it took a year to come up with it, and it was also extended to the whole company, but because there are very few documentation tutorials, it is difficult for people who don't understand the interface to get it done quickly when they encounter problems., And the ease of use is not as good as the later duilib, plus the developers of the interface library have basically been promoted or left, and almost no one continues to maintain and promote it, so it has declined.
When I encountered a bug, I had to debug the kernel code of the interface library several times to find the reason. When I found the reason, I couldn't easily modify it because the impact was too wide. Generally, the function is implemented by bypassing the bug. But most people don't know much about the interface, and they can't solve problems quickly, so their decline is inevitable.
##2. Jinshan's shell library bkwin, kdgui It is because there are few Jinshan projects, so Jinshan Poison Tyrant has been using it.But WPS uses QT, and Jinshan Network disk also uses duilib. Jinshan also has an interface library called kdgui, which is only used for Poison Tyrant's acceleration ball interface. In fact, it is very powerful, better than Tencent's GF interface library, animation and various cool interfaces can be quickly implemented., It is comparable to the efficiency of web development, and it is written in C++ logic, and it runs very fast. And it uses the Squirrel script Squirrel, which is about the same speed as lua, but the syntax is similar to C++; instead of xml, json is used, which is more concise. However, due to the departure of core personnel and too few documents, it has still declined.
##3. Thunderbolt's BOLT interface library It was also slowly abandoned because of the departure of core personnel. Thunderbolt network disk was changed to duilib, and the new version of Thunderbolt was changed to electron.
##4. Open source interface libraries such as duilib, SOUI, etc. Due to limited developers and no company support, they are all half-dead. If you have any problems, you have to change the interface library by yourself., Before there is no better interface library, they are indeed the best choice
##5, QT Also because it was sold around, the development was very slow, -The core concept of QWDGET is similar to MFC and is outdated, but because it is more complete than MFC, there are many ready-made frameworks.If you don't have too difficult interface requirements, or you don't change the interface often, it's still good to use. -The core concept of QML is similar to that of the web, which is very advanced, but due to too many bugs and self-created syntax, it does not have the perfect ecology of the web, so there are still many problems, and you have to solve them yourself when you encounter problems.
##6. flutter, etc. Mainly, the mobile terminal is more mature, but there are still many bugs and problems on the PC terminal.In particular, flutter's wonderful nested grammars are very redundant and cumbersome. I am not optimistic about these new grammars. They have not been tested by time and have no perfect ecological support. They are purely technical.
##7. Summary The above historical facts all prove that even an interface library like Tencent, which cost tens of millions of dollars, could meet the needs of several years at that time.However, with the update of technology and the iteration of requirements, it will be slowly eliminated. Only by standing on the shoulders of giants can we truly develop for a long time and become stronger and stronger.
In the current software development, ** is no longer the realization of functions, but the development efficiency and maintenance efficiency. When it comes to implementing functions, all functions can be realized with MFC from more than 20 years ago, or even directly with VC++ API, so as long as the basic skills are good, there are no functions that cannot be realized, and there is no point in competing. But when it comes to development efficiency, the difference is too big.: -The MFC self-painted button needs to be improved a little bit, it requires [3000 lines] of code, and it requires a senior interface developer to get it done.; The same function can be achieved with [a few lines of] web code, and only fresh graduates are required to do it. There is no need for self-drawing or understanding of various interface principles. The design concept of QT is very similar to that of MFC. It is estimated that self-drawing buttons also require hundreds to thousands of lines of code. At least everything has to be drawn by calling the API, not a few lines of code.
-MFC to make a cool interface, it takes 3 to 6 months for one person to develop (refers to large projects, not small tools); the web only takes 1 to 2 weeks. QT and duilib also take about 1 month.
Fight maintenance efficiency: -MFC and QT are everywhere with interface and logic coupling. When changing the interface, the logic code will basically be changed or moved, which is a bug risk.duilib is a bit better, but also very good. The web does not have this problem. The interface can be greatly revised, and then the logic code does not need to be changed at all (provided that the code design is reasonable), and it does not even need to be recompiled.
If you don't choose the web and don't stand on the shoulders of giants, then in terms of ecology, documentation, etc., it will be slowly eliminated and declined. In the end, only a few people with strong interface skills will be left to use it, and others will choose other interface libraries that are easier to use. Although interface libraries such as flutter were developed by giants, they are still too young to be tested like the web. After decades of testing, the selection risks and costs are still great.After all, there are many projects abandoned and dead by Google and Microsoft.
Q group 956223415
Special thanks to good gay friend weolar, he is the author of miniblink and kdgui
When I was in Jinshan Poison Tyrant, I assisted him for a period of time and wrote a more convenient and powerful control library for kdgui, which increased the development efficiency by 4 times.
(It took 1 month to develop a complete project before, and only 1 week after using the control library)
Now continue to give him assistance and extract the UI part of miniblink miniblink49 upgraded to VS2022, resolved compilation errors, and deleted some unwanted things
Url: https://github.com/Alberl-Lee/miniblink49-VS2022 (fork)