The Joy of JavaScript
Luis Atencio
  • MEAP began March 2019
  • Publication in Fall 2019 (estimated)
  • ISBN 9781617295867
  • 325 pages (estimated)
  • printed in black & white
Whether for building interactive browser-based applications or creating server-side applications in Node, JavaScript is the most widely used language for web programming. With new features, language improvements, paradigms, and potential use cases appearing regularly, there’s never been a more exciting time to be a JavaScript developer. In The Joy of JavaScript, author and JavaScript expert Luis Atencio teaches you key design concepts that lead to clean, lean, modular, and easy-to-maintain code.
Table of Contents detailed table of contents

Part 1: Foundations

1 JavaScript Reloaded

1.1 JavaScript + Babel: past, present, and next

1.2 One language to rule them all

1.3 JavaScript’s object model

1.3.1 No blueprints, just prototypes

1.3.2 JavaScript objects: no fluff, just stuff

1.3.3 Sample application: banking transactions

1.3.4 Inheritance vs composition: why not both?

1.4 Higher-order functional programming

1.4.1 Algebraic coding

1.5 Separating concerns like a pro

1.6 Taming asynchronous behavior

1.7 Types for JavaScript?

1.8 Transpiler: the road to modern JS

1.9 Summary

2 Prototype-centric object modeling

2.1 Reviewing “prototypal inheritance”

2.1.1 Understanding the property resolution process

2.1.2 Differential inheritance

2.2 Constructor functions

2.2.1 Revealing internal object plumbing

2.2.2 Abstracting object creation

2.2.3 The new gotchas

2.3 Class-based inheritance

2.3.1 Prototypes !== classes

2.3.2 Limitations of JavaScript’s class system

2.4 Summary

3 Delegation-based, compositional object models

3.1 Object/behavior delegation with OLOO

3.2 Types of delegation

3.2.1 Explicit delegation

3.2.2 Implicit delegation

3.3 Functional mixins

3.3.1 Object.assign uncovered

3.3.2 Assignment vs definition

3.4 Assembling objects using mixins

3.4.1 Mixin linearization

3.5 Summary

Part 2: Fluent Programming

4 Get ahead with functional programming

5 Data-driven, flluent coding

Part 3: Project organization

6 JavaScript’ revamped module system

7 Hooking and meta-programming

8 Benefits of centralized storage

Part 4: JavaScript at scale

9 Untangling async flows

10 A look into typed JavaScript<T>


Appendix A: Installing and using Babel

Appendix B: Installing and configuring ESLint and Prettier

Appendix C: Debugging

About the Technology

As web applications have become more complex and sophisticated, JavaScript has advanced with them, thanks in large part to TC39, a JavaScript task group committed to evolving and improving the language. JavaScript has become lightweight and dynamic, with first-class functions and support for classes and asynchronous programming. JavaScript is multi-paradigm, supporting object-oriented, functional, reactive, and event-driven styles of programming. And transpilers like Babel make it possible to compile code written in other languages into JavaScript. It’s never been easier, more rewarding, or more joyful to be a JavaScript developer!

About the book

The Joy of JavaScript teaches you how to design JavaScript applications founded in sound computer science concepts and real-world industry success. First, you’ll get up close and personal with JavaScript’s object system. From there, you’ll dive into programming objects and functions. As you build various domain models, you’ll learn the pros and cons of techniques ranging from prototype-centered tightly coupled object configurations to loosely coupled delegation-based compositions. You’ll also explore ways of connecting objects with pure functions, and driving business logic with immutability and algebraic data types.

Using JavaScript’s shiny new module system and dynamically hooking into your data with Proxy and Reflect APIs, you’ll master tracing, logging, and performance trackers without having to modify your application components. You’ll also discover blockchain concepts as you develop pieces of a transaction management system. Along the way, you’ll explore topics like using JavaScript with different paradigms and how to overlay type information into JavaScript without having to switch to TypeScript. Illustrated, easy-to-grasp use cases and a hands-on peer-to-peer project lock in all you’ve learned, then take your learning further by showing you how to untangle complex asynchronous behaviors using promises, generators, and ES7 async-await syntax.

What's inside

  • JavaScript’s objects and module system
  • Working with higher order functions
  • Driving application business logic with functional programming principles
  • Dynamically hooking into data with Proxy and Reflect APIs
  • Taming complex asynchronous behavior using reactive programming
  • Static type-checking with Flow
  • A hands-on peer-to-peer event driven system project
  • Future JavaScript proposals coming down the pike

About the reader

Perfect for intermediate JavaScript developers with basic familiarity with HTTP, HTML/CSS, and Git/CLI.

About the author

Luis Atencio is a software engineer for Citrix Systems, where he develops and architects web applications leveraging Java, PHP, and JavaScript platforms. He blogs about software engineering at, has spoken in many dev conferences, and has written articles for PHPArch magazine and DZone Refcardz. Luis is the author of Manning’s Functional Programming in JavaScript and the co-author of Manning’s RxJS in Action.

Manning Early Access Program (MEAP) Read chapters as they are written, get the finished eBook as soon as it’s ready, and receive the pBook long before it's in bookstores.
MEAP combo $39.99 pBook + eBook + liveBook
MEAP eBook $31.99 pdf + ePub + kindle + liveBook

placing your order...

Don't refresh or navigate away from the page.

FREE domestic shipping on three or more pBooks