5 Interesting Things about Node.js

5-interesting-things-about-nodejs

In the last 5 years, Node.js is a name that is mentioned so many times in the web developer community. Immediately after being introduced by Ryan Dahl in 2009, Node.js became a new trend of the programming world.

People are still arguing very intensely about its performance, but today we are going to talk about 5 interesting things that you can do when you get started with Node.js in a view of a crazy fan of programming languages.

1. Full – stack developer with Javascript

It’s a revolution of the software industry when Javascript is encroaching on the turf of other programming languages. We have had Javascript in front-end web development. Now we can use it in game, desktop application or even mobile application development. The reason for that is too easy to find out: Javascript is a beautiful and very easy-to-use programming language. It’s not affected by the dogmas about Object-oriented programming but comes with some interests of Functional programming. Ryan Dahl brought such profit onto the server side.

For those who want to be a versatile warrior in web development, MEAN Stack will be one of your favorite equipment packs. It’s a set of 4 following weapons: (1) MongoDB for a NoSQL database management system, (2) Express for a framework which helps us write RESTful APIs in Node.js very quickly,  (3) AngularJS for making single-page applications at the front end, and finally, (4) Node.js for running Javascript on the server side.

mean-stack

MEAN stack

2. Asynchronous programming – Why not?

With other technologies, we may be familiar with the concept of asynchronous or non-blocking tasks. When we want to process a bunch of data that takes time (such as getting data from server or querying the database) and expect the UI will not be blocked, we use some libraries to do this kind of task on a background thread.

With Node.js, the asynchrony engrains the way we write the lines of code. Functions that receives parameters, processes them and then returns something sequentially may become too obsolete with you if you are a Node.js developer. Now, we have to always think about putting a function as a parameter into another, and then call it when all things are done in the second functions.

Furthermore, if you want to deal with Node.js, you have to deal with the way we use shared variable just like what we have learnt about mutex and semaphore in Operating Systems. A beginner may get stuck at some tragedy situations such as Callback Hell or wrong index variable in a loop which contains an asynchronous task. Don’t worry. If you find a way to resolve these kinds of problems yourself, you will realize that working with Node.js is full of fun.

synchronous vs Asynchronous

Synchronous vs Asynchronous

3. JSON is not just formatted text

From mobile developers to web developers, getting information or creating an usable JSON takes us many tries and much of time if we are using a programming language that is not Javascript. With Node.js or AngularJS or any technologies that use Javascript as the main programming language, JSON is not just formatted text, we use it as object! In case you don’t remember, JSON stands for Javascript Object Notation and it’s a part of this kind of awesome language.

4. The power of NPM

NPM is a packet manager for Node.js. It’s something like RubyGems of Rails, Composer of PHP, Pod of iOS or Maven Central of Android and Java. But it’s not so simple. The point is, nowadays, front-end web developers also use npm for their projects. Packets of NPM are small, simple but very helpful for any web development, especially these two library for automatic tasks: gulp and grunt. Another important library is bower – a packet manager for front-end web development, which is installed by using npm.

5. Electron – The future and more

A few months ago, Github proudly introduced their first release of Electron. It’s a tool for creating cross-platform applications using html, javascript and css. This is a big step of web development because this tool brings the web development from the cloud to everyone’s computer.

Although just recently launched, it is showing a superior strength because some very well-known applications such as Visual Studio Code and Slack used it even before it becomes widely available for developers. And the reason for its appearance in this post is that Electron uses Node.js. I believe that it takes not so much of our time to export a desktop application from our web apps that are written with Node.js.

app-using-electron

Apps using Electron 

Finally, above things may be not enough for you to imagine a very huge growing future of Node.js, but I am sure that at least some of us could find out the exciting points in this new runtime environment. If you are too tired of coding with boring traditional programming styles and want to find a new challenge for yourself, let’s try Javascript on Node.js!

Savvycom right now is applying Node.js instead of JavaScript to touch technique of future as well as satisfy our great customers.

Summary
Review Date
Reviewed Item
15214
Author Rating
5

Tags: , ,

5 Interesting Things about Node.js at: August 30th, 2017 by admin