Editing Ember vs Backbone Large Data This edit will create a new revision. Your details (optional) Name Email (won’t be displayed; might be used for Gravatar) URL Test case details Title * Published (uncheck if you want to fiddle around before making the page public) Description (in case you feel further explanation is needed)(Markdown syntax is allowed) Are you a spammer? (just answer the question) Preparation code Preparation code HTML (this will be inserted in the <body> of a valid HTML5 document in standards mode) (useful when testing DOM operations or including libraries) <div id="container"></div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.3/underscore-min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/backbone.js/0.9.9/backbone-min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.rc.1/handlebars.min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/ember.js/1.0.0-pre.2/ember-1.0.0-pre.2.min.js"></script> <script type="text/x-handlebars"> < span > { {#each App.collection.content} } < span > { {this} } < /span> {{/each} } < /span> </script> <script> var dataList = []; for (var i = 0; i < 10; i++) { dataList[dataList.length] = i; }; function GlobalObj(){ var obj = {}; obj.data = []; for(var i=0 ;i<dataList.length;i++){ obj.data.push(dataList[i]) ; } } function emberJS() { App = Ember.Application.create({ }); App.Model = Ember.Object.extend(); App.collection = Ember.ArrayController.create({content: []}); dataList.forEach(function(item) { App.collection.pushObject(App.Model.create({number: item})); }); App.view = Ember.View.create({ }); }; function backboneJS() { templateBackbone = Handlebars.compile(""); var collection = new Backbone.Collection(); dataList.forEach(function(item) { collection.add(new Backbone.Model({number: item})); }); var View = Backbone.View.extend({ el: '#container', render: function() { var contents = templateBackbone({list: this.collection.toJSON()}); } }); $(function() { var app = new View({collection: collection}); app.render(); }); } </script> Include JavaScript libraries as follows: <script src="//cdn.ext/library.js"></script> Define setup for all tests (variables, functions, arrays or other objects that will be used in the tests) (runs before each clocked test loop, outside of the timed code region) (e.g. define local test variables, reset global variables, clear canvas, etc.) (see FAQ) Define teardown for all tests (runs after each clocked test loop, outside of the timed code region) (see FAQ) $('content').html(''); Code snippets to compare Test 1 Title Async (check if this is an asynchronous test) Code emberJS(); Test 2 Title Async (check if this is an asynchronous test) Code backboneJS(); Test 3 Title Async (check if this is an asynchronous test) Code GlobalObj();