Implementing and Testing Applications using Functional JS
0.0 (0 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.
8 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Implementing and Testing Applications using Functional JS to your Wishlist.

Add to Wishlist

Implementing and Testing Applications using Functional JS

See how to build and test your application using functional programming
0.0 (0 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.
8 students enrolled
Created by Packt Publishing
Last updated 7/2017
Current price: $10 Original price: $125 Discount: 92% off
5 hours left at this price!
30-Day Money-Back Guarantee
  • 2.5 hours on-demand video
  • 1 Supplemental Resource
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • See how to rewrite nested asynchronous callbacks with generator functions in a linear fashion
  • Simplify your linearized asynchronous code with async functions and the await operator
  • Optimize the performance of your application with lazy evaluation and memoization
  • Understand how to model and use infinite sequences with lazy evaluation
  • Understand theoretical functional programming concepts in practice to understand in-depth theory articles
  • Unit test your functional code with Mocha and Chai using test-driven development
  • Find out how to use top-down and bottom-up design
  • Use a third-party library that simplifies communication with a server via an API
  • See how to set up your development environment, including automated testing
  • Use several refactoring steps to get an idea of how to make your code more maintainable
  • Understand the theoretical background of wrapped sets in jQuery, the map function, and flatMap
View Curriculum
  • You should already have a basic understanding of the concepts presented in the previous volume of this course: Deep Dive into Functional JavaScript.

You will get an in-depth overview of how to handle asynchronous code with promises, generator functions, and the ES2017 async-await construct. These tools will help you set up communication with a server via an API later, when implementing a web application.

Lazy evaluation will allow you to optimize performance of retrieving a collection of data, where you may need to process and retrieve just a fraction of the available elements. This powerful technique will not only allow you to write performant code, but it also makes it possible for you to handle infinite sequences.

We will also implement a web application together, demonstrating the practical usage of most of the features you learned in this course, and in the previous volume of this course, Deep Dive into Functional JavaScript. You will see higher order functions, currying, partial evaluation, recursion, ES6, asynchronous code with promises and ES2017 async-await, and many more language construct and functional programming ideas in practice. While we anchor these techniques into your mind with the repeated practical usage, you will also learn about techniques to write maintainable software: test driven development, top-down design, and bottom-up design. We will use Mocha and ChaiJs to write unit tests for the functional part of the application.

About the Author

Zsolt Nagy is a web development team lead, mentor, and software engineer living in Berlin, Germany. As a software engineer, Zsolt 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. Until you reach this state, the second best way of learning is to share with others what you learned and how you structure your thoughts.

Zsolt is an author of the book and video course ES6 in Practice, introducing you to all meaningful features of ES6. He is also an author of the book The Developer’s Edge – How to Double Your Career Speed with Soft-Skills.

Who is the target audience?
  • This course is geared toward software developers who would like to improve their skills and expertise by sticking to the highest quality standards when it comes to writing code.
Students Who Viewed This Course Also Viewed
Curriculum For This Course
18 Lectures
Bridging Functional Programming Theory and Practice
3 Lectures 19:55

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

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.

Asynchronous Code and Promises in Depth
4 Lectures 42:13

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.

Preview 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

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

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
Lazy Evaluation
2 Lectures 19:50

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.

Preview 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
Implementing a Web Application Using Functional Programming
9 Lectures 01:14:09

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.

Preview 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

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

Application Setup

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

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

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

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

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

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
About the Instructor
Packt Publishing
3.9 Average rating
8,175 Reviews
58,800 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.