Lately I have been building a mobile phone application using Sproutcore20 and now Ember.JS. This works great on my iPhone (3GS) though it stutters on many android devices.
The simplest thing, like switching from main menu item, and thus loading in a different view feels all but native.
Currently it makes use of template views which are appended and removed in a statechart. Each main menu item has a main state in which the corresponding views are appended (and removed on exit).
This method seems optimal to me but it does not function optimal, so I am wondering if an alternative approach like appending all views on load (deferred) and visibility toggling would improve performance (1)? It would make the DOM larger and thus operations on the DOM slower.
What is an optimal Ember.js code structure for building a mobile application, and what considerations need to be taken into account when building for mobile devices(2)?
Ember. js is a JavaScript framework for creating ambitious web applications.
It should also be mentioned that Ember is purely a frontend framework. It has a number of ways of interacting with the backend of your choice, but this backend is not in any way handled by Ember itself.
When many elements are used in a project, it is preferable to use React JS due to its fast performance. Ember is considered to be one of the best in distributor logic. It provides the best combination with ember-data and the best CLI, which makes working with Ember much easier.
What is Ember? Ember is a front-end framework for building web applications. It uses the MVC framework to serve data to views that update automatically as the underlying data changes. Ember makes building a responsive web application super easy.
It really depends on your application. In general, limiting the number of DOM elements and the number of DOM changes helps performance. Deciding whether to leave elements in the DOM and hide/show them, or to create/destroy elements on demand depends on the usage patterns of the app. If you expect the user to move quickly back and forth between views, hide/show can make sense.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With