Mastering Clean Code in JavaScript

Mastering Clean Code in JavaScript

English | MP4 | AVC 1920×1080 | AAC 48KHz 2ch | 4h 41m | 1.07 GB

Learning the JavaScript framework is good and cleaner JavaScript is even better

Alongside HTML and CSS, JavaScript is one of the three core technologies of World Wide Web content production. You can write terrible code in any language, but if you wanted to try to write terrible code that works, JavaScript would be your language of choice.

In this course, you will learn various concepts and techniques, essential principles, patterns, and practices for writing clean code in JavaScript. You will be introduced to some general guidelines on how to better structure your JavaScript code. You will then learn about clean code best practices while working with variables, functions objects, and the latest ES6 classes. Next, you will discover functional programming, how to write pure functions, and how to use built-in functional methods. You will then move on to modular JavaScript and explore the various ways you can structure your modules. After that, you will master various design patterns and programming principles. Unit testing is very important and you will learn to do this with Jasmine and Karma, to make handling errors easy.

By the end of the course, you will have learned to learn clean coding with functional programming, explored various modules in JavaScript, and designed patterns and principles. Overall you will learn to write better code with improved readability.

The course will follow an example-based approach to dealing with the most common developer mistakes that result in bad code. The course begins with tips on how to better structure and present your code. Moving on, the course presents functional programming in JavaScript and with simple and comprehensive examples and explains why the functional approach is worth your time and effort. Later in the course, you will get to work with the more traditional object-oriented part of JavaScript, finishing with best practices in testing and error handling as those areas of development can greatly affect code quality.

What You Will Learn

  • Structure better code in modules with ease
  • Write pure functions, avoid side-effects, and go functional
  • Explore design patterns and practices and how to use them
  • Get familiar with unit testing
  • Proper error handling in JavaScript
Table of Contents

01 The Course Overview
02 Clean Variables
03 Lexical Scope and let
04 Clean Functions
05 All about this
06 Clean Objects and Classes
07 Using a linter
08 Introduction to Functional Programming
09 Writing a Pure Function
10 Object.assign and the Spread Operator
11 Forget the Loop with Map and ForEach
12 Reducing an Array
13 Filtering an Array
14 Why Modules
15 The Module Pattern
16 The Node Package Manager
17 CommonJS
18 AMD
19 ES6 Modules
20 Tree-Shaking with Webpack
21 The Single Responsibility Principle
22 The Open Closed Principle
23 The Liskov Substitution Principle
24 The Interface Segregation Principle
25 The Dependency Inversion Principle
26 The Singleton Pattern
27 The Observer Pattern
28 The Strategy Pattern
29 Introduction to Unit Testing
30 Installing and Using Jasmine
31 Test Driven Development
32 Making the Tests Pass
33 Error Handling Best Practices
34 Catching Errors from Promises
35 An Error Handler with Strategy
36 Logging