Stop Building Apps With Broken, Boilerplate JavaScript

Master the art of extending and scaling Backbone.js ... with just ONE book

Introducing ...

Building Backbone Plugins

Extending Backbone.js The Smart, Scalable Way

Learn dozens of time-saving secrets

Build apps that can handle massive growth

Say goodbye to spaghetti-code solutions

Make better architecture decisions

Write maintainable, problem-free JavaScript

Love it ... or
your money back!

Because There's a World of Difference

Between Using a Framework ... and KNOWING It

Get Back to Coding Cool Features Again

You're not paid to build frameworks — you're paid to build apps that solve the needs of your business. Building Backbone Plugins will free you from boilerplate code so you can focus on writing your application's features.

Stop Fumbling Around Your Codebase

Keeping code small and readable is critical as your application evolves. Understanding — at a glance — what the code in any given file does is what makes the difference between being productive and flailing around for hours.

Put an End to Copy & Paste Programming

Boilerplate code requires you to copy-and-paste large chunks of code. Copy-and-paste code creates duplication. Duplication creates a maintenance nightmare. This book will teach you how to stop code-bloat in its tracks with powerful, easy-to-maintain abstractions and extensions.

Minimize Code, Maximize Freedom

Master the art of writing less code that does way more. After stripping down and streamlining your codebase with the help of this book, you'll have more time to actually implement and improve those inspired, nice-to-have features you love but kept having to put on the back burner.

Understand WHY, Not Just How

This isn’t just a how-to book. It’s a why-to book designed to clarify the concepts and logic that hold Backbone together. Learn the "why" and "how" of building Backbone extensions without losing hours, days, even weeks to hopeless, confusing trial-and-error.

Build Fully Stocked App Architectures

Backbone offers a great, lightweight way to organize jQuery and other JavaScript code, but the trade-off is a lack of a complete app architecture. Building Backbone Plugins fills this gap by showing you what it takes to build scalable applications in Backbone and how to stock your toolbox with exactly what you need.

Get Real-Life, Real-App Tools & Techniques

Distilled from Years of Experience with Backbone.js

I don’t know about you, but when I first starting using Backbone.js, I fell in love with it almost immediately.

After weeks of tearing my hair out over the hopeless tangle of JavaScript I’d "built" into my latest app, Backbone seemed like the answer to my prayers:

All of the patterns and practices that I'd learned from Windows development and thick GUI applications right there in front of me ... only in JavaScript!

But it wasn’t long before I realized that using Backbone raised problems of its own:
for one, a heavy reliance on copy & paste programming. To build out my apps, I had to keep adding more and more boilerplate code — the stuff that has to be there or nothing works right.

All that copy-and-pasting of code inevitably led to the copy-and-pasting of errors ... which then required copy-and-paste fixes.

And that, frankly, is a ridiculous and wasteful way to code.

Based on my own trial & error-riddled experiences building MarionetteJS for Backbone, Building Backbone Plugins boils down more than 15 years of software development experience into one simple, easy-to-follow handbook designed to meet the real-life needs of actual JavaScript developers and their clients.

Using MarionetteJS as a reference, this book will show you how to write cleaner, more flexible JavaScript as well as how to keep your applications organized and easy-to-maintain — no matter how complex they get.

Derick Bailey
creator of MarionetteJS

What You’ll Learn, Chapter-by-Chapter

Part 1: Backbone Views (6 chapters)

In Part 1, you’ll learn how to eliminate boilerplate code in views by building a generic render method, then extending specialized view types from a custom base type. You’ll also learn how to add new view types that offer flexibility through code and configuration.
  1. Chapter 1: View Rendering
  2. Chapter 2: Naming and Namespacing Your Plugin
  3. Chapter 3: Complex and Divergent Views
  4. Chapter 4: Building a Better CollectionView
  5. Chapter 5: Cache Pre-Compiled Templates
  6. Chapter 6: Overriding Backbone.View's 'Constructor'

Part 2: Managing The DOM (3 chapters)

Part 2 focuses on how to create simple objects to manage DOM references as well as show and swap out views. Along the way, you’ll learn how to update views with new options, too. FInally, you’ll combine the ability to define views and manage the DOM into a single view type called a Layout.
  1. Chapter 7: Managing DOM Widgets and Controls
  2. Chapter 8: Swapping Views in the DOM
  3. Chapter 9: Managing Nested Views

