Recently, many H5app frameworks have been discovered, such as react-native,wex5,phoneGap, etc. Developers only need to write html5 plus js plus css. there is nothing wrong with opening the web page. when packaging into android client and iOS client, do you use the web page to load or convert all the buttons and text into native controls? Such as UIView UIbutton of iOS.
Most frameworks, such as PhoneGap, do not convert html5 into native controls, but use native
Webview loads html in the same way that you open a browser to browse a web page, thus realizing cross-platform. However, these frameworks also provide js with the ability to call native code, so that the business logic developed by the front-end language can access some of the system’s native functions (power, location, etc.). This method is called hybrid application. in UI, simple layout and space are developed by html5, complex layout and controls are developed by native language, and the framework provides the ability to instantiate and add controls developed by native language into application layout, so hybrid method is flexible and low in cost.
Since the browser’s performance in rendering html pages is still not comparable to that of native, frameworks such as react-native directly use Native controls, but the description of controls is based on js syntax customized by the framework instead of html5, because it is too complicated to convert html5 into native controls (html standard is very complicated), and most frameworks are designed for cross-platform (android ios), and every platform has to do the conversion, which is different from developing a web browser.