So few weeks ago I started learning Node.js and made a URL Shortener. I am quite happy with the progress so far but I am struggling to keep myself motivated. Apart from learning from some YouTube videos I am also doing a course on Udemy. I do that everyday in the morning. However I get bored very easily from following a course. so I thought why not I share my journey. I think the best way to learn something is to also share what you learned.
Without wasting any time let us try to understand what is Node.js?
History of Node.js
Node.js was written initially by Ryan Dahl in 2009 (source Wikipedia).
Node.js has a package manager called npm for installing, updating and uninstalling pacakges.
How it Node.js different?
I guess this is very important question, when you spend time learning a new language you are investing months and years of your life. So I guess it is fair to ask this question.
Node.js is primarily used to build network programs such as Web servers. The most significant difference between Node.js and PHP is that most functions in PHP block until completion (commands only execute after previous commands finish), while Node.js functions are non-blocking (commands execute concurrently or even in parallel, and use callbacks to signal completion or failure).
So what does it mean? Node.js does not wait for all previous commands to finish and can be efficient. Well I guess we will figure out later exactly how :) but it sounds promising.
What kind of applications can be built with Node.js?
I searched online looking for an answer.
- Websites: Well that is kind of obvious, a bit broad but good to know that you can build websites or web based applications.
- Chat applications: I found plenty of example of people developing chatting applications.
- Command line applications: Basically for doing automation activities, may be DevOps, networking as well. I will find more about it.
- Atlassian Cloud apps
What made me decide learning Node.js?
So when I did my calculations based on these points above it was quite obvious that I should definitely learn Node.js.
What am I going to build with Node.js?
I don't know exactly what I will be building. I am already learning it and I am trying to understand what all it can do.
I have 3 things that I want to do for sure.
- I will create a frontend of www.ravisagar.com which I will probably keep as simple HTML but I want to display few things coming dynamically from my other sites - may be I will display the latest weather, my battery status, my current location, my latest video or few other things.
- I want to create Atlassian Cloud apps for sure. Atlassian has more focus on Cloud than Server now. Developing apps is logically next step for me.
- Just going back to point 1 where I want to learn how to create custom REST end points and most important I want to learn how to consume external API especially from this Drupal site. So yes I want to build frontend for this Drupal site. This site is not headless but it doesn't has to be :)
So it seems like I will be doing lot of things with REST API.
Everyday I am planning to spend 2-3 hours on this for the next few months and I will try to build a project as well. If you are learning Node.js and at the same stage like me then I hope it will help. I will write series of posts to share my progress and most important to keep myself engaged. Yes I will be posting updates here. I think when I share something it reinforces whatever I learned. The key I think in learning something is to be consistent and to force yourself to learn something. Hopefully soon I will get clarity on what I want to build. I will also be sharing the updates on my YouTube channel. I really believe that to learn something really well you can teach others or share whatever you are learning, I have been creating regular videos on Atlassian tools because it gives me an opportunity to learn new things and also sense of satisfaction that I can help others.
Update: Here is the video version of this blog: