Chapter 4. Managing KnockoutJS Events

Interaction between our app and the user is the most important issue we need to resolve. In the last three chapters, we have focused on the business requirements, so now it is time to think about how to make it easy to use our app to the end user.

Event-driven programming is a powerful paradigm that allows us to isolate our code better. KnockoutJS gives us several ways to work with events. We can use click binding or event binding if we want to use the declarative paradigm.

There are two different paradigms to declare events. The declarative paradigm says that we can write JavaScript and custom tags in our HTML. On the other hand, we have the imperative paradigm that tells us that we should isolate JavaScript ...

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.