erisu commented on code in PR #1315: URL: https://github.com/apache/cordova-docs/pull/1315#discussion_r1205454998
########## www/docs/en/dev/guide/next/index.md: ########## @@ -37,47 +37,50 @@ Even if you choose not to use Cordova, creating a mobile application without usi Examples of SPA libraries you can use in your Cordova applications are: -* [ReactJS](https://reactjs.org) -* [Vue](https://vuejs.org/) +* [React](https://react.dev/) +* [Vue.js](https://vuejs.org/) * [Angular](https://angular.io/) -* [EmberJS](https://emberjs.com) -* [Backbone](https://backbonejs.org) +* [Ember.js](https://emberjs.com/) +* [Backbone.js](https://backbonejs.org/) * [Kendo UI](https://www.telerik.com/kendo-ui) * [Onsen UI](https://onsen.io) -* [Sencha Ext JS](https://www.sencha.com/products/extjs/) And many, many, more. -## 2) Performance Considerations +### 2) Performance Considerations Consider the following issues to improve the performance in your mobile applications: -**Click versus Touch** - Many devices impose a 300ms delay on click events in order to distinguish between a tap and tap-to-zoom gesture. This can have the effect of making your app feel slow and unresponsive. Avoiding this delay is one of the most important ways of improving your app's perceived performance. For more information on the tap delay, see [300ms tap delay, gone away](https://developers.google.com/web/updates/2013/12/300ms-tap-delay-gone-away) on the Google Developer site. +* **Click vs. Touch** -Most Android versions no longer impose this delay, but iOS by default still does. For iOS, using [WkWebView](https://github.com/apache/cordova-plugin-wkwebview-engine) instead of the default UIWebView gets rid of this delay. For both Android and iOS, you must ensure that your viewport meta tag has at least `width=device-width`, or you will still have the tap delay. If you need to support older devices (Android 4.4 or iOS 8), consider a polyfill such as [FastClick](https://github.com/ftlabs/fastclick), or using `touchstart` and `touchend` instead of `click`. + Many devices impose a 300ms delay on click events in order to distinguish between a tap and tap-to-zoom gesture. This can have the effect of making your app feel slow and unresponsive. Avoiding this delay is one of the most important ways of improving your app's perceived performance. -**CSS Transitions versus DOM Manipulation** - Using hardware accelerated CSS transitions will be dramatically better than using JavaScript to create animations. See the list of resources at the end of this section for examples. + For more information on the tap delay, see [300ms tap delay, gone away](https://developer.chrome.com/blog/300ms-tap-delay-gone-away/) on the Google Developer site. -**Networks Suck** - Ok, networks don't always suck, but the latency of mobile networks, even good mobile networks, is far worse than you probably think. A desktop app that slurps down 500 rows of JSON data, every 30 seconds, will be both slower on a mobile device as well as a battery hog. Keep in mind that Cordova apps have multiple ways to persist data in the app (LocalStorage and the file system for example). Cache that data locally and be aware of the amount of data you are sending back and forth. This is an especially important consideration when your application is connected over a cellular network. + As of 2015, most Android and iOS devices no longer imposes the delay. For both Android and iOS, ensure that your viewport meta tag has set the `width=device-width` value or you will still have the tap delay. -**Additional Performance Articles and Resources** +* **CSS Transitions vs. DOM Manipulation** -* ["Fast Apps and Sites with JavaScript"](https://channel9.msdn.com/Events/Build/2013/4-313) + Using hardware accelerated CSS transitions will be dramatically better than using JavaScript to create animations. See the list of resources at the end of this section for examples. -## 3) Recognize and Handle Offline Status +* **Network** + + Latency of mobile networks, even good mobile networks, is far worse than you probably think. A desktop app that slurps down 500 rows of JSON data, every 30 seconds, will be both slower on a mobile device as well as a battery hog. Keep in mind that Cordova apps have multiple ways to persist data in the app (LocalStorage and the file system for example). Cache that data locally and be aware of the amount of data you are sending back and forth. This is an especially important consideration when your application is connected over a cellular network. Review Comment: Maybe refactor this more? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
