I created a calendar application using backbone.js. When I look at it using the Chrome browser the performance is ok but a little slugish but on the iPad which is the target device, the performance sucks.
I wonder if I have created too many views.
I created a month view, showing the days of the Week, and the hours of the day using a Backbone.View for each object. The hourview is bound to the click event and rerenders when clicked. But in view counts it all adds up, 1 month view + 35 day views + 35 * 16 hour views = 596 views. Is that too many?
hour = Backbone.Model.extend({});
hours = Backbone.Collection.extend({});
hourView = Backbone.View.extend({});
day= Backbone.Model.extend({});
days= Backbone.Collection.extend({});
dayView = Backbone.View.extend({});
month = Backbone.Model.extend({});
monthView = Backbone.View.extend({});
This is my first time with backbone.js so any guidance would be helpful.
Difficult to tell based on what you provided. Generally speaking, the more object, the more memory the less speed. Different visual effects can be slow on iOS devices also when not using the native transition/transforms (CSS3).
I would not have different views for each part of the calendar. That's overkill. I wold create a single calendar view and have it refresh its parts as necessary.