Chapter 6. The Module Pattern – RequireJS

We can say now that our application has all the functionality we mentioned in the Chapter 1, Refreshing the UI Automatically with KnockoutJS. What we have done in the last four chapters is a very good approach to solving code design in small projects. The code is tidy and the folder structure is also cohesive. The code is easy to read and follow.

However, when projects begin to grow this approach is not enough. You need to keep the code tidy, not just in the file and folder structure, but logically as well.

In this chapter, we are going to modularize our code to keep the different parts of our application isolated and reusable. We will also see how to keep our context cleaner.

Now the project begins to look ...

Get KnockoutJS Essentials 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.