Understanding the module pattern and its use with Knockout

In the previous section, we explored the key features of Knockout. We learned the basics of declarative data binding, automated UI refresh, dependency tracking, and templating. Knockout does a really good job of simplifying web application development by providing these features. However, it does not solve the problem of bringing structure to your JavaScript code.

Unlike an object-oriented programming language such as Java or C#, JavaScript does not enforce any particular structure. This is both a blessing and a curse. Blessing in the sense that you can bring your own rules on how to structure your code. This gives you power and flexibility. It can be a curse if you do not follow any structure ...

Get KnockoutJS by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.