Part 3: Data and Metadata (4 chapters)

Part 3 looks at how to create plugins that allow models to be selected, or "picked", and collections that are also able to track which models have been picked. You’ll learn how to mix functionality into models and collections in a way that avoids troublesome method or attribute name collisions.
  1. Chapter 10: Pickable Models
  2. Chapter 11: Pickable Collections
  3. Chapter 12: Building Backbone.localStorage
  4. Chapter 13: A Filtered Collection

Part 4: Application Infrastructure (4 chapters)

Part 4 dives into how to build the basic infrastructure needed for scaling Backbone applications by feature set. You’ll discover how to create new building blocks to facilitate feature separation and communication between them. Last, you’ll learn how to segment and organize code within larger features, giving you the power to re-organize or modify features and functional areas of your app much more easily.
  1. Chapter 14: Third-Party Events, Commands, And Requests
  2. Chapter 15: Boot-strapping A Backbone Application
  3. Chapter 16: Application Workflow
  4. Chapter 17: Building With Components

Part 5: Resource-Rich Appendices

Pages and pages of additional, deep-dive content on a wide range of topics, including:
Managing Events As Relationships, The Three Stages of App Initialization, Better JavaScript Mixins, Theme and Variation, and more ...

What Others Are Saying (and Loving!) About The Book

"A treasure trove of knowledge for the Backbone developer concerned with application architecture and extending Backbone"
"The perfect read given that I was using Backbone in an unstructured manner, leaving many design paradigms in the dust ... A great guide on how to transition from a mediocre Backbone web developer to a full-fledged software engineer with Backbone under their tool belt."
"[This book] exposes parts of Backbone that many don't know about and clearly shows how to extend Backbone in helpful ways that are generic enough to be usable by large numbers of users/projects."
"[ Building Backbone Plugins ] provided me with a bunch of conceptual tools... good enough to roll my own!"
"Gave me a deeper understanding of event-driven applications, what a good backbone architecture looks like, and how to write cleaner code... All the code and examples can be traced back to Marionette, a real-world open source library ... I got immediate benefit by applying it at work as I was reading the book, without having to create a project just to try out the concepts!"
"The things I learned from this book will go a long way in both improving our code base as well as the skill-set of my team as a whole!"
"This book has helped me gain a better understanding of Backbone.js — which will benefit me as well as my clients going forward."
"I see Backbone plugins in a different light now as a result of this book. Whereas previously I regarded plugins as a last resort, now I think of plugins more as an essential enhancement to the Backbone framework. Plugins as explained in this book add a stronger procedural abstraction capability to Backbone ... It reminds me somewhat of the power of C++ template metaprogramming compared to early versions of that language that lacked templates."
- Bodine
"I was surprised at the clarity of language and exposition [of Building Backbone Plugins] ... This has a degree of polish comparable to books from O'Reilly or Manning. Geeky expertise we expect; clear writing is rare!"
- Bodine
"Through example, this book walks you through the common challenges faced in Backbone development and how to sanely tackle those challenges ... At least, that's how it helped me!"
"This book is a reference for me every time I pick Backbone as the major library to deal with anything I build on the client side."
"[This book] showed me how Backbone really becomes powerful when properly handling events, especially in the context of using event handlers to trigger change in separate modules. ... It's helping me improve the maintainability and overall quality of the code I'm writing."

Buy The eBook Today

(and Get Back to Coding the Stuff You Love!)

eBook Only

Buy the eBook and master Backbone.js like never before!

  • Stop writing boilerplate
  • Take control of your code
  • Build and extend Backbone
  • Do more, write less

eBook + Screencasts

Buy the eBook and get the 4 JavaScript screencasts from Derick Bailey's series, referenced in the book!

  • Variable Scope
  • Context ("this")
  • Objects & Prototypes
  • When Context and Prototypes Collide

eBook Bundle

Get 3 eBooks on Backbone and MarionetteJS at one low price!

  • Building Backbone Plugins
  • MarionetteJS: A Gentle Introduction
  • Structuring Backbone Code W/ RequireJS & Marionette