Backbone.Marionette.js: A Serious Progression
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
Bundles that include this book
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
andurl
Properties - Dealing with API errors
-
Managing Authentication
-
Intercepting Errors with
sync
- Other Authentication Possibilities
- Managing Authorization on the Client Side
-
Intercepting Errors with
-
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 ofon
- 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
Authors have earned$9,883,643writing, publishing and selling on Leanpub, earning 80% royalties while saving up to 25 million pounds of CO2 and up to 46,000 trees.
Learn more about writing on Leanpub
The Leanpub 45-day 100% Happiness Guarantee
Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms
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), EPUB (for phones and tablets) and MOBI (for 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
Top Books
C++ Best Practices
Jason TurnerLevel up your C++, get the tools working for you, eliminate common problems, and move on to more exciting things!
OpenIntro Statistics
David Diez, Christopher Barr, Mine Cetinkaya-Rundel, and OpenIntroA complete foundation for Statistics, also serving as a foundation for Data Science.
Leanpub revenue supports OpenIntro (US-based nonprofit) so we can provide free desk copies to teachers interested in using OpenIntro Statistics in the classroom and expand the project to support free textbooks in other subjects.
More resources: openintro.org.
Functional Design and Architecture
Alexander GraninSoftware Design in Functional Programming, Design Patterns and Practices, Methodologies and Application Architectures. How to build real software in Haskell with less efforts and low risks. The first complete source of knowledge.
R Programming for Data Science
Roger D. PengThis book brings the fundamentals of R programming to you, using the same material developed as part of the industry-leading Johns Hopkins Data Science Specialization. The skills taught in this book will lay the foundation for you to begin your journey learning data science. Printed copies of this book are available through Lulu.
C++20
Rainer GrimmC++20 is the next big C++ standard after C++11. As C++11 did it, C++20 changes the way we program modern C++. This change is, in particular, due to the big four of C++20: ranges, coroutines, concepts, and modules.
I am a Software Engineer and I am in Charge
Alexis Monville and Michael DoyleI am a Software Engineer and I am in Charge is a real-world, practical book that helps you increase your impact and satisfaction at work no matter who you work with.
In the book, we will follow Sandrine, a fictional character who learns to think in a new way enabling her to take a different course of action.
Atomic Kotlin
Bruce Eckel and Svetlana IsakovaFor both beginning and experienced programmers! From the author of the multi-award-winning Thinking in C++ and Thinking in Java together with a member of the Kotlin language team comes a book that breaks the concepts into small, easy-to-digest "atoms," along with exercises supported by hints and solutions directly inside IntelliJ IDEA!
Invest In Digital Health - The Medical Futurist's Guide
Dr. Bertalan MeskoArtificial Intelligence and Digital Health are booming. In this book, we explain why now it's a good time to invest in Digital Health and give recommendations on where to invest by looking at the top 24 technological trends we find the most promising.
The Hundred-Page Machine Learning Book
Andriy BurkovEverything you really need to know in Machine Learning in a hundred pages.
Mastering STM32
Carmine NovielloWith more than 600 microcontrollers, STM32 is probably the most complete ARM Cortex-M platform on the market. This book aims to be the first guide around that introduces the reader to this exciting MCU portfolio from ST Microelectronics and its official CubeHAL.
Top Bundles
- #1
Software Architecture for Developers: Volumes 1 & 2 - Technical leadership and communication
2 Books
"Software Architecture for Developers" is a practical and pragmatic guide to modern, lightweight software architecture, specifically aimed at developers. You'll learn:The essence of software architecture.Why the software architecture role should include coding, coaching and collaboration.The things that you really need to think about before... - #2
CCIE Service Provider Ultimate Study Bundle
2 Books
Piotr Jablonski, Lukasz Bromirski, and Nick Russo have joined forces to deliver the only CCIE Service Provider training resource you'll ever need. This bundle contains a detailed and challenging collection of workbook labs, plus an extensively detailed technical reference guide. All of us have earned the CCIE Service Provider certification... - #3
The Future of Digital Health
6 Books
We put together the most popular books from The Medical Futurist to provide a clear picture about the major trends shaping the future of medicine and healthcare. Digital health technologies, artificial intelligence, the future of 20 medical specialties, big pharma, data privacy and how technology giants such as Amazon or Google want to conquer... - #4
Cisco CCNA 200-301 Complet
4 Books
Ce lot comprend les quatre volumes du guide préparation à l'examen de certification Cisco CCNA 200-301. - #5
CCDE Practical Studies (All labs)
3 Books
CCDE lab - #6
"The C++ Standard Library" and "Concurrency with Modern C++"
2 Books
Get my books "The C++ Standard Library" and "Concurrency with Modern C++" in a bundle. The first book gives you the details you should know about the C++ standard library; the second one dives deeper into concurrency with modern C++. In sum, you get more than 600 pages full of modern C++ and about 250 source files presenting the standard library... - #7
Modern Management Made Easy
3 Books
Read all three Modern Management Made Easy books. Learn to manage yourself, lead and serve others, and lead the organization. - #8
Linux Administration Complet
4 Books
Ce lot comprend les quatre volumes du Guide Linux Administration :Linux Administration, Volume 1, Administration fondamentale : Guide pratique de préparation aux examens de certification LPIC 1, Linux Essentials, RHCSA et LFCS. Administration fondamentale. Introduction à Linux. Le Shell. Traitement du texte. Arborescence de fichiers. Sécurité... - #9
Programming with Ease
3 Books
Alle drei Bände der Serie Programming with Ease in einem Paket. Darin findest du alles, was ich dir zu den wichtigsten Phasen der Softwareentwicklung im Hinblick auf Clean Code Development für langfristig hohe Produktivität sagen kann.Im Band Slicing findest du die Anforderungsanalyse im Rahmen eines iterativ-inkrementellen Vorgehensmodells aus... - #10
Vagrant Ansible
2 Books
Unveil the power of Ansible and Vagrant with this bundle at a special price. You'll have everything you need to get started with Vagrant - learn the basics and how to create your virtual development environments, using Ansible as provisioner! About Vagrant Cookbook Vagrant Cookbook is a complete guide to get started with Vagrant and create your...