Marionette.js Behaviors, Part 2: Testing Behaviors

This post is a follow-up to Al’s high-level introduction to Marionette Behaviors, published yesterday. As Al said, Marionette.Behaviors are an abstraction for sharing UI code between different views. They are a recent addition to the Marionette toolbelt (added in version 1.7). Prior to the introduction of behaviors, code sharing between views in Marionette had to be handled […]

Marionette.js Behaviors, Part 1: The Basics

Part 2: Testing Behaviors is available here Marionette is a Javascript application framework built on top of Backbone. It provides great features missing from core Backbone like collection views, subview management, and abstractions for building event driven applications. Extracting Duplicate Code with Behaviors Marionette.Behaviors are an abstraction for sharing UI code between different views. They […]

Handling Forms with Marionette.js

Marionette.js is an extension library for Backbone.js that offers many improvements and conveniences to cover common use cases for Backbone. On a recent project, I helped build a large single page application using Marionette. One thing that Marionette lacks out of the box is a convenient way to manage form lifecycles, including validating and submitting […]

Decorating Backbone Collections

There are often times when I want to filter Backbone collections and prevent some of the collection items from being displayed in my view. For instance, say I’m looking at a page of houses for sale. When I set a limit on the maximum price of a house either by entering a number or adjusting […]

Using Marionette.js with Backbone

I’ve recently had the opportunity to work on a single page web application built on top of Backbone.js. While I love the simplicity of the Backbone framework and source code, I was looking for something a little more opinionated to build my view layer on top of, specifically something that would help with lifecycle management. […]

window.location as a Global Variable

Lately I’ve been building web applications with quite a bit of the app implemented on the client side with JavaScript. Backbone.js has been handy in building these applications. Here I’ll be sharing my experience building up Backbone Routers, and how I’ve come to prefer an event-based mechanism for page navigation over setting the window.location directly. […]