Backbone.js in a Theme or Module for Drupal 8, Drupal 9, and Drupal 10

Last updated February 11, 2021
Theming9.5.x/10.0.x

It's probably not too surprising that a library called Backbone aims to provide structure to your front-end JavaScript code and applications. In this tutorial we'll take a look at how Backbone.js goes about achieving that goal, and how you can make use of it on your Drupal site. We'll first take a high-level look at the main components that make up the Backbone.js library. With that basic understanding in place we'll look at an example of how you might integrate Backbone.js into a Drupal site.