All right guys. So this module is going to be all about Express. Now Express is a Node framework. 1
So do you remember in previous modules, we learned that we could add jQuery onto our Javascript to add 2
extra features and make it easier working with Javascript? 3
Well, Express does the same thing for Node. 4
It's a framework, or basically a bunch of code that somebody else wrote, that adds extra features and 5
helps to organize and structure your code, specifically for web applications built with Node. 6
Now in the last module we said that Node.js was made to basically liberate Javascript from the browser 7
and allow programmers to use Javascript to interact with the computer directly, 8
for example on a server. And that means it has a broad scope. 9
It's a low level technology that allows you to interact directly with the hardware of the computer. 10
Now that means that you can create desktop applications using Node. For example Atom, 11
what we've been using so far to edit and write our code, is actually built on Electron which is built 12
on Node. 13
So the scope of Node.js is really really broad. 14
Now Express does something really specific. Now an example of this might be that you could own a single 15
Phillips screwdriver and you can screw all the screws you want using it, right? Any type of screw. 16
So that's Node. 17
It lets you interact with the computer any way you like. 18
But, as we know, if you've done a lot of DIY work, screwing in screws manually using a Phillips screwdriver 19
can get pretty tiring, 20
and you're really at risk of repetitive strain injury, especially if you have a lot of Ikea furniture. 21
So that means in certain cases, for specialized uses, 22
for example if you're doing a lot of DIY, then you might need a motorized screwdriver. 23
And that's basically Express. It was built to make you write less repetitive code when you're building 24
web applications, and it's made specifically for web developers. 25
So sometimes using Express versus using Node straight out of the box, you're saving yourself 5 to 26
10 times the amount of code that you have to write, 27
and therefore a lot of time as well. And we programmers hate repetition, 28
so Express is really really popular. 29
In fact, if you go onto npm.com and you scroll down, you'll see that the most depended upon packages 30
include Express. And if you have a look at the State of Javascript, which is this annual survey for Javascript 31
programmers, you can see that when they surveyed these people on the back end frameworks, even they talk about 32
it. 33
People really depend on Express. 34
And if you have a look at this graph, you can see that ‘I've used it before, and I would use it again’ is 35
massive for Express, whereas it can't really be said for the other sort of frameworks that help you to 36
do the same thing. 37
So it's a really really big deal in the Node web development community, and this is what we're going 38
to be learning in this module. 39
Now let's go ahead and build a real server using Node and Express to see how we can get our server to 40
start running code on the server side and start doing a lot of the heavy lifting, 41
so we learn how to build a proper backend for our web sites. 42
So once you’re ready, head over to the next lesson.