Functional JavaScript
Introducing Functional Programming with Underscore.js
Publisher: O'Reilly Media
Final Release Date: June 2013
Pages: 260

How can you overcome JavaScript language oddities and unsafe features? With this book, you’ll learn how to create code that’s beautiful, safe, and simple to understand and test by using JavaScript’s functional programming support. Author Michael Fogus shows you how to apply functional-style concepts with Underscore.js, a JavaScript library that facilitates functional programming techniques. Sample code is available on GitHub at https://github.com/funjs/book-source.

Fogus helps you think in a functional way to help you minimize complexity in the programs you build. If you’re a JavaScript programmer hoping to learn functional programming techniques, or a functional programmer looking to learn JavaScript, this book is the ideal introduction.

  • Use applicative programming techniques with first-class functions
  • Understand how and why you might leverage variable scoping and closures
  • Delve into higher-order functions—and learn how they take other functions as arguments for maximum advantage
  • Explore ways to compose new functions from existing functions
  • Get around JavaScript’s limitations for using recursive functions
  • Reduce, hide, or eliminate the footprint of state change in your programs
  • Practice flow-based programming with chains and functional pipelines
  • Discover how to code without using classes
Table of Contents
Product Details
About the Author
Colophon
Recommended for You
Customer Reviews

REVIEW SNAPSHOT®

by PowerReviews
oreillyFunctional JavaScript
 
4.2

(based on 13 reviews)

Ratings Distribution

  • 5 Stars

     

    (6)

  • 4 Stars

     

    (6)

  • 3 Stars

     

    (0)

  • 2 Stars

     

    (0)

  • 1 Stars

     

    (1)

92%

of respondents would recommend this to a friend.

Pros

  • Accurate (9)
  • Helpful examples (9)
  • Well-written (9)
  • Concise (5)
  • Easy to understand (5)

Cons

No Cons

Best Uses

  • Intermediate (10)
  • Expert (6)
  • Novice (4)
  • Student (4)
    • Reviewer Profile:
    • Developer (13), Designer (4)

Reviewed by 13 customers

Sort by

Displaying reviews 1-10

Back to top

Previous | Next »

(0 of 9 customers found this review helpful)

 
1.0

The worst book about functionality

By predent

from Athens, Greece

About Me Designer, Developer, Educator, Knowleddge Manager

Pros

  • A Few Helpful Examples

Cons

  • Not comprehensive enough
  • Unstructured

Best Uses

  • Useless

Comments about oreilly Functional JavaScript:

There is nothing great in it. Only some examples. This book is not "functional" in its nature and structure. The author although he claims that he uses functional programming and talks about the "assembly model based on functionality" he uses inproper naming, does not provide any functionality diagrams, he throughs "examples" without a strategy - or as we say in systems thinking a scope. In my opinion, instead of setting OOP and Functionality at the opposite the author should place on different layers - OOP is the basic layer the structure and functionality is the organization of the structural elements - this is the basic model of systems thinking. If the author manages to recompile this book based on systems thinking, he will achieve to promote Functionality. He will have to try harder.

 
5.0

Great book about a great language.

By Muzietto

from Italy

About Me Designer, Developer

Verified Buyer

Pros

  • Accurate
  • Concise
  • Easy to understand
  • Helpful examples
  • Well-written

