Node.js for beginners

Bm2 B0407 1

In 2017, I had this crazy idea to submit an idea for a talk to Nodevember, a javascript conference with a focus on Node.js. I had attended this conference the year before as a student at The Iron Yard. It was a whirlwind! Honestly, I had just started dipping my toes into Javascript and there was SOO much I didn't know*. I went through the conference both amazed and befuddled at all of the amazing things you can build with Javascript on the front and back-end of programming. Deep in my heart though I had no idea what Node.js was. We used NPM (node package manager) to install dependencies for our projects, but beyond that we hadn't actually written any Node code. I knew enough though to know that Node was doing some pretty magical stuff for my projects behind the scenes. Since I was new to technology and honestly in person I'm quite shy, I didn't ask anyone what the heck is Node. This is a huge mistake because there was likely so much more I could have learned that year. 

Back to that crazy idea for a talk... given my experience at Nodevember the year before in 2017 I thought heck I'll submit a talk about Node.js for beginners. I couldn't have been the only one there who didn't totally understand what Node was and personally I think it's important to provide a well-rounded conference experience for all levels of developers. I guess the team at Nodevember agreed because they selected my talk proposal. 

This lead to massive amounts of this.

Followed very quickly by this.


Because and I'm going to be honest here. I still didn't know what Node actually was. So what's a junior developer to do?

To the Google! 

Fortunately, I had a couple of months to put together a presentation and learn Node.js so I got started. They didn't do recordings for conference talks and to be honest I was so nervous I forgot to record myself speaking, but I've compiled what I learned. Enough with the yakkings amiright? Let's learn the basics of Node.js!

The best way to get started learning Node.js is to look at how the website defines it.

" Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js' package ecosystem, npm, is the largest ecosystem of open source libraries in the world. "

If you read that and thought to yourself, what the actual heck, you are not alone. That was exactly my thought the first time I read it too. It's easiest to break this definition down and look at in chunks.

Let's start here. 

"Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine."

The first step for me to look up what a runtime was. I don't have a computer science background so this concept wasn't familiar. Essentially a runtime is instructions that you did not implicitly write in order for your code to run. I think of this as the middleman that converts my code to binary for example and allows it to run. You can read more about them here.

Which makes sense becaussseee Node.js is not actually written in Javascript!

If we were to look under the hood of this v8 engine and Node as well you would see that it is mostly written in C, a low-level language meaning it is pretty close to being completely computer speak and this is what allows it to be really fast!

Node harnesses the v8 engine to take javascript outside of your browser so you can build server side applications on your machine.

One of the really cool things about Chrome's V8 engine is it is completely open-source. If you wanted to you could download it and use it to build the next big thing or even your own browser!

Thing to remember: Node.js is a set of instructions of javascript that runs outside of our browser on the server-side. It's built on top of the Chrome v8 engine so it's really fast! 

Next up!

Check out Non Blocking vs. Blocking coming soon!

Stay Connected