Learn to Write Functional Javascript
5.0 (1 rating)
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.
45 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Learn to Write Functional Javascript to your Wishlist.

Add to Wishlist

Learn to Write Functional Javascript

Learn the concepts required to be a functional programmer and to write functional web-apps using modern JavaScript
New
5.0 (1 rating)
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.
45 students enrolled
Created by Packt Publishing
Last updated 9/2017
English
Current price: $10 Original price: $125 Discount: 92% off
5 hours left at this price!
30-Day Money-Back Guarantee
Includes:
  • 4 hours on-demand video
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Understand pure functions and how to refactor impure functions
  • Learn why grouping pure functions can simplify an apps mental model
  • See how impurities break that modal and how to isolate them
  • Create reusable functions by writing higher-order functions
  • Write more declarative and expressive code without loops
  • Master map, filter and reduce, three very powerful functional utilities
  • Create your own higher-order functions to replace native JS Array methods
  • Learn about partial application and create your own curry implementation
  • Learn about immutability, persistent data structures and their pros and cons
  • Work with nested immutable data with lenses using Ramda
  • Write pure functions to model the DOM and then drop JSX on top of it
  • Replace our DOM Rendering function with virtual-dom
  • Build JSX & Virtual-DOM into functional ES2017 apps without using React
View Curriculum
Requirements
  • They assume the viewer understands JavaScript, has written some ES6, can clone a git repo and smiles at least once per day.
Description

Functional programming has been around for decades, but it only overtook the JavaScript community in recent years. The impact is undeniable and yet with all the material available it still isn’t always easy to grok.

This course delivers the building blocks of the functional paradigm in a way that makes sense to JavaScript developers. Animated visualizations help explain difficult concepts such as higher-order functions, lenses and persistent data, partial application and currying and then write code so you understand concepts before trying to apply the knowledge them.

Many functional programming videos leave students feeling as if they just learned something that can’t quite be useful, but in Foundations of Functional Programming you’ll build stateless UI components and implement your own higher-order functions that integrate them with JSX and virtual-dom using no frameworks, just functional programming and modern JavaScript.

About The Author

Michael Rosata has been a professional Javascript Developer for 4 years now, he started building web pages. He started building web pages, widges and then Web Apps. He has worked on a couple of large webapps using Javascript as well as Apache cordova. He loves the javascript ecosystem and the web community and adopted Functional Programming as his passion. He is the founder of MA Web Dev Meetup group and they are currently building a web app for non profits. 

Who is the target audience?
  • This course was designed for JavaScript developers who want to learn functional programming concepts and how to apply them in modern web-apps.
Students Who Viewed This Course Also Viewed
Curriculum For This Course
17 Lectures
03:52:18
+
Understanding Foundations of Functional Programming
4 Lectures 49:28

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
+
Abstracting Language Constructs with Higher-Order Functions
5 Lectures 01:07:14

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.

Promoting Reusability with Higher-Order Functions
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

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 Filter
13:38

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
+
Partial Application and Currying
4 Lectures 50:13

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
+
Working with Data and Stateless Components
4 Lectures 01:05:23

When objects in JavaScript are changed, the effects are observable to any variable pointing to that resource. It only takes a single change to break an app in unpredictable ways. Immutable data disallows modifications after initialization which makes data deterministic like pure functions.

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 HTML to the DOM is an impure operation. We don’t want to couple our data too closely to the DOM. Stateless components are pure, they take data as input and output a JavaScript representation of that components DOM structure. They don’t change the DOM or mutate any data.

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
About the Instructor
Packt Publishing
3.9 Average rating
8,138 Reviews
58,578 Students
686 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.