Thursday, 24 September 2015

Introducing NodeJs

Welcome to NodeMedes! 

So how it started, right? Me and my friends were working on a web application built on top of the coveted NodeJs server using the Express Framework. But our work got screwed up because many tutorials were somewhat outdated and the platform has evolved since.

So let's start with the basics.

NodeJs

Image result for nodejs logo

What is NodeJs?

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

Let's look at this introduction in a bit detail:

1. Javascript runtime: Node is basically a runtime engine for Javascript. It allows you to run Javascript outside of the browser and in the server end. This engine is basically where all the magic happens. It allows web application developers to work with the same language Javascript both on the server side and the client side. No context switching anymore!

2. Chrome's V8 engine: It's a very powerful engine that compiles Javascript. It's used in one of the fastest browsers in the world, Google Chrome. And that's what builds the foundation of NodeJs

3. Event driven: Event driven programming is when the flow of the program is dependent on particular events. It's a programming paradigm that is well suited for web application development.

4. Non blocking I/O model: Blocking refers to operations that block further execution until that operation finishes. Non-blocking refers to code that doesn't block execution.

5. npm: Node's package manager is a friendly tool that will let you access a lot of modules that will ease your web application development. 

This is enough introduction for Node. In a future tutorial we'll start to make a simple to-do list application using NodeJs, Express and Mongo.