Building Backbone Plugins Front Cover

Building Backbone Plugins

  • Length: 209 pages
  • Edition: 1
  • Publisher:
  • Publication Date: 2014-05-05
Description

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

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 Others Are Saying (and Loving!) About The Book

“A treasure trove of knowledge for the Backbone developer concerned with application architecture and extending Backbone” – Chris Webb

“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.” – Peter Tseng

“[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.” – Joe Zimmerman

“[Building Backbone Plugins] provided me with a bunch of conceptual tools… good enough to roll my own!” – Domingo E. Savoretti

“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!” – Roberto Guerra

“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!” – Jason Krol

“This book has helped me gain a better understanding of Backbone.js — which will benefit me as well as my clients going forward.” – Paul Paulson

“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!” – Michael Raumer

“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.” – Rui Pedro Lima

“[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.” – Mike Tiemey

Table of Contents

Part 1 – Backbone Views
Chapter 1. View Rendering
Chapter 2. Naming And Namespacing Your Plugin
Chapter 3. Complex And Divergent Views
Chapter 4. Building A Better CollectionView
Chapter 5. Cache Pre-Compiled Templates
Chapter 6. Overriding Backbone.View’s ‘constructor’

Part 2 – Managing The DOM
Chapter 7. Managing DOM Widgets And Controls
Chapter 8. Swapping Views In The DOM
Chapter 9. Managing Nested Views

Part 3 – Data And Meta-data
Chapter 10. Pickable Models
Chapter 11. Pickable Collections
Chapter 12. Building Backbone.localStorage
Chapter 13. A Filtered Collection

Part 4 – Application Infrastructure
Chapter 14. 3rd Party Events, Commands, And Requests
Chapter 15. Boot-strapping A Backbone Application
Chapter 16. Application Workflow
Chapter 17. Building With Components

Appendix A. Managing Events As Relationships
Appendix B. 3 Stages of App Initialization
Appendix C. A Tale Of Two Patterns
Appendix D. Better JavaScript Mixins
Appendix E. Theme And Variation

To access the link, solve the captcha.
Subscribe