Small update on Contacts Manger app

Progress on my Node app has slowed a bit, maybe it was a bit nuts to think I could blog everyday, build a complete Node app and work full time.
So far I’ve just got the basic shell of the app, nothing more than the app.js starting file. Not much more further on from my last update.

I’m going to change my plan slightly instead of building a complete app through the 30 days of the writing challenge. I’m going to study Node for the 30 days, write about what I learn. Then when near the end of the 30 days I’ll be in a better place to get building my app.

The first thing I need to do is go through all the EggHead IO videos there are on Express. I’ve watched them before while on the commute home, but I have sat down at home, watched them and made notes. This will really help with me understanding routes.

I think I understand the concept of them and how Express uses them, but the syntax for writing them alway alludes me. Re-watching the videos, making notes and practicing writing the routing of my app will help.

Training Materials for Node

For my 30 days of Node I’ve been using a few training resources in order to learn Express. There’s EggHead.io they have great videos, all short and available to download (if you sign up) so you can watch them offline e.g. on the train. Their Getting Started with Express course by Ben Clinkinbeard is fantastic.

I’ve also watched their Introduction to Node: The Fundamentals by Will Button is also a great video series they do.

I’ve also got a few books to read, these are:

There is also a Gitter group which is going to be really helpful. So there’s a few resources, but nothing beats just jumping in and trying to build something and then finding the answers the problems you come across as you go.

Update on ContactsManager app


As part of my 30 days of Node I’m building a ExpressJS app that allows you to create, edit and save contacts. I’ve been working on this app for a couple of days, not really got too far just managed to get the the package.json file and an Readme file setup. In the package file I’ve got the Express framework and Nodemon all setup, along with the very basic app.js file setup.

I know there is the Express Generator tool which would set up the core of an app, but as this is a project for learning Express I think it’s better to start adding the bits of the project, bit by bit. Instead of letting a tool setup a project with all these parts (views, routes and the core app.js file) and then wondering how it all works. I think it’s better to setup parts of the app as I go and learn how to implement them. I think tools like Express Generator are fantastic they can help you get a new Express site setup and running in minutes, they really have their place.

I mentioned earlier that I’m using Nodemon with this project, the reason for this is because the main drawback I see using Express is that you have to keep restarting the server after each change in order to be able to see the change. It can be annoying and I know that there is probably a NPM package I can install that gives me live reload (which is awesome and something that I wish I had back when I started building websites in the late 90s). So for now I’ll use Nodemon to monitor my app for changes and then I can manually refresh the site to see the changes. This isn’t perfect, but better than having to restart the server after each change.

Anyway my project is on GitHub, as this is what all the cool kids do nowadays. My next task is to start looking into how to create views and routes. How routes work and how they can load a view.

How Node compares to other web tech I’ve used

I’ve been looking into Node and Express, getting ready for my learning Node month, and I’ve started to compare Node/Express with the other web technologies I’ve used in the past.

Over my career I’ve used a few other web technologies including ColdFusion, .Net even classic ASP a wide variety of approaches to how to build a web app. All of them are server side technologies unlike Express which is client side. Now I have done a lot of Angular and JavaScript work over the years but I see Express as filing a different niche than Angular. For me Angular 1 is really client side, while Express is more of a full-stack approach to building a web app.

If you look at something like the MEAN stack Angular is used for the client side JavaScrip, Express is used for the middle ware part of the stack, being used to connect to the data layer (Mongo) and providing APIs for the client side (Angular). This reminds me of the old sites I use to build with ColdFusion where I’d write ColdFusion Components and ColdFusion tags to connect to the data source and serve this data to the client.

The reason I like the approach Express takes is:

  1. Its lightweight, doesn’t insist that you do everything one way
  2. Its JavaScript across the stack, both client and middleware
  3. The use of one language across all parts of building the web app

For me Express is building full stack web app as I use to, but using modern technologies. I’m sure I’ll find a lot of similarities between my old way of building web apps and using ExpressJS.