Article

Express JS: A Guide for Beginners

Matthew Short

Written By Matthew Short

Last updated on December 7, 2018

Course Report strives to create the most trust-worthy content about coding bootcamps. Read more about Course Report’s Editorial Policy and How We Make Money.

what-is-express-js-infographic-fullstack-academy

Different coding bootcamps teach different languages and stacks, and it can be hard to keep track of all the technology options. One technology you might have heard of in relation to full-stack JavaScript curricula, is Express (also known as Express JS or Express.JS). In this guest post, Matthew Short, an Instructor and Head of Academics at Fullstack Academy and The Grace Hopper Program, tells us exactly what Express is, how it fits in with other technologies, and what sort of companies use it. Also find out how to get started learning Express!

What is ExpressJS and what are its origins?

In the world of web development, there are two common types of applications that developers create: servers and clients.  

  1. A client is software that runs from anywhere (e.g., our web browser or a command line script) that can make outgoing requests via HTTP. These requests can be for text, binary files, or encoded data.
  2. A server is software that listens via the internet and responds to incoming requests over HTTP.  Generally speaking, servers reply to these requests with things like HTML, CSS, JavaScript, and even raw data encoded as JSON.
     

Express is a framework that runs within Node.js that provides the means for a developer to create and maintain robust servers. It comes with many built-in features, but also has a gigantic suite of third-party add-ons that developers can use to provide better functionality, increased security, and improved speed.

What is Express used for? Can you give some examples?

The primary use of Express is to provide server-side logic for web and mobile applications, and as such it’s used all over the place.

Companies which use Express as a foundation of their internet presence include:

  • Accenture
  • Fox Sports
  • IBM
  • Uber
  • Exove

What technologies is Express usually used with?

When talking with each other, developers often refer to their stack as a way to quickly communicate specifics about the code they maintain. A quick definition of a stack is all of the software necessary to run the particular application being discussed.

In web development, the stack usually includes:

  • The OS/Environment (in this case NodeJS)
  • The HTTP server software (in this case Express)
  • The database software
  • Any front-end frameworks

Two common full-stack JavaScript stacks are:

  • MEAN stack - MongoDB (database), Express (server), Angular (front-end framework), and Node (runtime environment)
  • NERD Stack - Node (runtime environment), Express (server), React (front-end framework) and Database (any – partially to make the acronym pleasing, but also because the industry seems to be moving away from database tribalism over time)

What are alternatives to Express?

There are plenty of alternatives to Express, and the one you might use would be based on several things:

  • What is the preferred programming language at your shop? If you’re not writing in JavaScript for your back-end code, then you won’t be using Express.  If you’re writing Ruby you might be using Sinatra or Rails, whereas if you’re writing Python you might be using Django.
  • How much configuration do you want to do, vs. how much convention do you want to follow?  Just like Rails vs. Sinatra (convention vs. configuration), for JavaScript servers there are various levels meant to abstract away much of the busy work of creating servers.

Express is incredibly flexible, but requires much more setup. Sails, inspired by Rails, is much more opinionated but lets developers hit the ground running much faster.

How widely used is Express compared with its alternatives?

In general, adoption of Express seems to be increasing over time. I believe that some of this is a result of start-up companies slowly moving away from Rails and server-side rendering and toward microservices as a way of creating and consuming data. With Express you can quickly create an API which can be used by multiple applications, with an additional advantage of writing JavaScript for both the client and the server.

What are the advantages of learning Express?

Learning Express is an easy way to get a deep understanding of the architecture behind web servers. It’s quick to set up, fully featured, and configurable. On top of that, it’s written in JavaScript, which is the language new learners will be using when writing client-side code (it’s also the singular language we teach at Fullstack).

What are the disadvantages of Express?

One disadvantage of Express is that even though it’s a fairly slim library, it still comes with too many bells and whistles for the simplest use cases. If you’re still planning on writing a web server in JavaScript, and you don’t need any of the add-ons that Express comes with, you might want to write it using NodeJS’s built in http library.

Why does Fullstack Academy teach Express?

Fullstack Academy teaches Express because:

  • It is an easy entry point to server-side coding
  • It has a robust set of libraries for web developers
  • It is well adopted.

This means that there’s nothing it can’t do, and if you’re doing something tough, then someone out there has already done it. This leads to reasonable documentation, great community support, and a quicker rate of learning for our students.

Watch some demos of Fullstack students presenting projects they built with Express.

How can beginners get started learning Express?

Start with ExpressJS's own installation guide, and then start working through MDN's excellent guides on Express.

To get started in JavaScript check out Fullstack Academy’s Free Admissions Prep Workshop, and our JavaScript 101 course.

Find out more and read Fullstack Academy reviews on Course Report. Check out the Fullstack Academy website.

About The Author

Matthew Short

Matthew Short

Matthew started his educational career teaching college-level mathematics before attending a coding bootcamp. After bootcamp, he taught Web Development, worked at Google as a Software Engineer, and ultimately landed at Fullstack Academy & the Grace Hopper Program as an Instructor and Head of Academics.

Also on Course Report

Get our FREE Ultimate Guide to Paying for a Bootcamp

By submitting this form, you agree to receive email marketing from Course Report.

Get Matched in Minutes

Just tell us who you are and what you’re searching for, we’ll handle the rest.

Match Me