JavaScript: Functional Programming for JavaScript Developers

Unlock the powers of functional programming hidden within JavaScript to build smarter, cleaner, and more reliable web apps
Preview in Mapt

JavaScript: Functional Programming for JavaScript Developers

Ved Antani, Simon Timms, Dan Mantyla

2 customer reviews
Unlock the powers of functional programming hidden within JavaScript to build smarter, cleaner, and more reliable web apps
Mapt Subscription
FREE
$29.99/m after trial
eBook
$44.80
RRP $63.99
Save 29%
Print + eBook
$79.99
RRP $79.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$44.80
$79.99
$29.99p/m after trial
RRP $63.99
RRP $79.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


JavaScript: Functional Programming for JavaScript Developers Book Cover
JavaScript: Functional Programming for JavaScript Developers
$ 63.99
$ 44.80
JavaScript Design Patterns 20 Patterns for Advancing Your JavaScript Skills [Video] Book Cover
JavaScript Design Patterns 20 Patterns for Advancing Your JavaScript Skills [Video]
$ 94.99
$ 80.75
Buy 2 for $35.00
Save $123.98
Add to Cart
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 

Book Details

ISBN 139781787124660
Paperback635 pages

Book Description

JavaScript is a high-level, dynamic, untyped, lightweight, and interpreted programming language and functional programming is a style that emphasizes and enables smarter code that minimizes complexity and increases modularity. It's a way of writing cleaner code through clever ways of mutating, combining, and using functions. And JavaScript provides an excellent medium for this approach. By learning how to expose JavaScript's true identity as a functional language, we can implement web apps that are more powerful, easier to maintain and more reliable.

The java script: Functional Programming for JavaScript Developers course will take you on a journey to show how functional programming when combined with other techniques makes JavaScript programming more efficient.

The first module Mastering JavaScript, stress on practical aspects of Javascript development like—Functions and Closures, Runtime debugging techniques, project layout, events and DOM processing, build tools, Object-oriented patterns, isomorphism—everything that a modern Javascript project would need.

The second module, Mastering JavaScript Design Patterns - Second Edition, will explore how design patterns can help you improve and organize your JavaScript code. You’ll get to grips with creational, structural, and behavioral patterns as you discover how to put them to work in different scenarios. This updated edition will also delve into reactive design patterns and microservices as they are a growing phenomenon in the world of web development. It will also show you some advanced patterns, including dependency injection and live post processing.

The third module, Functional Programming in JavaScript, will help you to write real-world applications by utilizing a wide range of functional techniques and styles. It explores the core concepts of functional programming common to all functional languages, with examples of their use in JavaScript.

Table of Contents

