Book Image

Building Scalable Apps with Redis and Node.js

By : Joshua Johanan
Book Image

Building Scalable Apps with Redis and Node.js

By: Joshua Johanan

Overview of this book

Table of Contents (17 chapters)
Building Scalable Apps with Redis and Node.js
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Introducing Backbone


Backbone is a JavaScript library that allows us to define models, collections, and views. It helps to organize keeping track of what is happening on a web page in JavaScript. Like React, it is not a fully-featured library. Backbone does more than React, but a lot less than Angular or Ember.js. This is not better or worse, it is just different. Everything we are building in this application can easily be implemented in any other JavaScript framework.

We just covered how React can render views and track events. Backbone has these same capabilities, but we will not be utilizing them. In my opinion, React's DOM manipulations are better, and eliminates the need to have a view teardown step, where we unattached each event listener. We discussed how React uses synthetic events to only bind event handlers inside of the component. Backbone assigns event handlers without using synthetic events. This can lead to memory leaks if we are not careful when we need to remove a view. Backbone...