WHAT’S IN THIS CHAPTER?
- Creating data as primitives, object literals, and modules
- Creating data with the new keyword
- Using methods of object creation to produce reliable objects
- Controlling inheritance using prototypal, classical, and functional patterns
- Using monkey-patching responsibly
WROX.COM CODE DOWNLOADS FOR THIS CHAPTER
The wrox.com code downloads for this chapter are found at
This chapter surveys the most common ways to create an object, considering how well each one meets the SOLID and DRY criteria for reliability and testability introduced in Chapter 1.
Let’s start with the most basic and build our way up.
var.” The next-most-common response is the opposite: to take a deep breath and rattle off enough types to fill a C# manual. Neither answer is correct.