Book Review: SPA Design and Architecture: Understanding Single Page Web Applications

Reviews This post may contain affiliate links. If you buy something we get a small commission at no extra charge to you. (read more)

Modern JavaScript can do a lot more now than it could a decade ago. Single page web applications are becoming much more popular and with advanced web browsers these SPAs can reach a wide audience.

But how do you get started building a single page application? It’s different from desktop programming and there’s a lot to consider during planning and execution.

SPA Design and Architecture is the perfect introduction to single page webapp development with very little prior knowledge. Armed with some JavaScript knowledge you can pick up this book and learn how to create powerful single page applications with today’s most popular frontend frameworks.

This book can be geared towards beginners so long as they have a grasp on JavaScript.

If you’re looking for a solid intro to single page webapp development this book will inspire and guide you every step of the way.

Book Contents

In 275 pages you get two unique sections: “The Basics” and “Core Concepts”. Each section contains a handful of chapters with nine in total.

Here’s a breakdown of the chapter titles:

  1. What is a single-page application?
  2. The role of MV* frameworks
  3. Modular JavaScript
  4. Navigating the single page
  5. View composition and layout
  6. Inter-module interaction
  7. Communicating with the server
  8. Unit testing
  9. Client-side task automation

The first chapter introduces you to SPA as a development technique. You learn about single page application requirements and architectures including MV* frameworks.

Eventually in chapters 3-4 you learn about routing and page views. Navigation works a bit different on an SPA so you’ll want to learn the best practices for custom routing.

In the later chapters you get into advanced development with modularization of code and custom unit testing. The very last chapter gets into automation with Gulp.js which is actually my preferred task runner.

gulpjs homepage

I really like the diagrams used throughout the book to explain MV* architecture. This is crucial for developers who have never needed to learn this stuff before. Most .NET developers know it like the back of their hand but PHP developers might not.

The primary libraries include Backbone, Knockout, and Angular, all three very different options. I personally do not like Backbone and pretty much avoid it at all costs. On the other hand Angular is fantastic and well worth learning if you need a frontend framework.

However keep in mind that this book was written on Angular 1. The newer Angular 2 has updated syntax and new concepts that you’ll need to learn to get it working properly.

I’ve never used Knockout.js before so I can’t really comment on it’s value in the current market. But I was excited to try it out and it was really fun seeing how all these frameworks can be used for creating single page webapps.

This book offers a tremendous introduction to SPAs that are completely platform agnostic. You’ll learn three different frameworks and you’re given the option to choose whatever works best for you.

Note that you will need to understand rudimentary JavaScript to make any sense of this book. If you’re a JS noob I’d personally recommend JavaScript: Novice to Ninja as the only book to study from. I did a full review of this book if you want to read more.

But with so many frameworks in this book you really should understand advanced concepts like routing and modular JavaScript. But even if you don’t know these things you can always learn as you go, so long as you understand the basics of JavaScript.

Pros & Cons

Right from the start this book sets you up for success. You learn how to properly organize projects and how to architect new projects from the ground-up.

The author covers a variety of tools to choose from and you learn vital post-production skills like unit testing, task automation & deployment.

I was a little disappointed that the author chose Backbone over React. There’s nothing inherently wrong with backbone’s code, but it is older and certainly not the quickest tool in the toolbox.

Some people may not like the frequent switching between Angular, Backbone, and Knockout. The author really tries to diversify to give you a chance to work with all of these frameworks. The goal here is to learn single page app development, not to master one specific framework.

Modularization is huge and it’s a big part of this book. You learn how to organize your code properly with a modular style to find and edit whatever feature you want without hassle.

The writing is excellent and I genuinely feel this is the best introduction to creating SPAs the right way.

Also it’s worth noting that when you buy a copy you also get a free eBook copy too. This comes in PDF, Kindle, and ePub formats which are delivered through Manning Publishing.

Who Is This For?

Web developers who already have some experience with JavaScript can pick this up and run with it. You may stumble over a few concepts if you don’t know anything about MV* development.

But thankfully the author covers a lot of these topics in great detail. Newbies to the frontend framework space will get their pick of three quality options with live code samples for each one.

You’ll learn how to build SPAs the right way with proper code organization and unit testing. Gulp automation is also covered, so if you have knowledge there it’s more of a bonus than a prerequisite.

However if you’re a developer who only knows HTML/CSS you probably won’t be able to follow along. It is possible to pick up this book and learn as you go. But if you don’t even know how to set a variable or write a function in JavaScript then you’re not ready for this book.

Thankfully the basics of JavaScript can be learned with ease if you put in the time. This free guide will teach you the core components of JavaScript from start to finish. You can also try the free Eloquent JavaScript book or grab a copy of JavaScript: Novice to Ninja as mentioned earlier.

Once you’re past the beginner’s phase of JS development you can hop right into SPA Design and Architecture without trouble. In fact, if you’re excited to build single page applications I think you’ll find this book invigorating and even quite fun!

Final Summary

I would absolutely recommend this book to anyone interested in the single page app environment. As long as you have some basic JavaScript fundamentals you can pick up the other topics along the way.

SPAs are becoming more popular but they’re also still very confusing. You can find lots of tutorials online but these won’t teach you how to architect, organize, and test your SPAs.

SPA Design and Architecture will teach you all of this and a whole lot more. My biggest gripe is with the inclusion of Backbone and the lack of detail in some areas.

This is definitely a high-quality intro guide. But with all this info packed into 275 pages I kind of wish the author pushed it to 375 pages with even more examples. If the book was longer and Backbone was replaced with React this book would’ve easily hit a perfect score.

But aside from these minor complaints this is still the best book for introducing the proper development workflow and debugging techniques for custom single page web applications.

Review Rating: 4/5
Tags:

Author:

Alex is a fullstack developer with years of experience working in digital agencies and as a freelancer. He writes about educational resources and tools for programmers building the future of the web.