Introduction to Meteor.js

When I started my full-time job as a software engineer 6 years ago, the first programming language I learned was Perl, and the first web development framework was Mason. Let me put this way, I was not a fan of either. Later on, I had been mainly developing back-end services using Java and Groovy.

This year I wanted to pick up some front-end development skills. I read about Meteor.js and I was impressed. Here is why:

  • It is a complete web framework, not just a library like Angular.js. It is integrated with Node.js on the server and jQuery on the client. It has built-in MongoDB.
  • It is easy to learn. It is just pure HTML and Javascript! Unlike Angular.js, it does not have those weird concepts such as ng-model directive. Instead, it uses Handlebars for HTML templates, which is super easy to follow.
  • It is easy to test and debug, and once the source code is changed, the page will automatically refresh and the server will automatically restart if needed.
  • It has many community built packages that can be re-used as UI widgets, e.g. the entire login widget can be just one liner.
  • I have not tested it yet, but it claims to build once, run everywhere including iOS and Android. This is super cool, as there is no need to learn Objective C (BTW I absolutely hate Objective C, probably the worst language I have ever learned), Swift, or Java. I know that many hackathon teams use it for fast prototyping.

To install Meteor.js:

curl | sh

Create a new Hello World app:

meteor create hello-world

Once done, you will see a folder named “hello-world”, in which there are 3 files, CSS (empty file), HTML, and Javascript. To run the app, make sure you are at the root of the folder, and type:


That’s it! Now you have a complete web app up and running!

Meteor.js is still a relatively new technology, but it starts to gain attractions recently. I think it is totally worth learning and trying out, believe me, it will not even take more than an hour! I will show you my dashboard project using Meteor in a later post, which includes MongoDB, Templates, YUI and Google Maps API.