WIRT #281016: Why How and What – Node.js

This all started when I was bored at the hospital; I opened up my Materialistic for Hacker News and started browsing the content.

The first one that made me curious to read about it was: How I built an app with 500,000 users in 5 days on a $100 server by Erik Duindam.

Erik, CTO of Unboxd detailed an interesting piece on why the common approach towards quickly shipping an MVP (Minimum Viable Product) is rather a wrong approach. He made his point by explaining the case of GoChat for Pokémon GO. The developer behind the app built an MVP and while he was about to start enjoy this great run of his app; the app went down. He never thought his app would touch the magic number of 1M hits and when it actually did; the server went off.

Elaborating on this, Erik goes on to further explain the reasons and then compares his GoSnap app where he ditched the MVP model and dodged the potholes. But between all this I found the mention of Node.js and how it was a primary choice Erik took while building the app.

Now, being a WordPress developer, little do I have to worry about Node.js (just kidding!). Still, Node.js have been mentioned quite few times in-front of me and am accepting this publicly – I don’t have a slightest of the clue of how it can be used or its proper use cases.

Hence, that sparkled my day’s browsing journey and following is what I found on Node.js context:

How to decide when to use Node.js?

StackOveflow is a beaut, we all know it. This question itself had some good info on the topic and has good replies regarding the use-cases of Node.js, why it is preferred in those use-cases and also mentions Meteor Framework (more about it sometime else).

You have to believe me when I say, I breathe WordPress. The curious me started wondering what possibly Node.js and WordPress can do together. The answer was displeasing but I found a good read around it.

Keystone.js is the best Node.js alternative to WordPress

The author starts by mentioning a noteworthy statement when he mentions that Node.js, Mongo DB and Express.js is the LAMP of 2016. He then goes on explaining how Keystone.js which is in some serious development track might give a decent competition to WordPress (if ever, in future).

The gist of the concept is that Keystone.js being a CMF (Content Management Framework) in its capacity, has an edge over WordPress if you treat WP sans its plugins, features and regular inclusion of fancy functionalities in core and talk just about delivering the main ingredient i.e. content and building a thing around it that manages it.

He humbly wraps the blog with the quote:

Keystone.js is way behind WordPress in terms of ecosystem and brand awareness, it is already a powerful option for creating company websites and more with custom functionalities. But when it comes to being a fullblown JavaScript powered CMS/CMF – Keystone.js is that today, where as WordPress is just getting started.

While reading about Keystone.js, I realised that a mix or comparison of WordPress and something built on Node.js won’t result in anything meaningful (told you, I was Node.js illiterate); I looked for the best thing I could –

PHP vs. Node.js: An epic battle for developer mind share

Here, Peter starts the explanation and mentions the following, which I found to be one of the simplest and human explanation of why Node.js exists on the planet. He says:

…JavaScript handled little details on the browser, while PHP managed all the server-side tasks that existed between port 80 and MySQL…Between WordPress, Drupal, and Facebook, people can hardly go a minute on the Web without running into PHP.

…But then some clever kid discovered he could get JavaScript running on the server. Suddenly, there was no need to use PHP to build the next generation of server stacks. One language was all it took to build Node.js and the frameworks running on the client. “JavaScript everywhere” became the mantra for some.

Peter later explains on how and why Node.js has got the attention of the developers and why it is one of the meanest things to work on right now; yet why PHP is there to stay and what may make you re-think your choice of Node.js over PHP.

Believe me, this piece by Peter is one of the best comparison article on PHP vs Node.js context.

Between the above mentioned reads, my boredom and my new found interest in exploring what Node.js is I read few other stuff here and there and then landed on the following by Thibault Laurens:

How the V8 engine works?

The most important thing that you’ll read everywhere is that Node.js uses V8 JavaScript engine (I sound better now, right!). Now, what in the god’s holy name is that? Let me give you a very tiny overview:

Shared on SlideShare by Gary Yeh

Why I read it? Because V8 JS Engine plays a crucial role in what Node.js is and can do. Hence, it was necessary. Thibault, explains the context of how V8 engine works in order to produce optimized code.

Believe me, I too did not got a good grip of everything that Thibault explains but it was an informative read and I really like how V8 uses Hidden Class approach (I was smiling like a kid on the sheer brilliance of my brain, being able to understand the concept).

Well, that wrapped up my loop of browsing-consuming-browsing again session today. I still have this Node.js bug inside my head and I shall come back to it soon.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s