sublime text 3 and iterm showing meanjs app
meanjs, web development

Launching a Mean.js App

After experimenting with Rails for building web apps, I’ve decided to learn to build apps using the MEAN.js stack. Very quickly, the MEAN stack is comprised of:

  • Mongo DB: A no-sql, JSON document based database.
  • Express: Backend framework for Node apps written in Javascript
  • Angular: Frontend javascript framework
  • NodeJS: A single-threaded, non-blocking javascript web-server running on Google’s V8 engine

So the MEAN stack allows you to write web apps completely using Javascript (as well as html/css of course). Apart from these 4 basic technologies, MeanJS integrates packages like Bower and Grunt.

I like the elegance of Ruby and Rails, but seeing as how apps seem to be moving toward using javascript heavily for front-end frameworks, I’d rather learn to code on the backend using Node and Javascript so I don’t have to switch contexts between Ruby and Javascript. Also, the non-blocking async nature of Node means that it has the potential to be very fast. Node’s got a lot of hype around it and seems to be growing quickly, so if I’m gonna invest my time in learning a technology, it seems like a good one.

I’ve already noticed that launching/tweaking a MEANjs app is more complicated than a Rails app, and there is less support out there, learning resources aren’t as prevalent or polished, although I’ve found a few good ones. Here’s what I’m using so far, apart from the official Framework docs, constant Googling and StackOverflow:

  • MEAN Stack Intro – (Video) Good, 1 hr demo/overview on how the technologies interact to form an app.
  • 30 Day Mean Stack Honolulu Challenge – (Video) 30-ish videos around 10-15 minutes each, showing how to launch a basic MEAN app. Great explanation, also goes over Bootstrap for front end styling. I highly recommend this series if you’re looking to put a little more time in. By Bossable.com.
  • Web Development with Node and Express – (Book) Good explanation of Node and Express, doesn’t include angular, and uses Mustache for backend templating, while MEAN.js uses Swig (sparingly). It also covers concerns regarding deployment and maintenance. When I’m burned out from being on the computer all day, it’s nice to supplement the training by reading this (one of these days I’ll get a life, I swear).

I’m using Heroku for cloud hosting, and MongoLabs for my online database. Heroku seems to offer pretty good support for Node apps, though admittedly I don’t really have anything to compare it to.

As far as the actual purpose of the app I’m building, I’ll write more on that in a different post as I progress, but I’ve already got a working test app up on Heroku and linked to the .io domain I purchased for it. It’s coming along!

Standard