Oreilly - Mastering Clean Code in JavaScript
by Dimitris Loukas | Publisher: Packt Publishing | Release Date: February 2018 | ISBN: 9781788999588
Learning a JavaScript framework is good and cleaner JavaScript is even betterAbout This VideoLearn to write better code with JavaScriptLeverage the power of functional programmingMaster JavaScript design patterns and best practicesIn DetailAlongside 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.
- Chapter 1 : Clean Code with JavaScript
- The Course Overview 00:03:07
- Clean Variables 00:11:10
- Lexical Scope and let 00:07:17
- Clean Functions 00:15:25
- All about this 00:07:41
- Clean Objects and Classes 00:10:36
- Using a linter 00:08:46
- Chapter 2 : Clean Code with Functional Programming
- Introduction to Functional Programming 00:04:50
- Writing a Pure Function 00:04:30
- Object.assign and the Spread Operator 00:06:33
- Forget the Loop with Map and ForEach 00:06:05
- Reducing an Array 00:05:59
- Filtering an Array 00:03:41
- Chapter 3 : Modules in JavaScript
- Why Modules 00:06:22
- The Module Pattern 00:07:08
- The Node Package Manager 00:05:31
- CommonJS 00:04:59
- AMD 00:07:23
- ES6 Modules 00:05:40
- Tree-Shaking with Webpack 00:07:14
- Chapter 4 : Design Patterns and Principles
- The Single Responsibility Principle 00:13:38
- The Open/Closed Principle 00:09:34
- The Liskov Substitution Principle 00:05:30
- The Interface Segregation Principle 00:07:51
- The Dependency Inversion Principle 00:10:49
- The Singleton Pattern 00:11:23
- The Observer Pattern 00:11:26
- The Strategy Pattern 00:09:52
- Chapter 5 : Testing
- Introduction to Unit Testing 00:06:29
- Installing and Using Jasmine 00:10:55
- Test Driven Development 00:12:44
- Making the Tests Pass 00:05:56
- Chapter 6 : Error Handling
- Error Handling Best Practices 00:07:19
- Catching Errors from Promises 00:05:47
- An Error Handler with Strategy 00:07:12
- Logging 00:05:09