The Top 10 Mistakes That KnockoutJS Developers Make

added by JavaScript Kicks
11/5/2014 3:21:24 PM

641 Views

Knockout is a popular JavaScript framework that offers convenient data binding functionality without the complexity of similar frameworks such as Angular. It's a great choice for prototyping small applications or introducing data binding into a legacy codebase. This article captures a number of common Knockout pitfalls I've run into over the past few years deploying Knockout code in production. Hopefully it'll save you a headache or two!


3 comments

Drew Peterson
11/5/2014 9:26:58 PM
var self = this is seared into my brain :-) Writing components is easy when you use the awesome [Durandal](http://durandaljs.com/) library. Is there anything else out there built on knockout people like using?

Robert Greyling
11/5/2014 9:31:58 PM
I think the Components feature introduced in Knockout 3.2 has quite a lot of overlap with what we already do by using Durandal. In fact I wouldn't be surprised if it was a design influence in the first place. In its basic for, just using KO components it feels more like you can create a self sustaining modular SPA whereas before knockout didn't really lend itself to that - it felt more like a binding utility. Then again, start throwing in Durandal view and model composition and you open up another whole world of fun that KO components can't touch, so I don't see me changing strategies any time soon, but the features sure do look awesome

Dom Barker
11/14/2014 2:01:43 PM
var self = this; What?