Editing Angular VS Knockout VS ExtJS 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) Designed to test binding to rendering performance of these frontend frameworks. Backbone.js was removed due to implementation possibilities 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) <!-- JQURY --> <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script> <!-- ANGULAR --> <script src="http://code.angularjs.org/angular-1.0.1.min.js" ng:autobind></script> <script> var Ctrl=function($scope){ $scope.data=[]; } </script> <div ng:app> <ul ng-controller="Ctrl" id="angList" > <li ng-repeat="item in data">{{item}}</li> </ul> <script> var SetANG= function(data){ $('#angList').scope().data=data; //Need to do this next line to notify angular that data has been updated $('#angList').scope().$apply(function(){}); }; </script> <!-- ANGULAR Update --> <script> var CtrlUpdate=function($scope){ $scope.data=[]; } </script> <ul ng-controller="CtrlUpdate" id="angListUpdate" > <li ng-repeat="item in data">{{item}}</li> </ul></div> </div> <script> var SetANGUpdate= function(data){ $('#angListUpdate').scope().data=data; $('#angListUpdate').scope().$apply(function(){}); }; </script> <!-- EXT --> <script src="http://docs.sencha.com/ext-js/4-0/extjs-build/ext-all.js"></script> <div id="extme"></div> <script> var EXTData= [ ]; var store = Ext.create('Ext.data.Store', { storeId:'employeeStore', fields:['name' ], data: EXTData }); Ext.create('Ext.grid.Panel', { title: 'Employees', store: Ext.data.StoreManager.lookup('employeeStore'), columns: [ { dataIndex: 'name' }], renderTo: Ext.getBody() }); var SetEXT=function (data){ store.removeAll(); store.add(data); } </script> <!-- KO --> <script src="http://cdnjs.cloudflare.com/ajax/libs/knockout/2.0.0/knockout-min.js"></script> <script>var KOData=null;</script> KO:<BR><span id="KOTest" data-bind='text: KOData'> </span><BR> <script> KOData=ko.observable([]); ko.applyBindings(); var SetKO=function (data){ KOData=ko.observable(data); ko.applyBindings(); } </script> <script> var ANG50ID=[]; for (var i=0; i<50;i++){ ANG50ID.push('ITEM'); }; var EXT50ID=[]; for (var i=0; i<50;i++){ EXT50ID.push({name:'ITEM'}); }; var KO50ID=[]; for (var i=0; i<50;i++){ KO50ID.push('ITEM'); }; var ANG100ID=[]; for (var i=0; i<100;i++){ ANG100ID.push('ITEM'); }; var ANG100ID2=[]; for (var i=0; i<100;i++){ ANG100ID2.push('ITEM2'); }; var EXT100ID=[]; for (var i=0; i<100;i++){ EXT100ID.push({name:'ITEM'}); }; var KO100ID=[]; for (var i=0; i<100;i++){ KO100ID.push('ITEM'); }; var ANG1000ID=[]; for (var i=0; i<1000;i++){ ANG1000ID.push('ITEM'); }; var EXT1000ID=[]; for (var i=0; i<1000;i++){ EXT1000ID.push({name:'ITEM'}); }; var KO1000ID=[]; for (var i=0; i<1000;i++){ KO1000ID.push('ITEM'); }; </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) SetANG([]); SetEXT([]); SetKO([]); SetANGUpdate(ANG100ID); Define teardown for all tests (runs after each clocked test loop, outside of the timed code region) (see FAQ) Code snippets to compare Test 1 Title Async (check if this is an asynchronous test) Code SetANG(ANG50ID); Test 2 Title Async (check if this is an asynchronous test) Code SetKO(KO50ID); Test 3 Title Async (check if this is an asynchronous test) Code SetEXT(EXT50ID); Test 4 Title Async (check if this is an asynchronous test) Code SetANG(ANG100ID); Test 5 Title Async (check if this is an asynchronous test) Code SetKO(KO100ID); Test 6 Title Async (check if this is an asynchronous test) Code SetEXT(EXT100ID); Test 7 Title Async (check if this is an asynchronous test) Code SetANG(ANG1000ID); Test 8 Title Async (check if this is an asynchronous test) Code SetKO(KO1000ID); Test 9 Title Async (check if this is an asynchronous test) Code SetEXT(EXT1000ID); Test 10 Title Async (check if this is an asynchronous test) Code SetANGUpdate(ANG100ID2);