Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Try use Knockout.js. I also don't like the heavy weight tools like Bootstrap/Ember/Angular with their my-way-or-the-highway approach. Knockout.js does bidirectional two-way view-model binding and other MVVM goodness without insisting you have to abandon other tools. You can use other template engine easily.


I can only assume you've never actually used Backbone (Which I also assume is what you meant when you said 'bootstrap'). It's neither heavy or "my way or the highway."

Knockout is great, but the two-way bindings do come with a non-trivial performance impact.


I switched from Knockout to AngularJS.

Knockout basically thoroughly entangles itself with my model -- I have to wrap my attributes in ko.computed() or ko.observable().

That makes unit testing messier and leaves me constantly trying to remember what is left as .dataAtttribute and what's been transformed into .dataAttribute().

I have to declare the bindings in Angular also, but after that it largely leaves my code alone. I shaved about 10% off my model code when I switched.


I also switched from Knockout.js to AngularJS - my code's so much cleaner now, without having to wrap my model in functions.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: