Prerequisites
I assume that you have some basic understanding of the following topics. A few of them are mandatory, and the rest of them are optional. But I will recommend you to learn all the essential topics before you start learning express. 😵💫
Don't spend too much time on learning these things, just basics would work for now. Once you know the basics of these things, then dive into learning express js. The sooner you start learning express, the better (of course after grasping the basics of JS)
JavaScript
If you are a frontend developer looking to master some backend skills then you don't have to spend a huge amount of time learning JavaScript before getting started with building ExpressJS(Node) applications. But in case you are a complete beginner who's looking to master Express in the minimum possible time then you must learn the following concepts before you deep dive into the Learning Express:
There are the minimum things you must know before you start learning express. If you know these things then you are good to go and keep learning JavaScript along.
I wrote a complete series of documentation on JavaScript, where I covered almost everything about JavaScript, and added more things to it, please have a look. My suggestion is to complete the basics section, then start learning express, and along with learning express, you can also learn advance part simultaneously.
Asynchronous JavaScript
Asynchronous JavaScript is a fairly advanced topic. It's a code that does not execute in order, it executes in a non-blocking way, after some time. For example, in the backend, I want to get data from the database, and if I execute a query, it will not execute, and return data right away, it will rather take some time depending upon the complexity of the query, type of database, size of database, etc. The bottom line is the response from the database will take some time. This is asynchronous code.
Async code is used to perform long-running tasks without blocking the main thread.
In ExpressJS you will be handling a lot of asynchronous programming and for that, the following concepts are recommended to learn:
- Callback
- Promises
- Async Await
- Timers - optional
- Closures - optional
- The Event Loop - optional
NPM
Node Package Manager is the world's largest Software Registry with over 800,000 code packages. Using NPM the right way can help a lot as managing packages becomes pretty handy with NPM while we develop applications that require a number of dependencies.
NPM consists of three distinct components:
- The Command Line Interface (CLI): It runs in the machine's terminal environment and how most of the developers interact with NPM
- The Registry: A large public database of JavaScript software and meta-information.
- The Website: You can discover new packages, and manage other aspects of your npm experience.
NPM is used for managing multiple versions of code and code dependencies, running packages without downloading them (using npx), and many more.
NodeJS (JavaScript) Architecture
It's not necessary to know about NodeJS architecture, but if you know about it, it will be helpful for you. It will give you a better understanding of how NodeJS works.
- Based on the single-threaded event loop model architecture which means client requests will be executed by a single thread in NodeJS.
- The event-driven nature of NodeJS allows you to handle multiple client requests concurrently.
Read this doc to know more about it.
General Development Skills
These are not necessary, but if you have these skills, they will be helpful for you. You can learn these things along with learning Express.
- Learn GIT, create a few repositories on GitHub, and share your code with other people. I also wrote complete documentation about GIT
tip
This is very extensive documentation, it will take some time to read it, but it will be worth it, I reckon. If you are a beginner, then you can start with basics, and then move to advance.
- Don't be afraid of using Google, Power Searching with Google
- Read a few books and docs about data structures and algorithms (DSA) and try to implement them in JavaScript.
- Clean code is a must for any developer. It's not just about writing code that works, it's about writing code that is easy to read and understand.
- Terminal Usage (Linux, Mac, Windows)
- Design Patterns
If you don't know about any of the mentioned things, no worries, you can learn along. The only thing which is super necessary is the Basics of JavaScript.
Summary
In this section, we learned about the prerequisites for learning express. We learned that we must know the basics of JavaScript, and a few advanced concepts of JavaScript. We also learned that we must know about NPM, and NodeJS architecture. We also learned that we must have some general development skills. In the next section, we will learn about the installation of express.