Introduction: Recently the company's new product app to carry out research and development, the boss's intention is to use H5 to do mixed apps to achieve efficient agile development purposes. I naturally began to carry out a variety of technology selection of research, here is the key to say that I finally picked out the 2 hybrid app development Technology solutions: RN (react native), Hbuilder. React native is the famous Facebook open source technology framework, and Hbuilder is the H5 tool development company Dcloud product in China. Let me summarize it myself: these two technical frameworks are basically comparable to the speed of web development in terms of development efficiency, and RN emphasizes that "learn once, Write Anywhere", RN does not demand a native code to support multiple platforms, while Hbuilder can implement Java-like " Write once, run anywhere, which means writing a code to publish multiple platforms at the same time, is more efficient than native development. The principle of the two are based on JS in the front-end development, with JS to do the bridge calls the native API, the biggest advantage is to make the app dynamic update without frequent release version, of course, hybrid this framework also has weaknesses, is the current native app development ecology has become mature, Some third-party libraries and frameworks are not only rich and stable, so if you use the JS-based hybrid app solution, be sure to consider whether app products are suitable for this technology.
Below I put some netizens ' views on these two frameworks are listed below for reference:
PhoneGap out of the early, natural use of more people.
PhoneGap own localization is the mixed development hybrid, uses the native +js;
Hbuilder's positioning is pure JS to take care of everything.
5+ and PhoneGap are superior to phonegap in capabilities, performance, and ease of development.
First look at the ability:
5+ has html5+ and native.js technology, html5+ contains hundreds of commonly used cross-platform API, can meet the general development needs, and native.js the 40w native API mapped to JS object, so JS can directly tune the native. The combination of html5+ and native.js form the most powerful engine of power. and phonegap need to use the native engineer to write the original plug-in and to the JS developer package interface to achieve JS tuning native ability, development costs, the requirements of people are not the same.
Of course 5+ also supports native plugins, which is similar to PhoneGap. A native SDK that has been written without the need for native.js rewriting or integration with the 5+ SDK. See document Center –5+ app–5+ SDK
5+ 's direct package cross-platform API comparison full, two-dimensional code, shake, map, share, voice input, push these common APIs are cross-platform, easy to use. See http://www.html5plus.org/
See Performance again:
PhoneGap do the app, on the low-end Android phone is difficult to run smoothly, otherwise HTML5 long ago, the original development has been squeezed. PhoneGap to avoid the poor HTML5 experience, the use of the spa mode, but this mode in fact, the low-end machine can not play, and the code is very complex.
5+ app has a higher performance, its dynamic effect is handled by our enhanced engine, through the enhanced engine, can be smooth on the low-end machine to run a variety of dynamic effects, such as side-by-side menu, drop-down refresh, long list scrolling, see home Page –app tab-Performance video
Finally look at the development of convenience:
PhoneGap no professional development tools, grammar hints, debugging, packaging are very troublesome.
In Hbuilder, 5+ 's syntax API hints are perfect;
The mobile phone through the data cable connected to the computer, Hbuilder can be real machine running, save a page immediately see the effect on the phone, Android can also see Console.log. And with PhoneGap, you change the page, you have to pack it, then install it on the phone, then find the wrong, then change the code, and then continue to pack ...
With regard to packaging, phonegap is provided by Adobe for Cloud packaging, but it needs to prepare resources on the machine before committing to a foreign server, and Hbuilder is a one-click package for more convenience. Of course, both PhoneGap and hbuilder support local packaging, which requires a bit of native development knowledge.
In addition to tools and runtime, there are MUI frames
PhoneGap is just a phone runtime, no Hbuilder tools, no MUI frame.
MUI is the closest to native app HTML5 framework, its experience than JQM, Bootstrap and other frameworks closer to the native, its performance is much higher than JQM, Bootstrap, Ionic, Framework7 and other frameworks.
This performance difference causes 2, on the one hand is the design idea different, Mui insists to use the native JS to do, does not rely on jquery or ANGULARJS, because the framework relies more, the app performance is worse, on the other hand because the MUI invokes the 5+ 's underlying native acceleration, which is faster than the frame without the native acceleration.
MUI See: http://dcloudio.github.io/mui/
Of course PhoneGap has an advantage, is to support Windows Phone, BlackBerry, this aspect 5+ really does not support.