Backbone.js is the framework that taught a generation of developers how to structure JavaScript apps. Long before React and Vue, Backbone gave the browser a simple idea: models hold your data, views render it, and events keep them in sync. It is small, unopinionated, and still useful for understanding how modern frameworks work under the hood.
Backbone's whole API fits in a few concepts. A Model stores data and fires change events. A Collection is an ordered list of models. A View listens to those events and re-renders. A Router maps URLs to actions. That is the entire framework — no build step required, no magic.
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.13.6/underscore-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.6.0/backbone-min.js"></script>
const Todo = Backbone.Model.extend({
defaults: { title: '', done: false }
});
const todo = new Todo({ title: 'Learn Backbone' });
todo.on('change', () => console.log('Changed:', todo.toJSON()));
todo.set('done', true);
Backbone is a great fit for learning, for small widgets inside a mostly server-rendered page, and for legacy apps that still run it in production. Many large companies still have Backbone in their stack, so knowing it is genuinely useful for maintenance work.
The limits are clear. Backbone gives you structure but almost no features — no templating engine, no data binding, no component system. You will write more code than in a modern framework, and you will make more decisions yourself. For a brand-new large app, React, Vue, or Svelte are better defaults today.
But if you want to understand where modern frameworks came from, build one small app in Backbone. After that, every framework's model-view split will make immediate sense.
Top comments (0)