Building Interactable Components with Backbone.js Events

Jen-Hsuan Hsieh (Sean)
A Layman
Published in
4 min readAug 1, 2021

--

Introduction

Backbone is an MV* JavaScript framework that is close to Knockout.js with a minimal set of data-structuring.

The benefit is that we don’t have to write the glue code for the specific id and update views manually. But developers need to handle the data binding manually with extending Backbone.Events mechanism unlike using observable from Knockout.js.

Source: https://codepen.io/JenHsuan/pen/NWKpdgr?editors=1111

It means that we need to know when and how to re-render the view, which is handled by some modern frameworks nowadays. Therefore, the first lesson for using Backbone is to learn Backbone.Events.

In this article, we will learn how to use Backbone events by building a modal that we have ever created with Knockout.js in Building customized Knockout.js Component for your website.

Implement a Modal with Backbone.js

Things we have: Views, Models, Collections, and Events

--

--

Jen-Hsuan Hsieh (Sean)
A Layman

Frontend Developer🚀 Angular • React • Nest • Electron • Micro-frontend • Monorepo Architecture • https://daily-learning.herokuapp.com/