Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
Hey, guys.
In this lesson, we're going to be learning all about the express framework, the framework that's built
on top of Node that's going to help us create our backends with ease.
Now, even when we're looking at the entire world of frameworks, Express comes ranking pretty high
amongst the professional developers.
And so we're going to see what exactly this framework is and why it's loved and used by so many developers.
Previously, I mentioned that there are many languages that you can use on the back end, and these
are the programming languages.
But in addition to languages, there are also a bunch of frameworks that you can choose.
Now I mentioned that the framework that uses JavaScript is node, but strictly speaking, Node is actually
not a framework.
Instead it's a runtime environment.
Now we mentioned previously that what a runtime environment means is it allows us to run JavaScript
on the computer.
So Node is what enables us to use JavaScript on a computer and not just limited to within the browser.
Now express, on the other hand, is actually a JavaScript framework that allows us to create backends
for our websites and with the powers of Node and Express combined is how most professional developers
build their website backends.
Why do we need express anyways?
Because Node is too powerful and all encompassing.
You can use Node to do a lot of things because all it is is it allows us to run JavaScript on any computer
and this means that it can be used to do many things.
And indeed, yes, it is mostly used for web development to create the back end for our websites.
But in addition, you can also use Node to maybe program your Iot device, your Internet of Things device.
Maybe you want a smart toaster that tweets at you and the toast is done.
Because these days it seems like that's what Iot is all about.
But you can also use Node to maybe make desktop apps and in fact vs code, which you've been using all
this time, is created using JS, and it's the node that allows this desktop application to run on your
computer as you've been using it right now, as we mentioned, that you can use Node to do a lot of
things.
And when we have a tool or a language that allows us to do many things, it generally is not very specialized
for one thing.
And right now the one thing and the one thing only that we're interested in is creating a website back
end.
If you imagine Node as a Phillips screwdriver, it's the tool that allows us to use JavaScript on any
computer, not just within the browser.
Then this tool is pretty great and it's pretty universal.
It allows us to do many, many tasks using JavaScript.
But I don't know if you've ever built anything with Ikea, but lately I'm moving house and I'm building
a lot of Ikea furniture and I sort of started giving myself repetitive strain injury by trying to use
the Allen Key and the screwdriver to build, you know, like a Pax wardrobe or like a Billy bookcase.
And then I finally gave up and I bought a electric screwdriver.
And then my entire life changed.
In fact, if you are building Ikea furniture, that is a level three difficulty or above.
You should probably buy an electric screwdriver.
I know this is a programming course, but you know, this is a really important life lesson.
So in our case, Express is kind of like that electric screwdriver.
It allows us to use JavaScript and Node to create our website back end, but it is souped up and it
makes the whole thing so much quicker and so much easier.
Don't take my word for it.
Let's take a look at the code written using just Node to create a very simple website.
It's got a homepage, it's got a About Us page, and that's basically all our website has in order to
do this using just Node, this is all of the code that you have to write yourself and it's a little
bit cumbersome and it's a little bit complicated and it's really hard for somebody to look at this code
straight away and know exactly what is going on.
Now let's compare this exact same website, but this time we're building it using Express and Node.
In this case we are importing, Express and Express will interface with all the node parts for us.
And look at this code.
Look at.
How beautifully laid out it is and look at how modular each part is and how easy it is to understand
what's going on in all the different parts.
Now, in the last module, I could have of course, made you write out all of this in order to create
our first website using Node.
But this is almost on a level of torture and entirely unnecessary because no web developer will create
a website using just node.
In almost all the cases, when we're creating a backend using node, we're going to be using Express.
Because of all these advantages, we get better readability.
We have to write less code.
We have the ability to add middleware, which I'll explain to you very soon what it is and how it acts.
Almost like Lego to enable us to choose which features we want to add to our website backend.
With all of these advantages plus more, it's no wonder that it's so popular amongst JavaScript backend
developers, even though if you've ever heard of a JavaScript framework, you'll know that there is
a massive amount of debate all the time, which is the best front end framework, which is the best
backend framework, which is the best authentication framework, etcetera, etcetera.
But this is the one time where it's actually really easy to pick a JavaScript framework when you're
working with Node and you're creating a website back end, a professional developer will choose the
express framework because as you'll soon see, it is the best choice and it makes our lives a lot easier.
And also it might even spark joy.
And this is backed up with data.
So if you look at the state of JavaScript statistics, there is 100% no doubt which framework you should
be using when you're working with Node to generate your backend.
So now that we've seen what Express.js is and why it's chosen by professional developers the world over.
The next thing to do is to actually use it and create our very first website backend.
So for all of that and more, I'll see you in the next lesson.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.