Essential Backbone.js

Retired

This book is no longer available for sale.

Essential Backbone.js

About the Book

Beginning at around 2009 - 2010 the "single page application" (SPA) built using open technologies (HTML5 and JavaScript) began to emerge for creating dynamic "app-like" experiences within web pages. However you use the web, chances are you have used an application built with technology that implements this interactive functionality. Backbone.js, the small, compact, dynamic JavaScript client-side application framework that helps you keep your JavaScriot organized and structured is part of the technologies that make these sorts of slick applications possible.

This book will show you all the essentials involved in creating an application in Backbone.js covering Backbone routers, models, collections, and views as well as communicating with the server via API calls and module loading with RequireJS. This book is great for the developer who maybe has some experience with writing a bit of JavaScript or jQuery code but has not yet ventured into the waters of SPA MVW (model-view-whatever) frameworks. This book is also great for the intermediate or seasoned JavaScript application developer who has maybe worked with other frameworks but has been tasked with working on a Backbone application and need a quick reference of working code and a high-level overview of the common components therein. This book will give you the essentials to get up and going (hopefully as fast as possible).

Wherever you are coming from, this book will give you everything you need to get on your way to creating rich, interactive apps with Backbone!

About the Author

Ian Chursky
Ian Chursky

Should I write in the 3rd person here? Ian Chursky (that's me) is a Seattle-area developer who has been working in the development world since interning as a web developer during the dotcom bubble days of early 2000 before attending college at Seattle University, graduating with a degree in Biology and minoring in Computer Science. After college he has worked at both giant, evil, multinational corporations and small creative dev shops and everything in-between. Professionally, he spends a lot of time in JavaScript (React, TypeScript, Vue.js, Knockout.js, Node.js Express.js) and in the Microsoft stack of technologies (ASP.NET/C#, .NET WebAPI, Azure, etc.) but has also been called upon to venture into the worlds PHP, Python, and Java. He lives in the general greater Seattle area with his wife and 2 daughters.

Table of Contents

Preface

History

What is Backbone.js?

Benefits of Using Backbone.js

Who This Book Is For

Errata

Feedback

Chapter 1: Routers

New Routes

Parameters & Splats

Better Code Organization

Navigate

Summary

Chapter 2: Views

Setup

Events

Templates

Summary

Chapter 3: Models

Model Default Values

Initialize

Get & Set

Clone

Summary

Chapter 4: Collections

Add, Remove, & Reset

Get & Set

Summary

Chapter 5: Using Templates in Backbone.js

Underscrore Templates

Handlebars

Summary

Chapter 6: APIs and Backbone.js

What is an API?

API Integration with Backbone.js

Creating Our Own API With Slim PHP Framework

Client Side: Backbone.js

Summary

Chapter 7: Module Loading Backbone.js with RequireJS

Why Use RequireJS?

Using RequireJS

Loading Our Own JavaScript With RequireJS

Shims

Summary

Chapter 8: Additional Concepts: Data Binding

Chapter 9: Additional Concepts: Specialized Notification Views

Options

Chapter 10: Extending Backbone.js

Extending Classes

Creating New Classes

Conclusion

Appendix A: Code Samples & Repos

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earnedover $14 millionwriting, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub