Friday, 26 June 2015

A Meteor Introduction

I have been dabbling with Meteor during the past few weeks. Yet another webapp development framework!! As if we don’t have enough of those. This also intends to develop your app rapidly. But the bells and whistles it comes with are rather compelling.

The first time I got introduced to Meteor and looked at it, my reaction was : This is effing cool. I haven’t seen anything like this before.

So what’s cool about Meteor? First, it’s end to end client-to-database Javascript coding. With one language, you can do full stack development. Of course you have the basic html and css for your web page elements, but everything thereafter is JavaScript.

The server-side component is Node.js -- in fact Meteor is built over it -- so the Meteor appserver equivalent of the traditional webapps is also in JavaScript.

Meteor comes with Mongo as the database, so your functions and queries are all JavaScript. End-to-end JavaScript coding is enchanting. You will realize it once you get your hands on it.

The power of incremental building manifests in the history of Meteor. Rome was not built in a day. As the Roman emperor Hadrian said: “Brick by brick my citizens, brick by brick." Here and now, it is more like "layer over layer my geeks, layer over layer".

Story starts with V8. You can check out V8 from github, build it using a C++ compiler and run JavaScript programs from the command line without embedding your code in script tags of a web page opened with the browser. Back when Google smarties wanted to build a new browser, Chrome, they did a smart thing, which of course you are expected to do if you are in Google and in this case the smart thing was to first create the core engine called V8 using C++.

Then, another smartie Ryan Dahl who does not work at Google, all Google people are smart but all smart people do not work at Google, and in this case who worked at Joyent was miffed “after seeing a file upload progress bar on Flickr. The browser did not know how much of the file had been uploaded and had to query the Web server. Dahl desired an easier way” [1]. So Ryan combined V8 with an event-loop and a low-level API to create Node.js

Then, another bunch of smarties wanted application development to be done at a blazing-fast speed. In their words: “This new way should be radically simple. It should make it possible to build a prototype in a day or two, and a real production app in a few weeks. It should make everyday things easy, even when those everyday things involve hundreds of servers, millions of users, and integration with dozens of other systems” [2]. So they took Node.js and created Meteor over it.

These bunch of smarties with the Meteor Development Group are many. There is Geoff Schmidt the CEO who is one of the creators of audio fingerprinting, and a founder of MixApp. There is David Greenspan, who created Etherpad, sold it to Google and at Google worked on Google Wave and Google App Engine. Other names are : Robert Dickert (cofounder of Velocity project), Matt DeBergalis, Nick Martin, David Glasser, Avital Oliver, Alice Yu, Slava Kim, Matthew Brewer etc. You can read all about them on the’s people page [3].

For a framework to achieve traction, it is just not enough to have smart people on the development team with an enviable track record. Concerns arise about the longevity of the project. But no issues on that count. One simple answer : Venture Capital fund Andreessen Horowitz pumped in $11.2 million in meteor three years ago [4].

Add to that there are advisers like open-source technologist Rod Johnson, who know how to derive business value. If you have forgotten about Rod a little bit, he is the guy who, back in 2002 wrote the book “Expert 1:1 J2EE Design and Development” which outlined ideas of simplified enterprise Java development using the IoC mechanism.

After that he started the open source Spring framework, then founded SpringSource which built a hell lot of modules to make integrating and plugging in various aspects very easy. Finally there was a glorious sale, a $420 million exit with VMWare[5]. So you can be sure of history repeating with Meteor in terms of stability and business value enhancement.

There are other big names too, and as the funding announcement page states : “Meteor's partner at AH is Peter Levine. As former CEO of XenSource, he is an expert at selling open source into the enterprise. AH has kindly allowed their board seat to be occupied by Rod Johnson, who created the open source Spring framework and built a successful company (SpringSource) around it. And we also found a way to involve David Skok at Matrix Partners, who built the enterprise sales strategy for JBoss, the open-source application server. Peter, Rod, and David are our dream team and we're very fortunate to have gotten them all into the same room.” [6]

Obviously, with smart folks as a team propelled by a series-A round funding, and advisers with priveleged wisdom, you can expect a fantastic product. Indeed, meteor does not disappoint. It comes with a bunch of kick-ass features.

It is a reactive framework meaning that “as data changes, things in your application change without you having to explicitly do anything”[7]. Now all clients using your application get dynamically updated. This is the power of websockets and server-to-client pushes. But even better, it has a publish-subscribe mechanism meaning you can control what the server sends to which client.

A tiny little Mongo database actually runs on the client side. This is awesome for a number of use cases. You can see your own data by using the browser developer console and running some JavaScript.

Now, that’s not all. Since all the code is JavaScript, and Phonegap Cordova is built in, Meteor can convert your app to a hybrid mobile app that will run on Android or iOs. All you need to do is to download the correct sdk and run a few commands. It is ridiculously easy[8].

So all these kick-ass features help your development to be rapid and your app to be reactive, responsive, and runnable everywhere.

1 -
2 -
3 -
4 -
7 - DISCOVER METEOR : Building Real-Time JavaScript Web Apps by Tom Coleman & Sacha Grief
8 -

No comments:

Post a Comment