ion
Version:
ion language ========================
146 lines (122 loc) • 4.82 kB
Plain Text
These are the results from a source code comparison tool I wrote.
I am only counting application specific files, not framework files and not css files.
The size ignores all comments and all preceding and trailing white space on every source line.
It is intended to give a fair estimate of the application specific code size for each implementation.
Summary:
Dojo is by far the worst from a complexity point of view with 17 files and 25K of code.
Ion is the simplest requiring only a single file and 2.3K of code.
Knockout is second most concise requiring only two files and 5.9K of code.
Angular, Ember and Polymer all require about 5-9 files and 6-7K of code.
React has average file count at 6, but code size is 50% above average at 9.6k.
React
C:\Projects\todomvc\architecture-examples\react>node\Projects\ion\lib\test\sourceSize.js index.html js
index.html : 1117
js\app.jsx : 3067
js\footer.jsx : 1038
js\todoItem.jsx : 2107
js\todoModel.js : 1514
js\utils.js : 821
---------------------------------------
Total Files : 6
Total Bytes : 9664
AngularJS
C:\Projects\todomvc\architecture-examples\angularjs>node \Projects\ion\lib\test\sourceSize.js index.
html js
index.html : 2720
js\app.js : 358
js\controllers\todoCtrl.js : 1840
js\directives\todoEscape.js : 378
js\directives\todoFocus.js : 388
js\services\todoStorage.js : 369
---------------------------------------
Total Files : 6
Total Bytes : 6053
Polymer
C:\Projects\todomvc\architecture-examples\polymer>node \Projects\ion\lib\test\sourceSize.js index.html elements
index.html : 897
elements\td-input.html : 497
elements\td-item.html : 1320
elements\td-model.html : 1598
elements\td-todos.html : 2495
---------------------------------------
Total Files : 5
Total Bytes : 6807
EmberJS
C:\Projects\todomvc\architecture-examples\emberjs>node \Projects\ion\lib\test\sourceSize.js index.html js
index.html : 2808
js\app.js : 152
js\controllers\todos_controller.js : 899
js\controllers\todos_list_controller.js : 394
js\controllers\todo_controller.js : 870
js\helpers\pluralize.js : 242
js\models\todo.js : 142
js\router.js : 718
js\views\todo_input_component.js : 208
---------------------------------------
Total Files : 9
Total Bytes : 6433
KnockoutJS
C:\Projects\todomvc\architecture-examples\knockoutjs>node \Projects\ion\lib\test\sourceSize.js index.html js
index.html : 2371
js\app.js : 3558
---------------------------------------
Total Files : 2
Total Bytes : 5929
JQuery
C:\Projects\todomvc\architecture-examples\jquery>node \Projects\ion\lib\test\sourceSize.js index.html js
index.html : 1924
js\app.js : 4523
---------------------------------------
Total Files : 2
Total Bytes : 6447
Backbone
C:\Projects\todomvc\architecture-examples\backbone>node \Projects\ion\lib\test\sourceSize.js index.html js
index.html : 1985
js\app.js : 142
js\collections\todos.js : 439
js\models\todo.js : 217
js\routers\router.js : 295
js\views\app-view.js : 2077
js\views\todo-view.js : 1701
---------------------------------------
Total Files : 7
Total Bytes : 6856
Dojo
C:\Projects\todomvc\architecture-examples\dojo>node \Projects\ion\lib\test\sourceSize.js index.html js\todo profiles
index.html : 830
js\todo\app.html : 1712
js\todo\app.js : 5626
js\todo\CssToggleWidget.js : 683
js\todo\ctrl\RouteController.js : 1045
js\todo\ctrl\TodoListRefController.js : 943
js\todo\ctrl\TodoRefController.js : 2200
js\todo\ctrl\_HashCompletedMixin.js : 765
js\todo\form\CheckBox.js : 545
js\todo\form\InlineEditBox.js : 1523
js\todo\misc\HashSelectedConverter.js : 178
js\todo\misc\LessThanOrEqualToConverter.js : 179
js\todo\model\SimpleTodoModel.js : 2409
js\todo\model\TodoModel.js : 3221
js\todo\store\LocalStorage.js : 1439
js\todo\TodoList.js : 792
profiles\todomvc.profile.js : 293
---------------------------------------
Total Files : 17
Total Bytes : 24627*
* removed by hand some files that appeared to be redundant.
Yui
C:\Projects\todomvc\architecture-examples\yui>node \Projects\ion\lib\test\sourceSize.js index.html js/app.js js/models js/views
index.html : 1874
js/app.js : 3183
js\models\todo.js : 420
js\models\todolist.js : 547
js\views\todoview.js : 1379
---------------------------------------
Total Files : 5
Total Bytes : 7403
Ion
C:\Projects\ion\docs\samples>node \Projects\ion\lib\test\sourceSize.js TodoMVC.html
TodoMVC.html : 2331
---------------------------------------
Total Files : 1
Total Bytes : 2314