Functional JavaScript - Michael Fogus

Functional JavaScript

Introducing Functional Programming with Underscore.js

(Autor)

Buch | Softcover
260 Seiten
2013
O'Reilly Media, Inc, USA (Verlag)
978-1-4493-6072-6 (ISBN)
26,90 inkl. MwSt
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

Michael Fogus is software developer with experience in distributed simulation, machine vision, and expert systems construction. He's actively involved in the Clojure and Scala communities.

Chapter 1 Introducing Functional JavaScript
The Case for JavaScript
Getting Started with Functional Programming
The Case for Underscore
Summary
Chapter 2 First-Class Functions and Applicative Programming
Functions as First-Class Things
Applicative Programming
Data Thinking
Summary
Chapter 3 Variable Scope and Closures
Global Scope
Lexical Scope
Dynamic Scope
Function Scope
Closures
Summary
Chapter 4 Higher-Order Functions
Functions That Take Other Functions
Functions That Return Other Functions
Putting It All Together: Object Validators
Summary
Chapter 5 Function-Building Functions
The Essence of Functional Composition
Currying
Partial Application
Stitching Functions End-to-End with Compose
Summary
Chapter 6 Recursion
Self-Absorbed Functions (Functions That Call Themselves)
Codependent Functions (Functions Calling Other Functions That Call Back)
Too Much Recursion!
Recursion Is a Low-Level Operation
Summary
Chapter 7 Purity, Immutability, and Policies for Change
Purity
Immutability
Policies for Controlling Change
Summary
Chapter 8 Flow-Based Programming
Chaining
Pipelining
Data Flow versus Control Flow
Summary
Chapter 9 Programming Without Class
Data Orientation
Mixins
}).call("Finis");

Appendix Functional JavaScript in the Wild
Functional Libraries for JavaScript
Functional Programming Languages Targeting JavaScript
Appendix Annotated Bibliography
Papers/Books/Blog Posts/Talks
Presentations
Blog Posts
Journal Articles
Colophon

»Michael Fogus has written a detailed, pragmatic introduction to functional programming in JavaScript. The concepts are illustrated by practical examples, many using the popular Underscore.js toolkit. Together, the examples provide an excellent vision for concise, elegant, and robust JavaScript development.« Dean Wampler, Ph.D.

»An alternate title could easily have been ›JavaScript: The Best Parts‹. Applying these functional concepts to JavaScript will change how you approach problems withe the language.« Rob Friesel, Sr. User Interface Developer, Dealer.com

Erscheint lt. Verlag 16.7.2013
Zusatzinfo black & white illustrations, black & white line drawings, figures
Verlagsort Sebastopol
Sprache englisch
Maße 178 x 233 mm
Gewicht 413 g
Einbandart kartoniert
Themenwelt Informatik Web / Internet JavaScript
ISBN-10 1-4493-6072-6 / 1449360726
ISBN-13 978-1-4493-6072-6 / 9781449360726
Zustand Neuware
Haben Sie eine Frage zum Produkt?
Mehr entdecken
aus dem Bereich
Web-Programmierung leicht gemacht

von Thomas Theis

Buch | Softcover (2024)
Rheinwerk (Verlag)
29,90