Original link: http://www.developereconomics.com/cross-platform-apps-qt-vs-html5/, author Mark Wilcox, published in 2014-10-29. Translator Foruok, reprint please indicate the source.
I think the author of the analysis is in place, hereby translated out, see the fate. I opened the subscription number-"program Horizon", a random Talk about the program life, fun, energy. Scan the QR code below to follow.
You can also: open "Add Friends"-"public number"--Search "horizon"--attention.
Okay, go into the text--
----------------------------------------------
While building a standalone native app for each platform has proven to be the most successful approach for the mass consumer market, cross-platform is still meaningful. In this article, we take a look at the most popular choices, using HTML5 's hybrid web app and the aggressive challenger Qt.
Why QT Selection
Those who are familiar with QT history may be surprised to see it described as "aggressive." QT was first designed to build cross-platform desktop applications, and its founders started working for it in 1994! However, when Nokia acquired Trolltech, QT began to be interested in mobile development, the company began to develop QT, a lot of investment, want it to be the ideal tool for building mobile applications. Unfortunately, Nokia has just made this strategic decision not long before the iphone was unveiled. The iphone changed the rules of the game, and the mobile app build quickly shifted from a device with a digital keypad and a QWERTY keyboard to a touch-oriented device. Former Trolltech engineers realised they needed a very special way to create apps to support Nokia in the competition.
When Steve Jobs told the iphone that the iphone was five years ahead of its rivals, it was basically right. Maybe because Google's top officials are aware of the iphone's leading edge, Android has shortened some gaps. Unfortunately, Nokia eventually gave up its own Qt-based device to support Windows Phone, but they spent too much time on the software and ended up lagging behind in the ecosystem competition. They sold QT to one of their major service providers--digia,digia recently built a wholly owned entity--the QT Company for the QT product. Only after the complete release from Nokia, Qt returned to it as the cross-platform framework of the source, began to support the mainstream mobile platform. At the same time, however, others have seen the great foundation of Nokia's investment mobile app, so BlackBerry 10 (BlackBerry), Jolla sailfish (Swordfish), Ubuntu Mobile and Tizen platforms all choose Qt as the core framework.
Personally, I rewrote a popular iOS game with Qt for Symbian earlier in 2011. The UI design and general debugging tools were a little immature at the time (the translator notes: Now, 2015, a lot better), but on all the platforms I've worked on, it has the simplest learning curve and the most enjoyable development experience (original author Note: I didn't get a penny for that)--despite Qt The core uses C + +, which is less friendly but high-performance for developers. I even achieved 60fps performance on some fairly low-profile hardware. Learning Qt New UI Technology--QT quick--is quite simple and you can build a menu interface for the game in just a few days.
Why choose HTML5, or don't choose
HTML5 is the most popular choice for developers to build cross-platform mobile apps, but it seems to be a bit out of favour. Web browsers and Web views are available on every platform, and web developers can translate the technology for creating websites into building apps. Open-source frameworks like Cordova (PHONEGAP) Allow developers using HTML5 to access the additional features of mobile devices, and it's easy to package apps into native formats for each platform. The extra benefit is that you can usually have a minimal amount of effort, while having a web-based app and an app in the App Store. When building UI-centric applications, HTML5 is often more efficient than native apps. HTML5 also has some embarrassment when it comes to using libraries and frameworks to build mobile web apps. Hybrid Web applications have a special advantage (at least on IOS) to be able to update their code directly, bypassing the App Store review process (except for major changes).
Given its universality and vast developer base, why is HTML5 not the default cross-platform approach? Despite the many advantages, hybrid Web application developers have been struggling with performance issues (partly due to incomplete or outdated WebView implementations, which have been fixed on the latest version of iOS and Android, although this will take some time to penetrate the entire installation base). Another problem is that the variety of mobile browsers ' support for standards is messy (which is improving but is far from being completely resolved). Web technology has not really been designed to meet the animated UI that mobile users now expect. This is also the highly recommended framework famo.us is dedicated to solving problems.
Some very high-profile consumer startups have been publicly switched from web hybrid applications to native mobile apps. The most common argument about these switches is the lack of enough relevant tools. To be sure, it is possible for web apps to perform well on mobile devices with limited memory, but given the current state of debugging and profiling Tools, it's still not easy to do with native applications. So, not all applications need perfect UI animations, and I'm not comparing HTML5 with native apps, so let's look at how it compares to Qt.
Qt Contrast html5--Reversible
Supported platforms
- HTML5 support is everywhere
- QT supports all major platforms (and non-mainstream platforms happen to use it as a UI)
While you can theoretically use HTML5 to fit more platforms, this is not why most developers use it in the real world. HTML5 developers are increasingly abandoning their browsers and building hybrid apps. Most mobile developers are developing for several platforms in Android, IOS, Windows phone, and BlackBerry 10. Qt not only supports these platforms, but also supports more. In fact, in practice our data show that, on average, Qt developers actually cover a little more platform than HTML5 developers. As a result, for developers who want to run software on any platform such as smartphones or smart TVs, QT has a significant advantage over HTML5 to dead heat the two.
Learning curve
This depends on whether you are already a web developer. If you are, learning to build mobile web apps may be easier than learning Qt. However, if you are a novice, then Qt has a clear advantage-you only have a framework to learn, and HTML5, you have to start with a 10 of a dozen frames to choose from. Qt also has very powerful documentation, and web frameworks do not necessarily. In a fair game, this is a big victory for Qt.
Open
- HTML5 is an open standard, with multiple open source implementations.
- QT is open source, but has two licenses and is effectively controlled by a single supplier.
Obviously HTML5 is more open than Qt. This is not always an advantage. The process of creating standards and having multiple vendors implement them is long and Qt can be more flexible. If you really need an open source project to fix bugs or add a new feature, you can do it yourself or pay someone to do it. If you need to support IE and have a problem with IE, you must resolve it yourself or wait for Microsoft to resolve it. Also, no supplier can lock HTML5, so that the web will not go anywhere. Others can buy Qt and take it to a direction that doesn't match your goals, or they can raise the price beyond your budget. HTML5 has an advantage in this, but not a definite victory.
Cost
- Building HTML5 is free of charge. There are also some non-essential payment tools available to help.
- For most commercial applications on the mobile side, Qt requires a business license.
Qt's Open Source license agreement is incompatible with most app stores. Although Qt's IOS version is developed in open source, you need a business license to be available in the App Store. Using Qt to develop mobile apps for IOS and Android stores, the lowest cost is $25 for one months. HTML5 wins.
Cross-platform compatibility
- A standard pair of HTML5 should have multiple independent implementations.
- QT is a vendor that implements the same runtime environment on multiple platforms.
Multiple implementations, working with several open source partners and a large community to report and work around compatibility issues create a very robust platform. Even so, having a supplier that ensures that all platforms are consistent is almost always better for your application compatibility. Qt wins.
Performance
- HTML5 's Dom is not built for today's mobile apps.
- The scene graph of Qt Quick (QML) is built directly on OpenGL es.
Both environments use JavaScript. However, using Qt, if you really need the functionality or performance of the native platform, will be much easier to descend into native code. With Qt, the performance penalty for switching between JavaScript and native code is much lower. However, the biggest difference is the graphics performance. The pursuit of performance in the use of HTML5 often with the help of complex solutions to circumvent the DOM, can not touch. Building the entire UI on WebGL looks like a promising approach, but it depends on the future implementation. WebGL is now more broadly supported (Apple has added support for WebGL in iOS8). Qt has a big advantage in this, and there are more animation options than the web Developer's CSS3,QT.
Native User Experience
- With HTML5, you either rely on third-party frameworks like Ionic or build your own alternatives to native interface elements.
- With QT You can use components that clone native interface elements, or call the native UI directly.
The ability to invoke the native API in Qt may give it an advantage at this point, but it actually loses cross-platform compatibility. In fact, when you need a true native user experience, that choice doesn't exactly meet your needs. Two scenarios can mimic a subset of some applications. In general, you can use a cross-platform approach when you need a fully customizable UI or a native look and feel that is not really necessary.
Conclusion
By comparing these indicators, Qt has a slight advantage over HTML5. However, you can also use other indicators to compare and draw the opposite conclusion. In practice, you need to choose the right technology for your project. Two options have the advantage, if you are a HTML5 developer, unfamiliar with Qt products, they are worth a look. And I didn't mention that Qt can use WebView to display HTML5 content, which means it doesn't have to be either.
------------------------------
I opened the subscription number-"program Horizon", a random Talk about the program life, fun, energy. Scan the QR code below to follow.
You can also: open "Add Friends"-"public" and search "program Horizon"-attention.
Cross-platform application: Qt duel HTML5