Backbone.Marionette.js: A Serious Progression
$7.99
Minimum price
$35.00
Suggested price

Backbone.Marionette.js: A Serious Progression

About the Book

The book is up to date for Marionette 2.3. In addition, you also receive the book covering Marionette 1.7.4.

Now that you've read the Gentle Introduction book and have a good grasp on Marionette fundamentals, take the next step in your journey: learn to develop advanced functionality with the framework!

This book takes up where the Marionette introduction book left off. It will use an actual API back-end developed for this book, that will be easily adaptable to your framework. Dowload the sample to see how the ContactManager application is configured to connect to the remote API.

If you'd rather use your own API, each chatper details the relevant specifications your API must conform to.

Written in the same easy to follow style as its predecessor, you should have no trouble following along as you enhance the ContactManager application. Here are some of the topics we'll cover:

  • using Marionette's new Behavior functionality
  • using remote APIs
    • dealing with legacy APIs
    • converting data received from the API using parse
    • massaging data with toJSON before sending it to the API
  • handling server-side responses
    • properly reacting to server-side error codes (e.g. 404 Not Found)
    • processing server-side validation errors
    • usign deferreds or success/error callbacks
  • handling validation with Backbone.Validator
    • model-only validation
    • form & model validation (error display)
  • pagination using Backbone.Paginator
    • explore pagination through client- and server-side pagination
    • developing a general-purpose view to display paginated data (with automatic pagination controls maangement)
    • managing the pagination controls
    • managing the URL and routes
  • data relationships
    • manage nested collections "by hand"
    • using Backbone.associations to handle associations
  • i18n
    • using polyglot
  • authentication
    • strategies to consider
    • handling session timeouts
    • handling authorization
  • wrapping third-party APIs: see how we wrap GitHub's API so we can interact with Git repositories using only Backbone models and collections
    • implementing a custom Backbone.sync function from start to end
  • refreshing client-side data: how to manage cases where the data on the server has changed before a user sends data updates
  • improving memory management
    • defining methods on prototypes
    • using listenTo
    • starting/stopping sub-applications

Previous Praise

This book doesn't really have reviews yet, so I'll do the next best thing to convince you to pick up a copy: quote readers from my previous books.

Best tutorial book I've ever read on *any* programming subject, never mind one as complicated as this. Thanks for an amazing book. -- Mike Brady

I think it was worth the money, as I was really struggling to get a grip on Marionette's philosophy [...]. This book cleared things up nicely and I applaud David for keeping things simple. -- karl

I am very pleased with this book and will have all my front end guys read it before starting to hack on our app. It's a must read if you're building a complex app with Backbone and Marionette. -- John Paul Narowski

Super happy with the way this book is written and I feel that I've made leaps into understanding [...] Marionette. I really recommend everyone to read this book. -- Jo-Pierre Lerm

This was a great supplement to take my app development several notches up. -- Mark Coleman

I wish many books were written in a similar style. I would highly recommend this book. -- Mohideen Noordeen

I just want to say that both your books have been tremendously useful. I had little to no knowledge of requirejs or marionette and your books got me up to speed in just a few days.Can't wait for your upcoming 'advanced' book. -- Ronny

This book is a gem. I would not hesitate recommend this book to anyone who wants to dive deep into Backbone.js and Marionette. -- Branden

I never finished a book so fast! -- Chris Ballenger

I'm only 1/2 way through the book right now, but... wow. Very well written and concise. I like the approach of refactoring the app as you work. -- Bastidias

Every javascript developer should have a copy of this book. It allows you to write structured and documented javascript code. After reading this book my chances of sticking with javascript has increased -- Lukman Adekunle

This book was fantastic in teaching me a solid approach. -- Adam

David's writing style makes it seem like you have a super-calm coach in the room with you. Highly recommended. -- Adrian Goins

The time i invested was very good. The examples works fine and they are exactly what i was looking for. I encourage everybody who wants to go ahead with SPA and this framework to start with David's book. -- Christian Neißl

I really enjoyed this book. The book is well written and is easy to understand and follow along with. -- Bryan

I followed along with the example, progressively building up the application. It was a very enjoyable experience. -- Matthieu

