Recently 1, 2 months have been trying to develop a Hybird app, encountered a lot of problems, talk about their own experience.
Hybird App (Mixed-mode mobile app), which utilizes mobile apps developed in a hybrid way, such as the Android- webview component +html5 embedded Way,
The benefits are obvious, because the embedded is HTML5, so cross-platform, scalability, development costs are very good advantages.
Hybird app has a lot of solutions from development tools to packaged release, the more famous is the phonegapfrom Adobe, the domestic appcan, these 2 kinds of solutions have a better tool platform. This time I use is appcan, need to pay attention to IS Appcan development tool only Windows platform, in addition have to spit groove is, the solution inside the JS plugin script, bug many.
The technical architecture I used,
The use of Appcan as a packaging platform for applications, through its built-in JS components for data requests, the requested data using JS to do some business logic processing, using AngularJS for binding rendering, UI components of the things used Gmu.js, and GMU built-in zepto.js and scroll.js , and so on, the page is H5+CSS3. Can see is compared with the traditional web, which more than a lot of JS framework and library applications, after all, the data call and business processing are moved to the JS side, so here to remind you, you can consider adding JS module management framework, such as Seajs. Data binding This feeling angular really good, write good binding, only need to focus on the backend JS data business processing can, improve a lot of development efficiency.
In the coding phase encountered a lot of problems, such as not able to use the URL as usual as the parameters passed, found that the page can not crawl the parameters after the jump. To reduce the number of requests, you also try to use localstorage cache json. Improve the response speed of the interface by Manifest cache html,css,js files. by CSS3 instead of JS to do animation effect, but the effect is not ideal, feel or no JS to smooth. Page Jump white screen, data load delay and so on, loading the animation experience needs to do better, and minimize the page jump, some features to focus on a single HTML file.
All in all, there are a lot of optimization methods, but obviously this kind of hybird app is still a lot of problems in the performance experience, but such as some interactive simple app, it can still be considered.
Hybird app (mixed-mode mobile app) development first experience