Why MeteorJS is Awesome

I've seen a lot of horrible workflow in both Java and PHP, things like ant build scripts, installing bulky VMs and endless tools like Vagrant and Virtualbox. Doing it in MeteorJS is really a paradise and here is why.

Posted by Darwin Biler on January 23, 2016

One-line installation

Want to develop in MeteorJS? sure just paste this in your console and everything you need to get started is all set:

curl https://install.meteor.com/ | sh

Compare that to other on which you need to install wamp, xampp, mysql, php extensions, java, rvm, ruby, python, NodeJS, virtualbox, vagrant, gulp, so on and so forth. It is just way too much and pain in the ass, while in MeteorJS, is just a matter of simply copy-pasting that one line of code and you are done.

Project creation and management is very simple

Want to create a new project?

meteor create-project myproject

Want to run the project?

	cd myproject
	meteor

Want to reset data of the project?

meteor reset

The commands are very intuitive and really easy to remember. Nothing is been easier than that if you compare the workflow to other frameworks.

Setting up the database is really easy

In normal circumstances, you need to install MongoDB first in some virtual machine or directly to your laptop. But the good thing about MeteorJS is, the moment you create a new projet, it comes with a MongoDB database with it. You can access it by

meteor mongo

Instant HTTP JSON API

In normal applications SPA (single page applications), you have to do the following:

  1. Create the migration files to create the database tables
  2. Develop the classes that manipulates those tables via some ORM
  3. Develop the RESTful JSON API that will retrieve the data from database and serve the data as JSON
  4. Create the JavaScript codes that will fetch the JSON data via REST API via AJAX
In MeteorJS however, you d/on't need to do all those steps!
  • Tables/fields being created on the fly the first time you referenced it in the code. So the database is the one that is actually adapting to your code changes, not vice-versa. Made possible by NoSQL technology.
  • There is no need for ORM, since the JSON objects is being stored as is in the MongoDB. Thus no need the process of conversion of relational data to Object Oriented data.
  • MeteorJS handles the fetching of data from server to client, called DDP ( Distributed Data Protocol ). DDP has a JSON-based syntax and sends messages similar to the REST protocol. Additions, deletions, and changes are all sent across the wire and handled by the receiving service/client/device. Since DDP uses WebSockets rather than HTTP, the data can be pushed whenever changes occur.
  • You don't have to manually write codes that calls AJAX request nor DDP. Since MeteorJS maintains a mini-database in the browser. You only insert/update/delete this mini-database as if you were changing a local database. MeteorJS handles the synchronization of that mini-database to the actual database in the server using DDP.

Isomorphic application

It simply means you use the same code for front-end and backend. That is compared to for example Ruby on Rails, on which you need to learn at least 3 things to build the most simple application -- Ruby, JavaScript and SQL.

In MeteorJS you just use JavaScript for all things:

  • DOM manipulations is coded via JavaScript
  • Backend Codes is being run by NodeJS which is written by JavaScript
  • MongoDB uses JavaScript to insert/edit/delete/update its data.

Those features is something extra-ordinary compared to other framework out there but it comes with a price. Since all the components is bundled together, it is usually hard to introduce 3rd party tools to your infrastructure. For example, it is using its own packaging instead of the usual NPM, Blaze instead of ReactJS among other things. It might fit in some cases but use it with discretion to not overdo it.


Did you find this useful?

I'm always happy to help! You can show your support and appreciation by Buying me a coffee (I love coffee!).