The best book on marionettejs around! A must have to start, I suggest also other one book about requirejs & marionette! --  Gaetano Padalino

Just finished this earlier, as always great book! spent the whole night refactoring the app I'm writing. -- marconijr

As I continue to work on my code I find myself flicking back through the book regularly to see how he has approached similar problems and I am eagerly looking forward to his next book on Marionette. -- Christo Fogelberg

I haven't had this much fun writing code in my life. Well done David! -- Chet Harrison

Loved this book as well! -- Jeff Sheffield

About the Author

David Sulc
David Sulc

I spend most of my time applying technologies to business problems and like many, I acquire new technology skills in a self-taught manner. What I really enjoy is understanding subjects well enough to be able to teach others about them in a straightforward "this makes complete sense" style.

Bundles that include this book

$85.00
Bought separately
$15.00
Bundle Price

Table of Contents

  • Cover Credits
  • Who This Book is For
  • Following Along with Git
  • Setting up
    • Deploying
    • Using the Contact Manager Application
    • Adapting the Application
  • Dealing with Legacy APIs
    • API Properties
    • Rewriting a Model’s parse Function
    • Rewriting a Model’s toJSON Function
    • Using Non-Standard API Endpoints
  • Rewriting sync
    • At the Model Level
    • In the Model’s Parent Object
  • Exercise: Dealing with Hyphenated API Attributes
    • Hints
    • Solution
    • Restoring the Original API
  • Wrapping a Third-Party API
    • Using GitHub’s API
    • Authenticating
    • Working with Repositories
    • sync Basics
    • Using call on a Prototype’s Function Definition
    • Creating a New Repository
    • Fetching an Existing Repository
    • Deleting an Existing Repository
    • Editing an Existing Repository
    • Using the urlRoot and url Properties
    • Dealing with API errors
  • Managing Authentication
    • Intercepting Errors with sync
    • Other Authentication Possibilities
    • Managing Authorization on the Client Side
  • Handling Server-Side Responses
    • API Properties
    • Processing 404 Errors
    • Reacting to Server Response Codes
    • Adapting the Edit View
    • Reacting to Server-Side Validation Errors
    • Deferreds Versus Success/Error Callbacks
    • Validations: Client-Side Versus Server-Side
    • Fixing the Modal Edit
    • Fixing the “New” Action
    • Handling Errors on Collection Fetch
  • Refreshing Client-Side Data
    • Beware Race Conditions
    • Reapplying Server-Side Changes to the Client-Side Model
    • Checking for Server-Side Data Changes
    • Improving the Comparison Code
    • Updating Client-Side Data
    • Refactoring
    • Properly Updating Data on Modal Dialog Close
    • Fixing a UI Glitch
    • Keeping fullName Up to Date
    • Fixing the Modal Display
    • UI Challenges Aren’t so Simple
    • A Side Note on Testing
  • Handling Validation with a Plugin
    • Model-Only Validation
    • Defining Custom Error Messages
    • Form + Model Validation
  • Pagination
    • Client-Side Pagination
    • Building a Generic Paginated View
    • Making the Pagination Controls Functional
    • Propagating Events
    • Keeping the URL in Sync
    • Loading State from the URL
    • Using Proper href Attributes
    • Server-Side Pagination
  • Memory Management
    • Defining Methods on Prototypes
    • Using listenTo Instead of on
    • Using Marionette Controllers
    • Module Start/Stop
  • Working with Model Relationships
    • API Properties
    • Parsing Sub-Models Manually
    • Paginating Acquaintances
    • Adding Strangers to the Mix
    • Using Backbone.Associations
    • Refactoring
  • Marionette Behaviors
    • Introducing Marionette Behaviors
  • Internationalization
    • Managing Routes
    • Redirecting Unsupported Languages
    • Internationalizing Links
    • Introducing Polyglot
    • Translating Templates
    • Loading Translation Files
    • Implementing Language Selection
  • Closing Thoughts
    • Keeping in Touch
  • Other Books I’ve Written

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...

80% Royalties. Earn $16 on a $20 book.

We pay 80% royalties. That's not a typo: you earn $16 on a $20 sale. If we sell 5000 non-refunded copies of your book or course for $20, you'll earn $80,000.

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

In fact, authors have earnedover $13 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