Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

The time of the Single Page Application is here. This book will teach you a variety of techniques to build and iterate on SPAs quickly, and with confidence.

Web development, even before Rails, has been well served by the 3-tier architecture. A web server runs Ruby, PHP, or Python pulls data from MySQL or Postgress, and renders a mostly static HTML asset. With the great strides in HTML5 browser technologies, since 2012 it's been feasible to build Single Page Applications. As of 2014, it's practical. A SPA, rather than sending rendered HTML for ever request, serves a bundle of static assets that contain code for the entire site. This code calls services for data via restful APIs, allowing much flexibility in a system's architecture. This approach can still be 3-tier, but the web tier handles data, not HTML.

There are numerous frameworks and technologies to choose between, for all layers of a SPA application. One set, becoming a buzzword in itself, is the MEAN approach. A play on "LAMP", MEAN is a collection of technologies for building a SPA stack. MongoDB is a schemaless, disk-backed database. ExpressJS is an extensible middleware based HTTP handler. AngularJS is a powerful and expressive javascript framework. NodeJS is a highly asynchronous server platform written in Javascript. The MEAN approach takes some fantastic technologies and allows development teams to focus their efforts in Javascript. This provides real benefits to teams in following a single set of best practices. That said, the approach is highly decoupled, and teams can swap out any piece for a more appropriate technology as needed.

Alas, there is no single framework as solid as Ruby on Rails for building SPAs. This isn't a bad thing necessarily. Because these technologies for building SPAs are so easily decoupled, rather than providing a single architecture for every team to plug in to, it is better to learn where each of the pieces fit together, and how to use each effectively. This Cookbook is a collection of those best practices and techniques, taken from experience building these systems over the past few years. Taken a la cart, a team or developer can find good tutorials and info on building certain parts of their application. Taken as a whole, a team can build a full SPA stack that fits their business use case like a glove.

About This Cookbook

This book is


MEAN development in collection of short articles, 4 or 5 paragraphs of 1 or 2 gists.






No releases published


No packages published