-
-
Save scottmessinger/1033617 to your computer and use it in GitHub Desktop.
@ibjhb: indeed!
@ibjhb: it's still less than half the lines you need to write.
@ibjhb: I re-did the gist with the html and javascript, all comments removed. https://gist.github.com/2285747
backbone: 253 lines of code
knockout: 111 lines of code
I am the biggest fan of knockout, but you have to keep as many line-brakes in knockout example as you do in the backbone one, to be 100% fair.
In line brakes?
I mean that the knockout example code seems more dense linebreak-wise (empty lines) in comparison to the backbone.
Hmm.. Guess I'm not seeing that. I know in the gist I made I think I was pretty fair with line breaks, and removing all the comments: https://gist.github.com/2285747
all I was saying is that you will get quite different numbers if you 1. - remove all blank lines, 2. count what's left. Now you can see it here: https://gist.github.com/2589644 which is based on your revised example without comments (https://gist.github.com/2285747). See, now it's 189 vs 103. Not even twice as big.
Ah, perfect! I didn't think about stripping out the whitespace, thinking it was needed for readability of the comparison. Yours is definitely a better comparison.
This is slightly misleading because of the data-binding requirement code in the https://github.com/ashish01/knockoutjs-todos/blob/master/knockout-todos.html file.
For example, all of the events for knockout.js are in the HTML. In backbone, they are listed in the JavaScript.