Hints and tips

Using name-based dependency injection allows for conflicts between names. In order to avoid conflicts, it may be worth prefacing your injected arguments with some special character. For instance, Angular.js uses the $ character to denote an injected term.

Several times in this chapter, I've mentioned the JavaScript build pipeline. It may seem odd that we have to build an interpreted language. However, there are certain optimizations and process improvements that may result from "building" JavaScript. There are a number of tools that can be used to help build JavaScript. Tools such as Grunt and Gulp are specifically designed to perform JavaScript and web tasks, but you can also make use of traditional build tools such as Rake, Ant, ...

Get Mastering JavaScript Design Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.