
This video provides an overview of the entire course.
We have to begin the journey to cleaner code from somewhere and variables is the perfect place to start.
Developers often have mistaken ideas surrounding lexical scope.
Functions form the majority of a developer’s JavaScript code. Functions need to be as clean as possible.
The this keyword is a common source of bugs for developers who often produce bad code because of it.
The viewer would benefit from a few tips on how to more effectively work with objects and ES6 classes.
JavaScript code can often become chaotic, especially in big projects.
Pure functions are fundamental to functional programming.
ES6 came with some really nice features that help you transform your code with functional programming.
Using a typical for loop is a thing of the past in JavaScript.
JavaScript has evolved massively during the last decade and modules have been an integral part to this evolution.
All module definitions like CommonJS and AMD have their roots in the module pattern.
Nearly all modern JavaScript applications make use of npm. There cannot be clean code without npm.
AMD came as a solution to the synchronous nature of CommonJS not being optimal for a browser environment.
ES6 modules are the solution to multiple problems and come time they will be the norm in most JavaScript projects.
ES6 modules in combination with webpack 3 and the uglifyJS plugin offer the ability to remove unused code from the final bundle.
Classes should be designed to do one thing. This is not often the case in JavaScript applications.
JavaScript functions, modules and classes should be closed to modification but open to extension.
The Liskov substitution principle is often overlooked in JavaScript apps.
An interface should not force a class to implement methods and functionality that it does not need.
Dependency Injection can really transform your applications to something great.
Beginning the section, the viewer needs to be prepared for the heavy stuff that will follow regarding unit testing.
To make the most out of unit tests you need to incorporate them into your workflow.
After the red part of TDD you are ready to implement the functionality until all tests are passed.
Promise rejections are much different than simple errors.
The error handler we built in a previous section was a nice start.
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.
About the Author :
Dimitris Loukas is a software engineer currently writing Single Page Applications and using the latest version of JavaScript with Aurelia and Angular for a trading software firm. He is also finishing his Computer Science studies at the University of Athens. He has worked for two start-ups in the past, is active in the open source community, and loves taking up small side projects. He has mastered Angular, Aurelia, and VueJS and is now interested in entering the ReactJS world. He is fascinated by modern JavaScript and where the web is going.