Designing Scalable JavaScript Applications
With chapter selections by Emmit Scott
  • July 2016
  • ISBN 9781617294174
  • 134 pages

If you’ve ever written a non-trivial JavaScript application, you know that creating a code base that’s easy to maintain and scales well over time is no small feat. The complexity only grows as the project becomes larger. While it’s impossible to plan for every change that could possibly happen over the life of a project, you can help future-proof your front-end architecture by designing software that’s pliable and easily extended. Well-designed, extensible architecture can help reduce development and maintenance costs, as bug fixes, enhancements, and new technologies can be incorporated more easily.

Designing Scalable JavaScript Applications helps you start thinking about which tools and frameworks you’ll use and which design patterns you’ll implement. This book brings together excerpts from four different Manning titles selected by Emmit Scott, the author of SPA Design and Architecture. These chapters are great starting points for understanding how to build better JavaScript applications. They introduce some fundamental concepts for creating clean, loosely coupled code, and show you how to make your development process more productive and efficient.

Table of Contents detailed table of contents



The role of MV* frameworks

1. The role of MV* frameworks

1.1. What is MV*?

1.1.1. Traditional UI design patterns

1.1.2. MV* and the browser environment

1.2. Common MV* concepts

1.2.1. Meet the frameworks

1.2.2. Meet our MV* project

1.2.3. Models

1.2.4. Bindings

1.2.5. Templates


1.3. Why use an MV* framework?

1.3.1. Separation of concerns

1.3.2. Routine tasks simplified

1.3.3. Productivity gains

1.3.4. Standardization

1.3.5. Scalability

1.4. Choosing a framework

1.5. Chapter challenge

1.6. Summary

1.6.1. What's inside

Embracing modularity and dependency management

2. Embracing modularity and dependency management

2.1. Working with code encapsulation

2.1.1. Understanding the Single Responsibility Principle

2.1.2. Information hiding and interfaces

2.1.3. Scoping and this keyword

2.1.4. Strict mode

2.1.5. Variable hoisting

2.2. JavaScript modules

2.2.1. Closures and the module pattern

2.2.2. Prototypal modularity

2.2.3. CommonJS modules

2.3. Using dependency management

2.3.1. Dependency graphs

2.3.2. Introducing RequireJS

2.3.3. Browserify: CJS in the browser

2.3.4. The Angular way

2.4. Understanding package management

2.4.1. Introducing Bower

2.4.2. Big libraries, small components

2.4.3. Choosing the right module system

2.4.4. Learning about circular dependencies

2.5. Harmony: a glimpse of ECMAScript 6

2.5.1. Traceur as a Grunt task

2.5.2. Modules in Harmony

2.5.3. Let there be block scope

2.6. Summary

2.6.1. What's inside

Dealing with collections

3. Dealing with collections

3.1. Arrays

3.1.1. Creating arrays

3.1.2. Adding and removing items at either end of an array

3.1.3. Adding and removing items at any array location

3.1.4. Common operations on arrays

3.1.5. Reusing built-in array functions

3.2. Maps

3.2.1. Don't use objects as maps

3.2.2. Creating our first map

3.2.3. Iterating over maps

3.3. Sets

3.3.1. Creating our first set

3.3.2. Union of sets

3.3.3. Intersection of sets

3.3.4. Difference of sets

3.4. Summary

3.5. Exercises

3.5.1. What's inside

Getting started with Gulp

4. Getting started with Gulp

4.1. Setting up Gulp

4.1.1. The building blocks of Gulp

4.1.2. The Gulp command-line interface

4.1.3. The local Gulp installation

4.2. Creating Gulpfiles

4.2.1. A Gulp "Hello World" task

4.2.2. Dealing with streams

4.2.3. Readable and writeable streams with Gulp

4.3. Handling tasks with Gulp plugins

4.3.1. Transforming data

4.3.2. Changing the file structure

4.3.3. Chaining plugins

4.4. Summary

4.4.1. What's inside



About the author

Emmit Scott is a senior software engineer and architect with experience building large-scale, web-based applications.

eBook $0.00 PDF only

FREE domestic shipping on three or more pBooks