Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Preview
Start a free Courses trial
to watch this video
Let's talk about what Express is and how it can help you build a web application.
Courses on Treehouse for Learning Other Web Frameworks
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
[MUSIC]
0:00
Hello, and welcome to Express Basics.
0:04
I'm Andrew, a Treehouse teacher, lifelong
learner, and JavaScript developer, and
0:07
I'm so excited to share with you
the power and simplicity of Express.
0:12
Express is a web application framework for
0:17
Node.js that allows you to rapidly
build dynamic web applications.
0:20
Web applications have a lot of
commonalities between them.
0:25
Commonalities in software
are called patterns.
0:28
A web framework provides lots of
solutions for making web applications.
0:32
The solutions can differ
from framework to framework.
0:37
But the most common ones include,
templating for dynamic layouts and
0:39
content, mapping URL's to content.
0:44
URL mapping is often
referred to as routing.
0:47
Processing input provided by users and
serving appropriate responses.
0:50
Using a web framework allows you to
build your application quicker since you
0:56
are not focusing on the mundane details
of developing a web application.
1:00
Using a framework, allows you to
focus on the code that make sure your
1:05
application is different
from someone else's.
1:09
The difference between
your application and
1:11
someone else's is often
called business logic.
1:13
Knowing a web framework allows you
to jump into other codebases using
1:17
the same framework and
get up and running quickly.
1:22
The same goes for other developers
collaborating on your project.
1:26
If they're already familiar
with the web framework,
1:30
they can get to
the business logic quicker.
1:33
The principles you will learn here
are transferable to other languages and
1:35
frameworks.
1:40
Python based Flask, Java based Spark, and
1:41
Ruby based Sinatra all
have similar conventions.
1:44
If you understand one of these frameworks,
you'll be able to get up and
1:48
running with another quickly.
1:52
You can learn all of these on Treehouse,
check the teacher's notes for links.
1:54
In this course, we'll use Express to build
a personalized flash card application.
2:00
The app accepts the name of the user and
it greets them.
2:06
From the homepage you can launch
a flash card study session,
2:12
the app will give you flash
cards in a random order.
2:16
You can flip them front to back and
back again.
2:20
Clicking Next shows the next card.
2:25
Finally, a user can clear
their name from the site.
2:28
While building this flash card app,
you'll learn the nuts and
2:33
bolts to building any web application.
2:36
This course will cover how
to install Express, and
2:40
get a basic Hello World
application running.
2:43
You'll learn to render HTML for
our application,
2:46
we'll use the Pug template engine.
2:50
Template engines let you
inject variables into HTML,
2:52
use conditionals and
make your HTML more flexible.
2:56
The principles you'll learn in Pug
are universal across over templates and
3:00
engines.
3:05
You'll also learn about routing, one of
the co-components of the web framework.
3:06
Routing is how you specify what content is
to be returned based on the URL requested.
3:11
The Express Static Server is how
Express loads styles, scripts,
3:18
images and
other static files to the browser.
3:22
Later on in this course,
we'll get this static server set up and
3:25
when we do,
our app will look a lot better.
3:29
Middleware is the other
core component of Express.
3:33
If routing provides the pathways
through our app, middleware functions,
3:37
our work is that craft the responses
to user requests on the way through.
3:41
Finally, you'll use what you've learned
to finish building the flash card app.
3:46
By the end of this course,
3:51
you'll not only have a solid
understanding of how Express works,
3:52
you'll also have a study aid reinforcing
your JavaScript and Express knowledge.
3:56
We've got a lot of ground to cover so
let's get started.
4:02
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up