Express js
Express is a Node framework.
We can add jQuery onto our Javascript to add extra features and make it easier to work with Javascript.
Well, Express does the same thing for Node.
It’s a framework, or basically a bunch of code that somebody else wrote, that adds extra features and helps to organize and structure your code, specifically for web applications built with Node.
Node.js was made to basically liberate Javascript from the browser and allow programmers to use Javascript to interact with the computer directly, for example on a server. And that means it has a broad scope. It’s a low-level technology that allows you to interact directly with the hardware of the computer.
Now that means that you can create desktop applications using Node. For example, Atom, what we’ve been using so far to edit and write our code, is actually built on Electron which is built on Node.
So the scope of Node.js is really really broad.
Now Express does something really specific. Now an example of this might be that you could own a single Phillips screwdriver and you can screw all the screws you want using it, right? Any type of screw.
So that’s Node.
It lets you interact with the computer in anyway you like.
But, as we know, if you’ve done a lot of DIY work, screwing in screws manually using a Phillips screwdriver can get pretty tiring, and you’re really at risk of repetitive strain injury, especially if you have a lot of Ikea furniture.
So that means in certain cases, for specialized uses, for example, if you’re doing a lot of DIY, then you might need a motorized screwdriver.
And that’s basically Express. It was built to make you write less repetitive code when you’re building web applications, and it’s made specifically for web developers.
So sometimes using Express versus using Node straight out of the box, you’re saving yourself 5 to 10 times the amount of code that you have to write, and therefore a lot of time as well. And we programmers hate repetition,
so Express is really really popular.
In fact, if you go onto npm.com and you scroll down, you’ll see that the most depended upon packages include Express. And if you have a look at the State of Javascript, which is this annual survey for Javascript programmers, you can see that when they surveyed these people on the back end frameworks, even they talk about it.
People really depend on Express.
So it’s a really really big deal in the Node web development community.