Functional Programming in JavaScript: How to Improve Your Javascript Programs Using Functional Techniques
Audible Logo Your audiobook is waiting!
Enjoy a free trial on us
$0.00
  • Click above for unlimited listening to select audiobooks, Audible Originals, and podcasts.
  • One credit a month to pick any title from our entire premium selection — yours to keep (you'll use your first credit now).
  • You will get an email reminder before your trial ends.
  • $14.95 a month after 30 days. Cancel online anytime.
Sold and delivered by Audible, an Amazon company
List Price: $19.95
By completing your purchase, you agree to Audible’s Conditions Of Use and Amazon's Privacy Notice.
Sold and delivered by Audible, an Amazon company

Functional Programming in JavaScript: How to Improve Your Javascript Programs Using Functional Techniques Audible Audiobook – Unabridged

4.2 4.2 out of 5 stars 42 ratings

Summary

Functional Programming in JavaScript teaches JavaScript developers functional techniques that will improve extensibility, modularity, reusability, testability, and performance. Through concrete examples and jargon-free explanations, this book teaches you how to apply functional programming to real-life development tasks.

About the Technology

In complex web applications, the low-level details of your JavaScript code can obscure the workings of the system as a whole. As a coding style, functional programming (FP) promotes loosely coupled relationships among the components of your application, making the big picture easier to design, communicate, and maintain.

About the Book

Functional Programming in JavaScript teaches you techniques to improve your web applications - their extensibility, modularity, reusability, and testability, as well as their performance. This easy-to-understand book uses concrete examples and clear explanations to show you how to use functional programming in real life. If you're new to functional programming, you'll appreciate this guide's many insightful comparisons to imperative or object-oriented programming that help you understand functional design. By the end, you'll think about application design in a fresh new way, and you may even grow to appreciate monads!

What's Inside

  • High-value FP techniques for real-world uses
  • Using FP where it makes the most sense
  • Separating the logic of your system from implementation details
  • FP-style error handling, testing, and debugging
  • All code samples use JavaScript ES6 (ES 2015)

About the Listener

For developers with a solid grasp of JavaScript fundamentals and web application design.

About the Author

Luis Atencio is a software engineer and architect building enterprise applications in Java, PHP, and JavaScript.

Table of Contents

Part 1 Think Functionally

  • Becoming functional
  • Higher-order JavaScript

Part 2 Get Functional

  • Few data structures, many operations
  • Toward modular, reusable code
  • Design patterns against complexity

Part 3 Enhancing Your Functional Skills

  • Bulletproofing your code
  • Functional optimizations
  • Managing asynchronous events and data

PLEASE NOTE: When you purchase this title, the accompanying PDF will be available in your Audible Library along with the audio.

Product details

Listening Length 6 hours and 32 minutes
Author Luis Atencio
Narrator Chris Dunn
Audible.com Release Date November 19, 2018
Publisher Manning Publications
Program Type Audiobook
Version Unabridged
Language English
ASIN B07KFPZLQ6
Best Sellers Rank #269,412 in Audible Books & Originals (See Top 100 in Audible Books & Originals)
#130 in Functional Software Programming
#395 in Programming & Software Development
#404 in Java Programming

Customer reviews

4.2 out of 5 stars
4.2 out of 5
42 global ratings

Top reviews from the United States

Reviewed in the United States on February 8, 2018
This is the book which opened my eyes to functional concepts and makes javascript palatable, dare I say fun to write. Would buy again, would recommend to those who know javascript but do not know the existing and new functional components. Thanks Luis Atencio!
2 people found this helpful
Report
Reviewed in the United States on October 25, 2016
Great book, though a little dry. I can't fault the author, really, as this is the most difficult type of JS to learn. Just make sure you understand the way JavaScript works before you take this dive.
One person found this helpful
Report
Reviewed in the United States on January 5, 2017
A really nice overview of some concepts related to functional programming in JavaScript. I had already begun reading up on functional programming so I was familiar with some of the concepts but the examples and explanations helped solidify and clarify some areas for me, particularly around error handling and branching.
3 people found this helpful
Report
Reviewed in the United States on March 28, 2018
A coming of age for javascript, functional programming taught by example along with ramda and rxjs.
One person found this helpful
Report
Reviewed in the United States on August 24, 2017
Great book on the subject & comes with a free E-book (PDF, Kindle..etc) version.
One person found this helpful
Report
Reviewed in the United States on August 10, 2016
Luis Atencio does an excellent job of explaining how functional programming can be done in javascript as well as providing a compelling case for why you may want to adapt this style. He compares and contrasts with both imperative style and object-orientated code, and while he makes a case that FP is superior, he does so without coming across as insulting to those that like the imperative and OO styles (whereas many authors can feel like they consider those that follow other styles at best naive or even worse).

The text covers a wide range of topics in functional programming including side-effect free functions, first-class functions and higher-order functions, partial application, currying, and Monads including functional techniques to avoid nulls and error-checking. He discusses the ways in which functional programs can be more declarative and easier to reason about as well as how functional programming can improve unit and coverage testing and asynchronous code.

Atencio's writing style is clear. He presents many examples almost all of which are clear and highly focused on the point under discussion. Many examples even have imperative versions presented for comparison of the two different styles.

The text does have a much higher reliance on external libraries than I would like to see, especially where there are native versions of the functions being discussed (for example the map, filter, and reduce array operations). However, many features discussed are not available in native javascript, and in many cases, he does show sample implementations of these features natively (although he does still encourage the library use).

The text suffers from a number of typos and errors. These range from nearly harmless (saying orientated-orientated instead of object-orientated) to more severe errors in sample code (using the variable index instead of idx or defining a function as (p1,p2)=>p1.getAge() p2.getAge() when the difference of the two ages is desired). While there are many examples of these, I haven't seen any that are not cleared up by the surrounding text (discussing the return values of the age function) or that are too difficult to reason out (it is obvious that the idx variable is desired in the other example).

There is a heavy reliance on the additions to the javascript language made by ES6. While someone stuck working with ES5 will be able to get something useful out of the text, not all the examples will run without ES6.

Overall, I would recommend this book to anybody interested in using functional techniques in the javascript language. In fact, someone looking to learn about functional programming in general will get something out of this book.

(This review is based on an electronic copy of the book)

Disclaimer: I was provided with a free electronic copy of the book to review.
4 people found this helpful
Report
Reviewed in the United States on June 21, 2017
Thank you.
One person found this helpful
Report
Reviewed in the United States on July 29, 2017
To preface, I have been programming for around 15 years, and writing JavaScript for a bit over 10 years.

I loved Functional Programming in Scala (also published by Manning), so when I saw Functional Programming in JavaScript I snapped it up immediately. I am severely disappointed to see that Manning really dropped the ball on this one.

In no particular order:

- The code in the book is full of errors: typos, missing symbols, unhandled nulls, and so on. The author mixes syntaxes seemingly by accident (function vs. arrow, let vs. const vs. var, etc.).
- Atencio's writing is imprecise at best, and gives the impression that he has a poor understanding of functional programming at worst. For example (from page 60): "Instead of creating new data structure classes to meet specific needs, [functional programming] uses common ones like arrays and applies a number of coarse-grained, higher-order operations that are agnostic to the underlying representation of the data"; he seems to be mixing his understanding of Algebraic Data Types with JavaScript's built-in data structures, and in the process totally ignoring how data structures are actually implemented in functional languages (for example, see Okasaki's excellent Purely Functional Data Structures).
- Concepts are introduced and then mixed willy nilly: lenses are neither derived nor explained, Lodash and Ramda functions are mixed at will leading to totally unreadable code, imperative and functional and OO code is used interchangeably, and so on.
- The code is littered with incomplete and unexplained references to and code from other languages (Java, SQL, Haskell, Scala, F#, etc.), which adds nothing to the author's explanations, and seems to tell the reader "Hey look! I Googled how to write a function in Haskell! That's what functional programming is right? Right?".
- The author begins by talking about why Object Oriented code is bad, and then proceeds to use Lodash chains and ES6 classes throughout the book without explanation.
- Recursion is barely explained, and the author does not mention that V8 has yet to implement tail call optimization, making most recursive algorithms useless in practice (he does mention trampolining in a side bar, but fails to discuss it at all); He talks about referential transparency, then proceeds to throw runtime exceptions throughout his examples; Monads are barely derived or discussed: the author seems to have simply copy+pasted Functor, Maybe, and Either from a FantasyLand implementation, added a few annotations, and called it done.

Overall, this book was a real bummer. Manning should retract it, fix it, and re-release it. As is, it is not fit for publication.

For anyone seeking a better book, I highly recommend Braithwaite's JavaScript Allonge, followed by Chiusano's excellent Functional Programming in Scala.
34 people found this helpful
Report

Top reviews from other countries

Hela
5.0 out of 5 stars Excellent reference for JS FP
Reviewed in France on September 21, 2019
I read many books about FP in JS, this is my best and favourite one. An excellent reference. Simple, clear, many examples and schemes.
Maxime Bruneau-Lavoie
5.0 out of 5 stars Highly recommend for anyone who wants to write more functional javascript
Reviewed in Canada on November 7, 2017
I bought this book after reading RxJS in action by the same author. Highly recommend for anyone who wants to write more functional javascript.
Cabiria
2.0 out of 5 stars I wish there were more books out there on this topic
Reviewed in the United Kingdom on June 26, 2021
I have gone through the first 3 chapters and I feel already disappointed. So far I can say that many concepts are introduced and not really fully explained. On top of this, the author has also the irritating habit of starting a topic only to then say that he will get into it properly in a later chapter. This is a high level overview of something that could have been way more interesting and satisfactory.
erica
4.0 out of 5 stars C'est un bon livre, avec des textes explicatifs suffisant ...
Reviewed in Canada on December 31, 2017
C'est un bon livre, avec des textes explicatifs suffisant (pas trop verbeux comme avec O'Reilly). Les exemples viennent appuyer succintement le propos. J'ai découvert plusieurs notions importantes du Javascript contemporain (ECMAScript 6) et que j'utiliserai dans mes prochains projets.