Cons

    Best Uses

    • Novice
    • Student

    Comments about oreilly Functional JavaScript:

    This book is the proof that JS is a great language to learn, appreciate and -above all- practice functional programming. It sheds some much needed light in a world still too influenced by uninformed, biased opinions about the language and its possibilities. I reckon this book has the capability to improve the quality of a website much more than any framework around.

    (2 of 2 customers found this review helpful)

     
    5.0

    Functional JavaScript

    By Bielawka

    from Toruń, Poland

    About Me Developer

    Verified Reviewer

    Pros

    • Accurate
    • Helpful examples
    • Well-written

    Cons

      Best Uses

      • Expert
      • Intermediate

      Comments about oreilly Functional JavaScript:

      Over the last years the JavaScript returned to favor thanks to the popularity of HTML5 and jQuery. Many developers want to learn more about this language and to know JS's most significant libraries. Very popular products are distinguished by Jeremy Ashkenas. I think all developers heard about CoffeeScript or Backbone.js framework. Ashkenas also is the creator of UnderscoreJs library which provides a very useful utility functions.

      On the second hand, a very common tag is functional-style concept. At every step, terms like closures, currying, folding, come to our ears and eyes. Surely as a programmer you want to read a good book about it. This book should be absorbing, have good style of writing and practical examples. And first of all, author should have a considerable knowledge about things he describes.

      I think Michael Fogus, as a contributor to the Clojure and Underscore.js library is a right person in the right place. While reading, you can fell that the writer has a practical and real-life skills about functional programming and JS. You can see that he devoted much time to bite into this. For example Fogus bring us a precise chapter about closures. Yes! In JavaScript. It's not the frequent term in a base of articles in a world's JS's blogs and books. It is not what a typical developer who writes only Dom-tree-JS-code knows.

      If you want to know how to use things like closures, currying, folding. Or you want to get knowledge about functions as units of behavior, functional recursion on data "table-like" (great thing!), recursion as a base of deeper understanding of a functional style, hiding mutable states, a way to implement laziness, this book may be your first step in an adventure of functional programming in (wait for it!) JavaScript. You will be familiarized with UnderscoreJs functions as a tools in everyday-coding-life.

      Honestly, the only thing that bothered me in this book is the small emphasis of graphic representation in highlighting important terms.

      Besides, "Functional JavaScript: Introducing Functional Programming with Underscore.js" assure many hours spending in reading interesting code, especially if reader will spend some hours to analyze written code and test it in IDE. Surely it should bear fruits in developer's future coding sessions.

      So, if anyone is interested in JavaScript and want to learn about functional programming techniques, this book is a very good start and may change perspective of seeing this language.

      (1 of 1 customers found this review helpful)

       
      4.0

      Exploring FP with JavaScript

      By poseid

      from munich

      About Me Developer

      Pros

      • Accurate
      • Concise
      • Functional Programming
      • Javascript

      Cons

      • Too basic

      Best Uses

      • Expert
      • Intermediate

      Comments about oreilly Functional JavaScript:

      Structure and Interpretation of Computer Programs famously features LISP for teaching programming. Yet, JavaScript together with the Underscore library offers an interesting context for playing with concepts from FP too. No need to download yet another programming language, but you can get started with FP right away. Besides the great point of applying JS instead of Clojure or other FP languages, the book does a nice job on how functional abstractions.

      As with other books on FP too, I find it a bit hard to understand what concepts from FP should be applied in daily development practices. It might have been interesting to see how FP applies to type-checking or to better view rendering in visual programming. That is why I only give 4 stars out of 5.

      (2 of 2 customers found this review helpful)

       
      4.0

      Dig it!

      By Jerry

      from Chicago ex-pat

      About Me Developer

      Verified Buyer

      Pros

      • Helpful examples
      • Well-written

      Cons

        Best Uses

        • Intermediate
        • Novice

        Comments about oreilly Functional JavaScript:

        This book will scratch an itch if
        * You have an object-oriented approach to solving design problems and need a solid introduction to functional concepts
        * You use a framework, such as Backbone/Marionette, that already uses Underscore.js and want to make better use of a tool that's already in your tool chest
        * Want to negotiate with Javascript on its terms rather than trying to force it to exist in to a purely OO world

        This is definitely not a book you can skip around reading. Each chapter, and the code examples in them, build on functions created in previous chapters. Considering that the point of functional programming is to do that very thing, composing ever more complex functions from simpler constructs, the structure is a great example of dogfooding. However, if there is any negative, it's that you find yourself constantly flipping back to previous pages to remind yourself what the function mapcat (or partial1) does and how it works. But really, that is a small price to pay for having your mind blown by viewing the world through functional glasses.

        (4 of 4 customers found this review helpful)

         
        4.0

        Not as expected but still quite good

        By HTML Toronto

        from Toronto

        About Me Designer, Developer, Educator, Maker

        Verified Reviewer

        Pros

        • Accurate
        • Easy to understand
        • Helpful examples
        • Well-written

        Cons

        • Reliance On Underscorejs

        Best Uses

        • Novice
        • Student

        Comments about oreilly Functional JavaScript:

        The book comes off as a love letter to the underscore javascript library at first, even having Jeremy Ashkenas do a forward. While by no means do I think that it is a bad thing to use underscore.js as it provides a much needed extension to Javascript's base functionality, I was hoping for a bit more content on creating function based programming rather than examples of using underscore to extend methods. Even breaking down much of what underscore is and comparing it to native functions.

        After running through the book a few times, I have recommended it to people and have added it to my short list of books to suggest when asked.

        NOTE: This is a review copy of the book I had requested and was not purchased.

        (2 of 3 customers found this review helpful)

         
        4.0

        It's a knowledge enriching book

        By Ish Sookun

        from Mauritius

        About Me Developer, Sys Admin

        Pros

        • Helpful examples
        • Well-written

        Cons

          Best Uses

          • Expert
          • Intermediate
          • Student

          Comments about oreilly Functional JavaScript:

          This book isn't an introductory to JavaScript and the author makes it clear in the beginning. However, the bright side of the book is the availability of source codes on Github. It gives you freedom to play around while reading and thus enriching your knowledge and skills on JavaScript. For those who would like to know what to expect from the book I suggest you check the well-defined book roadmap.

          (3 of 3 customers found this review helpful)

           
          5.0

          JavaScript more functional

          By Przemysław

          from Kraków

          About Me Developer

          Verified Reviewer

          Pros

          • Accurate
          • Concise
          • Easy to understand
          • Helpful examples
          • Well-written

          Cons

            Best Uses

            • Expert
            • Intermediate

            Comments about oreilly Functional JavaScript:

            In introductory chapter author presents functional programming as an assembly line transforming data into final result. In consecutives chapters he shows how to build any particular piece of assembly line: first define some first-class functions, then understand variables scope and closures, then use higher-order functions and finally define function-building functions. It was valuable lesson for me to remind closures, think more about composing functions to solve problems. In chapter about recursion I learned about interesting concept called trampoline - it is a control structure which flattens out recursive calls.

            Book is well written with good sense of humour. There are many examples, author clearly explains them and his motivation why he tackled problem in specific way. Functional JavaScript is nice mindshift and exploration into functional world when reader can write software with elegant API using functional approach.

            (4 of 5 customers found this review helpful)

             
            5.0

            Perfect deep dive into functional JS

            By phollott

            from Vancouver Island, BC

            About Me Designer, Developer

            Verified Reviewer

            Pros

            • Accurate
            • Helpful examples
            • Well-written

            Cons

              Best Uses

              • Intermediate

              Comments about oreilly Functional JavaScript:

              I love this book.

              I work at a mid-size IT consulting company, and we are making the transition from Java and .NET based solutions using server-side technologies to more of a client-based approach. On a project basis, we will have some developers who are upgrading their skills from Java to JavaScript, developers who are learning libraries like JQuery, Underscore and Backbone, and developers who are shifting from these libraries to frameworks like Angular.

              For all of these developers, we have a need for coding best practices, and this is where reading a book like Functional JavaScript with Underscore really shines, because it shifts gears into a more academic approach to JavaScript, and it provides great examples of the right way to implement a design pattern in a largely framework agnostic way, since a lightweight approach to JavaScript augmentation is part of the design philosophy of Underscore.

              This is a great book for development managers who want to improve their ability to code review JavaScript code; for a better understanding of JavaScript patterns like MV*, Addy Osmani's book on Learning JavaScript Design Patterns is also highly recommended.

              (3 of 3 customers found this review helpful)

               
              5.0

              How Javascript Was Meant to Be Written

              By Carlo

              from Brooklyn, NY, USA

              About Me Developer, Maker

              Verified Reviewer

              Pros

              • Accurate
              • Concise
              • Easy to understand
              • Helpful examples
              • Well-written

              Cons

                Best Uses

                • Expert
                • Intermediate
                • Novice
                • Student

                Comments about oreilly Functional JavaScript:

                This book should be required reading for any and every javascript programmer. It's well-written, contains hundreds of useful examples, and breaks down very technical concepts of functional programming into easy to digest pieces. My favorite programming book of 2013 and the best book I've read on Javascript in a very long time.

                Displaying reviews 1-10

                Back to top

                Previous | Next »

                 
                Buy 2 Get 1 Free Free Shipping Guarantee
                Buying Options
                Immediate Access - Go Digital what's this?
                Ebook: $24.99
                Formats:  DAISY, ePub, Mobi, PDF
                Print & Ebook: $32.99
                Print: $29.99