Building Web Applications with Node JS and Express

Welcome to this review of the Pluralsight course Building Web Applications with Node.js and Express 4.0 by Jonathan Mills.

jonathan-mills-v2

Jonathan is a JavaScript and Node.js expert working mostly in the MEAN Stack with individuals and companies to help build their technical skills to cope with the constantly changing landscape of software development.

He is also an ASP.NET insider and an international speaker focusing on JavaScript both in the browser and on the server.

Getting Started

Introduction and Installation

The first surprise is Jonathan says he’s going to start at the very beginning and not going to assume we know much of anything about Node.js.

So although this course is the start of the intermediate level Node JS path, it is also friendly for beginners.

Jonathan introduced Node JS as a runtime environment. It is not a language. The language that we use is JavaScript.

Because not everyone loves Javascript, we are promised that we’ll see a way to use JavaScript that makes it a little less intimidating.

Express is a web development framework for Node JS.

We see how to download Node from nodejs.org. This has changed a little and we now have a choice between LTS and current versions. However it is still supr easy to install.

Node and the Command Line

Begins with checking the Node version from the command line.

We see that we can run node from the command line and execute any commands we want. If you’ve ever used the Chrome console, or any other browser console, this should be pretty familiar.

Which Editor/IDE for Node JS Development?

Jonathan says there are an abundance of editors for JavaScript, and there’s no right or wrong answer on which to use. He describes and demonstrates a few of them so we can pick the one that feels right for us.

As with many things in computer programming technology, advice on editors and IDEs can date quite quickly. I write this on 30th July 2016. Jonathan produced the course in late 2015 so I will point out any changes since then.

Sublime Text

The first editor is Sublime Text, which Jonathan is a big fan of, and I also like it a lot and would probably use as my main editor if it was free.

The $70 fee is likely not very much compared with how much money you make. If it saves you a couple of hours over the duration of it’s use, then you’ll be getting good value out of it.

We see some of the features that Sublime offers. These are quite standard features for modern editors.

Webstorm

This is an IDE by JetBrains. Licence costs are per year and there are a variety of different licencing options available.

It’s more expensive than Sublime Text, but it is an integrated development environment and is generally more fully featured than any text editor.

Jonathan demonstrates the code completion and debugging features.

Atom

Jonathan has a lot of good things to say about Atom.

I have been using this for the past couple of months and recommend it.

Some things that I really like about Atom are:

  • Very hackable – you can change anything you like to make it behave however you like
  • Entirely free
  • Created by the Github team and largely community driven

Brackets

Brackets is a versatile IDE by Adobe.

Brackets is entirely free and is the editor Jonathan will use in this course.

Vim

Receiving an honorable mention. A very extensible editor for Node JS.

Visual Studio Code

Receiving an honorable mention. It was very new when Jonathan produced the course but is now quite a solid and mature product.

I don’t currently use Visual Studio Code as my main editor, but I recommend that you download it and see what it offers.

Configuring Brackets

There are some extensions to Brackets for mod it out for proper web development.

We see the extension manager where we install our extensions.

The first extension that Jonathan recommends is the Delkos Dark Theme and you can install it using this URL. Once installed go to View->Themes to select it as your preferred theme.

Also recommended is Beautify. Use Cmd+Shift+L to beautify your code, i.e. sort out all of your indentation.

Jonathan also recommends and discusses:

Node Package Manager

We start off with Hello World and then pull in Express JS:

var express = require(‘express’);

Jonathan explains that NPM is a package manager for Node.js. In this course we’ll be using it to download a variety of useful JavaScript libraries.

We see an example package.json file, and we see that it’s trivial to install Express using npm and input the details into our package.json:

npm install express –save

Our package.json is updated with the version of Express with a ^ caret before it. What does this mean?

Versioning Packages

^4.xx.x – installs any version that has the same major version

~4.xx.x – installs any version that has the same minor version

4.xx.x – does not automatically install any new versions

We see demonstrations of all of these techniques in action.

For guidance on versioning best practices see the Production Code module of  Jonathan’s JavaScript Best Practices course.

Part 2 – Setting up Express is coming soon

One thought on “Building Web Applications with Node JS and Express

  1. Pingback: Node JS Learning Path | Zombie Code Kill

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s