Chapter 1: JavaScript Primer
A little bit of history
How to use this book
Hello World
Summary
Chapter 2: Functions, Closures, and Modules
A function literal
Functions as data
Scoping
Function declarations versus function expressions
The arguments parameter
Anonymous functions
Closures
Timers and callbacks
Private variables
Loops and closures
Modules
Summary
Chapter 3: Data Structures and Manipulation
Regular expressions
Exact match
Match from a class of characters
Repeated occurrences
Beginning and end
Backreferences
Greedy and lazy quantifiers
Arrays
Maps
Sets
A matter of style
Summary
Chapter 4: Object-Oriented JavaScript
Understanding objects
Instance properties versus prototype properties
Inheritance
Getters and setters
Summary
Chapter 5: Testing and Debugging
Unit testing
JavaScript debugging
Summary
Chapter 6: ECMAScript 6
Shims or polyfills
Transpilers
ES6 syntax changes
Summary
Chapter 7: DOM Manipulation and Events
DOM
Chaining
Traversal and manipulation
Working with browser events
Propagation
jQuery event handling and propagation
Event delegation
The event object
Summary
Chapter 8: Server-Side JavaScript
An asynchronous evented-model in a browser
Callbacks
Timers
EventEmitters
Modules
npm
JavaScript performance
Summary
Chapter 9: Designing for Fun and Profit
The road to JavaScript
What is a design pattern?
Anti-patterns
Summary
Chapter 10: Organizing Code
Chunks of code
What's the matter with global scope anyway?
Objects in JavaScript
Build me a prototype
Inheritance
Modules
ECMAScript 2015 classes and modules
Best practices and troubleshooting
Summary
Chapter 11: Creational Patterns
Abstract factory
Builder
Factory method
Singleton
Prototype
Tips and tricks
Summary
Chapter 12: Structural Patterns
Adapter
Bridge
Composite
Decorator
Façade
Flyweight
Proxy
Hints and tips
Summary
Chapter 13: Behavioral Patterns
Chain of responsibility
Command
Interpreter
Iterator
Mediator
Memento
Observer
State
Strategy
Template method
Visitor
Hints and tips
Summary
Part 2
Chapter 14: Functional Programming
Functional functions are side-effect-free
Function passing
Filters and pipes
Accumulators
Memoization
Immutability
Lazy instantiation
Hints and tips
Summary
Chapter 15: Reactive Programming
Application state changes
Streams
Filtering streams
Merging streams
Streams for multiplexing
Hints and tips
Summary
Chapter 16: Application Patterns
First, some history
Model View Controller
Model View Presenter
Model View ViewModel
Tips and tricks
Summary
Chapter 17: Web Patterns
Sending JavaScript
Plugins
Doing two things at once – multithreading
Circuit breaker pattern
Promise pattern
Hints and tips
Summary
Chapter 18: Messaging Patterns
What's a message anyway?
Request-reply
Publish-subscribe
Dead letter queues
Hints and tips
Summary
Chapter 19: Microservices
Façade
Service selector
Aggregate services
Pipeline
Message upgrader
Failure patterns
Hints and tips
Summary
Chapter 20: Patterns for Testing
The testing pyramid
Testing in the small with unit tests
Arrange-Act-Assert
Fake objects
Test spies
Stubs
Mock
Monkey patching
Interacting with the user interface
Tips and tricks
Summary
Chapter 21: Advanced Patterns
Dependency injection
Live post processing
Aspect oriented programming
Mixins
Macros
Tips and tricks
Summary
Chapter 22: ECMAScript-2015/2016 Solutions Today
TypeScript
BabelJS
Tips and tricks
Summary
Chapter 23: The Powers of JavaScript's Functional Side – a Demonstration
Introduction
The demonstration
The application – an e-commerce website
Functional programming
Summary
Chapter 24: Fundamentals of Functional Programming
Functional programming languages
Working with functions
The functional programmer's toolkit
Summary
Chapter 25: Setting Up the Functional Programming Environment
Introduction
Functional libraries for JavaScript
Development and production environments
Summary
Chapter 26: Implementing Functional Programming Techniques in JavaScript
Partial function application and currying
Function composition
Mostly functional programming
Functional reactive programming
Summary
Chapter 27: Category Theory
Category theory
Functors
Monads
Implementing categories
Summary
Chapter 28: Advanced Topics and Pitfalls in JavaScript
Recursion
Variable scope
Function declarations versus function expressions versus the function constructor
Summary
Chapter 29: Functional and Object-oriented Programming in JavaScript
JavaScript – the multi-paradigm language
JavaScript's object-oriented implementation – using prototypes
Mixing functional and object-oriented programming in JavaScript
Summary

What You Will Learn

  • Get a run through of the basic JavaScript language constructs
  • Code using the powerful object-oriented feature in JavaScript
  • Master DOM manipulation, cross-browser strategies, and ES6
  • Understand the basic concurrency constructs in Javascript and best performance strategies
  • Harness the power of patterns for tasks ranging from application building to code testing
  • Build large-scale apps seamlessly with the help of reactive patterns
  • Explore advanced design patterns, including dependency injection
  • Develop more powerful applications with currying and function composition
  • Create more reliable code with closures and immutable data

Authors

Table of Contents

Chapter 1: JavaScript Primer
A little bit of history
How to use this book
Hello World
Summary
Chapter 2: Functions, Closures, and Modules
A function literal
Functions as data
Scoping
Function declarations versus function expressions
The arguments parameter
Anonymous functions
Closures
Timers and callbacks
Private variables
Loops and closures
Modules
Summary
Chapter 3: Data Structures and Manipulation
Regular expressions
Exact match
Match from a class of characters
Repeated occurrences
Beginning and end
Backreferences
Greedy and lazy quantifiers
Arrays
Maps
Sets
A matter of style
Summary
Chapter 4: Object-Oriented JavaScript
Understanding objects
Instance properties versus prototype properties
Inheritance
Getters and setters
Summary
Chapter 5: Testing and Debugging
Unit testing
JavaScript debugging
Summary
Chapter 6: ECMAScript 6
Shims or polyfills
Transpilers
ES6 syntax changes
Summary
Chapter 7: DOM Manipulation and Events
DOM
Chaining
Traversal and manipulation
Working with browser events
Propagation
jQuery event handling and propagation
Event delegation
The event object
Summary
Chapter 8: Server-Side JavaScript
An asynchronous evented-model in a browser
Callbacks
Timers
EventEmitters
Modules
npm
JavaScript performance
Summary
Chapter 9: Designing for Fun and Profit
The road to JavaScript
What is a design pattern?
Anti-patterns
Summary
Chapter 10: Organizing Code
Chunks of code
What's the matter with global scope anyway?
Objects in JavaScript
Build me a prototype
Inheritance
Modules
ECMAScript 2015 classes and modules
Best practices and troubleshooting
Summary
Chapter 11: Creational Patterns
Abstract factory
Builder
Factory method
Singleton
Prototype
Tips and tricks
Summary
Chapter 12: Structural Patterns
Adapter
Bridge
Composite
Decorator
Façade
Flyweight
Proxy
Hints and tips
Summary
Chapter 13: Behavioral Patterns
Chain of responsibility
Command
Interpreter
Iterator
Mediator
Memento
Observer
State
Strategy
Template method
Visitor
Hints and tips
Summary
Part 2
Chapter 14: Functional Programming
Functional functions are side-effect-free
Function passing
Filters and pipes
Accumulators
Memoization
Immutability
Lazy instantiation
Hints and tips
Summary
Chapter 15: Reactive Programming
Application state changes
Streams
Filtering streams
Merging streams
Streams for multiplexing
Hints and tips
Summary
Chapter 16: Application Patterns
First, some history
Model View Controller
Model View Presenter
Model View ViewModel
Tips and tricks
Summary
Chapter 17: Web Patterns
Sending JavaScript
Plugins
Doing two things at once – multithreading
Circuit breaker pattern
Promise pattern
Hints and tips
Summary
Chapter 18: Messaging Patterns
What's a message anyway?
Request-reply
Publish-subscribe
Dead letter queues
Hints and tips
Summary
Chapter 19: Microservices
Façade
Service selector
Aggregate services
Pipeline
Message upgrader
Failure patterns
Hints and tips
Summary
Chapter 20: Patterns for Testing
The testing pyramid
Testing in the small with unit tests
Arrange-Act-Assert
Fake objects
Test spies
Stubs
Mock
Monkey patching
Interacting with the user interface
Tips and tricks
Summary
Chapter 21: Advanced Patterns
Dependency injection
Live post processing
Aspect oriented programming
Mixins
Macros
Tips and tricks
Summary
Chapter 22: ECMAScript-2015/2016 Solutions Today
TypeScript
BabelJS
Tips and tricks
Summary
Chapter 23: The Powers of JavaScript's Functional Side – a Demonstration
Introduction
The demonstration
The application – an e-commerce website
Functional programming
Summary
Chapter 24: Fundamentals of Functional Programming
Functional programming languages
Working with functions
The functional programmer's toolkit
Summary
Chapter 25: Setting Up the Functional Programming Environment
Introduction
Functional libraries for JavaScript
Development and production environments
Summary
Chapter 26: Implementing Functional Programming Techniques in JavaScript
Partial function application and currying
Function composition
Mostly functional programming
Functional reactive programming
Summary
Chapter 27: Category Theory
Category theory
Functors
Monads
Implementing categories
Summary
Chapter 28: Advanced Topics and Pitfalls in JavaScript
Recursion
Variable scope
Function declarations versus function expressions versus the function constructor
Summary
Chapter 29: Functional and Object-oriented Programming in JavaScript
JavaScript – the multi-paradigm language
JavaScript's object-oriented implementation – using prototypes
Mixing functional and object-oriented programming in JavaScript
Summary

Book Details

ISBN 139781787124660
Paperback635 pages
Read More
From 2 reviews

Read More Reviews

Recommended for You

Object-Oriented JavaScript - Second Edition Book Cover
Object-Oriented JavaScript - Second Edition
$ 29.99
$ 21.00
Node.js Design Patterns - Second Edition Book Cover
Node.js Design Patterns - Second Edition
$ 39.99
$ 28.00
Learning Angular 2 Book Cover
Learning Angular 2
$ 31.99
$ 22.40
Python: Journey from Novice to Expert Book Cover
Python: Journey from Novice to Expert
$ 69.99
$ 49.00
Mastering Web Application Development with AngularJS Book Cover
Mastering Web Application Development with AngularJS
$ 26.99
$ 5.40
AngularJS Web Application Development Blueprints Book Cover
AngularJS Web Application Development Blueprints
$ 29.99
$ 21.00