Oh 'Node' You Didn't

February 29, 2016    Javascript Programming Coding Node

Lightbulb on wood table

We use the term ‘indecisive’ a lot; generally in a condesending manner. I remember hearing a local sports analyst on the radio called indecisive after changing his tune on a “hot topic” issue. He responded by saying, “When I receive new information, it should only make sense to re-evaluate my previous stance.” I am not sure the other analyst let him off, but the concept seemed to ring true. With new information, why should I not re-evaluate.

I have talked about my 3 month evaluation period and consider this a time to re-evaluation decisions I have made and the paths I have been on. This allows my learning to be flexible and adjustable based on what I am focusing on and where the ‘pull’ is in life.

Well this happened for me with Node in this 3 month period. I never ‘hated’ Node, but I just did not understand the ‘why’. Everyone says it is “great for a chat app”, and as this is not a product I am yearning to do, I just didn’t get it.

I saw so many companies using Node and finally just decided I needed to try it.

Hello, Server

I did what seems to be the consistent “Hello, World” in Node; building a server using the built in http module and serving some text to a page. Honestly, this blew me away. That I could so quickly serve up some pages without a framework like Rails or even a gem. It is just ‘out of the box’.

The other thing I noticed, was there is less abstraction. This is something that has always frustrated me. I understand the tradeoff with abstraction. However, I tend to prefer to have less absctraction. Recently, I saw this talk by Ashley Williams where she talks about the price we pay for abstractions. She shows how this can lead to an increased difficulty when getting started with and learning something new.

Absctraction often brings speed, but I still appreciate the fact that I can see and know with a quick glance what is happening with Node.

Not a Framework

What is Node? It is just javascript, but it is javascript that is doing something differently than it has ever done till now. It feels like what we might call a framework, but there is no extra syntax, it IS just javascript so what is it?

I recently went through The Node Beginner Book which I highly recommend if you are looking at trying Node. It is particularly good if you are coming from another language, as the author will talk about how the conventions might be in another language, but why Node makes a process easier or does it differently.

So what is Node? I like the way the author of the book states it.

Node.js really is just another context: it allows you to run JavaScript code in the backend, outside a browser. - Manuel Keissling, The Node Beginner Book

Another context of Javascript, or a different implementation of the language. This is what Node is.

Wrapping Up

I am enjoying the lack of absctractions, the modules, and just writing javascript. I highly recommend checking out The Node Beginner Book and I will be diving into the next book by that author, The Node Craftsman Book in the upcoming weeks.

Connect with me on Twitter if you have any comments!