Learning Path: Learn Functional Programming with JavaScript
3.6 (5 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
30 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Learning Path: Learn Functional Programming with JavaScript to your Wishlist.

Add to Wishlist

Learning Path: Learn Functional Programming with JavaScript

Become a functional programmer by building and testing web applications
3.6 (5 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
30 students enrolled
Created by Packt Publishing
Last updated 6/2017
English
Current price: $10 Original price: $200 Discount: 95% off
5 hours left at this price!
30-Day Money-Back Guarantee
Includes:
  • 6.5 hours on-demand video
  • 1 Supplemental Resource
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I 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
View Curriculum
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 is the target audience?
  • This Video Learning Path is for those who are familiar with JavaScript basics and are looking to implement functional programming with JavaScript.
Students Who Viewed This Course Also Viewed
Curriculum For This Course
35 Lectures
06:24:57
+
Learn to Write Functional Javascript
17 Lectures 03:48:50

This video provides an overview of the entire course.

Preview 05:53

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.

The Unbreakable Function
18:07

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.

Thinking of Functions in Terms of Their Return Values
12:32

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.

How to Identify and Encapsulate Impurities within Our Programs
12:56

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.

Preview 18:51

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.

Replacing Loops with Higher-Order Functions
08:18

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.

A Better Way to Map and Filter
10:10

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.

Reasoning with Reduce
11:46

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

Rendering UI Components with Higher-Order Functions
14:41

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.

Preview 10:27

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.

Improving Higher-Order Functions with Partial Application
09:14

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.

Writing a Utility to Curry Functions
14:44

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.

Combining Map, Filter, and Reduce with Curried Functions
15:48

Understanding Mutable and Immutable Data
16:24

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.

Simplifying Immutability Using Lenses
13:52

Rendering Our Data into the DOM
14:57

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.

Using JSX and Virtual-DOM for Readability and Performance
20:10

Test Your Knowledge
8 questions
+
Implementing and Testing Applications using Functional JavaScript
18 Lectures 02:36:07

This video gives an overview of entire course.

Preview 04:07

Our objective is to understand what category theory is, in order to define functors. Knowing these terms will give you a deeper understanding of the concepts underlying the map function in functional programming.

Functors in JavaScript
08:43

Now that you have a basic idea about functors, we can move on to understand monads in practice. We will not focus on the theoretical details that much. You will rather understand the basics in practice, so that you will be able to approach more complex theoretical articles.

Monads
07:05

We will start with the definition of a problem in JavaScript called the pyramid of doom, also known as the callback hell through some examples, and mention ways to get out of it.

Escaping the Pyramid of Doom
09:50

We will introduce ES6 promises to handle asynchronous code in JavaScript. Beyond learning the ins and outs of promises, we will also demolish the pyramid of doom.

ES6 Promises and Functional Programming
14:10

This video will contain a simplified introduction to generator functions in order to use it for the purpose of handling asynchronous code.

Asynchronous Functional Programming with ES6 Generator Functions
10:57

Promises and generator functions have been sufficient for asynchronous programming, but the code was far too verbose. ES2017 async-await gives you all the tools you need to elegantly and compactly model asynchronous problems in practice in JavaScript.

Functional Programming with Async-Await
07:16

Eager evaluation often comes at a price. Therefore, it is essential to understand an alternative: lazy evaluation, including its benefits and drawbacks. As one of the drawbacks of lazy evaluation is the cost of retrieving the same elements multiple times, youwill learn how to combat this drawback with memoization.

What Is Lazy Evaluation?
10:29

You will learn how to implement lazy evaluation with generator functions. We will implement a lazy filter function, and then we will cover a couple of examples. You will learn how to handle infinite sequences, and how to retrieve multiple elements of an infinite sequence using the lazy take function.

Using ES6 Generator Functions for Evaluating Lazy Sequences
09:21

I will give you a short overview on what's awaiting you. This is a long and practical section, so I highly recommend preparing for the challenge by following the advice in this video. This section will also act as a revision for volumes 1 and 2. I will highlight the sections and videos you will need in case you get stuck with a concept.

Introduction
04:41

Let me introduce you to the wireframe of the app we will build in this section. The application itself is called the Weather App.

Weather App
04:22

This video will walk you through the ins and outs of setting up an application including automated testing.

Application Setup
06:05

You will learn how to use test driven development to write a functional utility library guided by tests. You will learn the basics of writing automated testsand bottom-up software design in order to construct some utility belt libraries for the purpose of building the weather app.

Bottom-Up Design Using Test Driven Development
12:31

We will continue practicing bottom-up design and test driven development to build a parser utility. The parser utility will be used later to render the DOM nodes of the application.

Bottom-Up Design and TDD (Continued) –Parsing the Response
06:41

We will solve the problem of handling timezones in our application by installing moment.js and using the Google timezone API. We will then finish both of our utility libraries exercising test driven development.

Handling Timezones
15:19

After a short introduction on how to test asynchronous code and API interactions, we will create a city weather form and implement a click event to fire the API. You will learn how to query sequential and parallel API calls using async-await. We will also handle the response to prepare our data for rendering.

Getting Weather Data with Promises and Async-Await
11:52

We connect top-down and bottom-up code by rendering weather data on screen. Rendering is done using a presenter module, encapsulating a DOM insertion, and some event handlers. We conclude the implementation of the weather app with some cleanup.

Rendering the Weather App
06:50

The last video of this course summarizes this volume. We will recap the main topics you learned, and you will also receive some pointers on topics worth referring to for the purpose of mastering functional programming in JavaScript.

Course Summary and Next Steps
05:48

Test Your Knowledge
5 questions
About the Instructor
Packt Publishing
3.9 Average rating
7,196 Reviews
51,418 Students
616 Courses
Tech Knowledge in Motion

Packt has been committed to developer learning since 2004. A lot has changed in software since then - but Packt has remained responsive to these changes, continuing to look forward at the trends and tools defining the way we work and live. And how to put them to work.

With an extensive library of content - more than 4000 books and video courses -Packt's mission is to help developers stay relevant in a rapidly changing world. From new web frameworks and programming languages, to cutting edge data analytics, and DevOps, Packt takes software professionals in every field to what's important to them now.

From skills that will help you to develop and future proof your career to immediate solutions to every day tech challenges, Packt is a go-to resource to make you a better, smarter developer.

Packt Udemy courses continue this tradition, bringing you comprehensive yet concise video courses straight from the experts.