Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Learning Path: Learn Functional Programming with JavaScript
Rating: 3.3 out of 5(16 ratings)
160 students

Learning Path: Learn Functional Programming with JavaScript

Become a functional programmer by building and testing web applications
Last updated 6/2017
English

What you'll learn

  • Understand pure functions and how to refactor impure functions
  • Work with nested immutable data with lenses using Ramda
  • Write pure functions to model the DOM and then drop JSX on top of it
  • Build JSX & Virtual DOM into functional ES2017 apps without using React
  • See how to rewrite nested asynchronous callbacks with generator functions in a linear fashion
  • Understand how to model and use infinite sequences with lazy evaluation
  • Unit test your functional code with Mocha and Chai using test-driven development
  • Understand the theoretical background of wrapped sets in jQuery, the map function, and flatMap

Course content

2 sections35 lectures6h 24m total length
  • The Course Overview5:53

    This video provides an overview of the entire course.

  • The Unbreakable Function18:07

    JavaScript has traditionally been taught by the "Imperative or Procedural Programming" paradigms where functions ("procedures") perform tasks and modify a shared state. This can cause unpredictable behavior and hard to track bugs, especially as programs grow. Pure functions alleviate many problems of traditional programming paradigms and form the foundations of Functional Programming.

  • Thinking of Functions in Terms of Their Return Values12:32

    Pure functions, like mathematical functions, always return the same value when given the same inputs, so the two are interchangeable. Functional Programming is expressive, we think less about what's happening inside functions and focus more on relations between function inputs and their outputs.

  • How to Identify and Encapsulate Impurities within Our Programs12:56

    Every program has impure functions; they are the only ticket in town for reading, writing and displaying information. In order to protect the benefits, we've gained by writing pure functions; we'll begin looking at how we can isolate impure code while still using it to feed us information.

  • Promoting Reusability with Higher-Order Functions18:51

    Pure functions seem to restrict what we’re able to do in our apps, higher-order functions open our eyes to new ways we can write and use functions. They give us powerful tools and reusable utilities.

  • Replacing Loops with Higher-Order Functions8:18

    There are constructs in our programs we have grown accustom to always using, loops are one of these constructs. We can stop writing loops and instead use higher-order functions. This will make our code more readable, expressive and open our thinking to new ways of using higher-order functions.

  • A Better Way to Map and Filter10:10

    JavaScript added the higher-order map and filter methods to Arrays in ES5.1 but they don’t work in the way we as functional programmers need. We can make our own implementations that will certainly prove to be more and more useful the further we get into functional programming.

  • Reasoning with Reduce11:46

    Reduce is another very popular higher-order function used for working over collections of data. It can be a little more difficult to reason about than map and filter, however it can have a lot more uses than map and filter as well.

  • Rendering UI Components with Higher-Order Functions14:41

    Higher-order functions did some neat tricks for us working with Arrays, and we aren’t close to finish. Rendering to the DOM can get a lift from higher-order components by allowing us to perform generalized work over arbitrary components

  • What Partial Application and Curry Mean?10:27

    As programs grow, creating higher-order nested functions won’t be as flexible as we once thought. There is a better way to pass a couple input values into a function and still get as return a higher-order function with those values in a closure without wiring nests of functions like Russian dolls.

  • Improving Higher-Order Functions with Partial Application9:14

    Now that we understand what partial application and currying are, we’ll want to see how we can use some common partial application utilities to write higher-order functions without writing entire new functions or refactoring old ones. We’ll see how a few different utilities operate.

  • Writing a Utility to Curry Functions14:44

    Partial Application and Currying can take time to adjust to but they become tools we don’t want to live without. It’s nice to be able to quickly write partial application utilities so we can add them to any project. Writing utilities gives the added benefit of gaining stronger understanding.

  • Combining Map, Filter, and Reduce with Curried Functions15:48

    It’s time again to combine the techniques we’ve been learning and see how they work well with each other. We should be able to use a lot more functions with our higher-order functions map, filter, and reduce as well as instantly improve any function that works over arrays with the “curry” utility.

  • Understanding Mutable and Immutable Data16:24
  • Simplifying Immutability Using Lenses13:52

    Making objects immutable could add complexity to an application. Persistent data structures might be complicated to add into a project and many time might not even be needed. Lenses can simplify working with data and make adding new data structures into a project easier.

  • Rendering Our Data into the DOM14:57
  • Using JSX and Virtual-DOM for Readability and Performance20:10

    A function to update the entire DOM at once is more deterministic, but less performant. Virtual-DOM keeps a representation of the DOM in JavaScript so it can figure out which changes to make on updates and only render parts of the DOM that need to change rather than overwriting everything.

  • Test Your Knowledge

Requirements

  • You should have basic JavaScript knowledge.
  • You should have Node installed on your system (version>=6.9.0)

Description

Functional programming has been around for decades, but it only got adopted by the JavaScript community in recent years. The benefits of using functions as the building blocks of a language are manifold, and when it comes to JavaScript, the advantages are only exponential.

This Video Learning Path delivers the building blocks of the functional paradigm in a way that makes sense to JavaScript developers. We’ll look at animated visualizations that’ll help explain difficult concepts such as higher-order functions, lenses and persistent data, partial application, currying, ES6, asynchronous code with promises, and ES2017 async/await.

While we anchor these techniques into your mind with the practical usage, you will also learn about techniques to write maintainable software, test-driven development, top-down design, and bottom-up design. Finally, we will use Mocha and Chai to write unit tests for the functional part of the applications.

By the end of this Video Learning Path, you will get a hands-on functional application development experience.

For this course, we have combined the best works of this esteemed authors:

Michael Rosata has been a professional JavaScript Developer for 4 years now. He started building web pages. He has worked on a couple of large web apps using JavaScript as well as Apache Cordova. He loves the JavaScript ecosystem and the web community and adopted functional programming as his passion.

Zsolt Nagy is a web development team lead, mentor, and software engineer living in Berlin, Germany. As a software engineer, he continuously challenges himself to stick to the highest possible standards when improving his own knowledge. The best way of learning is to create a meaningful product on the way.


Who this course is for:

  • This Video Learning Path is for those who are familiar with JavaScript basics and are looking to implement functional programming with JavaScript.