True path to become a JavaScript Ninja — III
--
Last week, we came familiar with the second phase of our path that we are currently on. It was Practicing Phase, followed by Learning Phase. Now we will move to the final phase of becoming a javascript expert which is Expertise Phase. As its name suggests, in this phase we will go far-deep in javaScript.
In this phase, we will learn those things which a lot of developers has difficulty to understand. That is why they stop going deep into these concepts and fail to become a JavaScript Ninja. This phase will be the most difficult phase of this path. It will take a lot of time, dedication and concentration to understand each topic which will be in front of you very soon. So, keep motivating yourself, never give up.
“ You didn’t come this far to only come this far.. ”
Lets take one step which will define our future and decide whether we will be ordinary or extraordinary.
👋 Join us in our journey and be a valuable part of our community. We will spread our knowledge by sharing our knowledge and ideas.
Prerequisites
Let us Begin !!
⚜️ Master core concepts in JavaScript
We have learned a lot of JavaScript topics till now. But things I am going to talk about now is necessary in order to understand JavaScript. Add following things into your JavaScript arsenal and you will be invincible in JavaScript domain.
All of these are necessary and important. Do not skip any of them. Keep practicing while going through each item.
⚠️ Click to learn more about prototypes, coercion, hoisting, and closure.
Playing more with functions
Functions are basic building block of programs. A JavaScript ninja must know how to play and harness the true power of functions. Till now, the knowledge that we had about functions is not enough for a JSNinja. We must have to learn more about functions, how and where else we can use functions and how to execute same function in different context of scope.
Lets upgrade our skills with functions. Go through each topics listed below —
⚜️ OOP vs Functional Programming
JavaScript is neither completely Object-oriented language nor functional programming, but we can do both using JavaScript. Lets move further and understand what does it mean.
Object Oriented Programming
The formal definition for Object-Oriented Programming is something like —
👨🏻🎓 Object-oriented programming (OOP) refers to a type of computer programming (software design) in which programmers define not only the data type of a data structure, but also the types of operations (functions) that can be applied to the data structure.
Some of geeks will surely understand the definition given above but I know there are a lot of people who will say, what the hack does these lines means ?.. So, let us understand the definition in plain text first —
Object Oriented Programming (OOP) refers to using self-contained pieces of code to develop applications. We call these self-contained pieces of code objects, better known as Classes in most OOP programming languages and Functions in JavaScript. We use objects as building blocks for our applications.
🔗 Still have confusion in Object-Oriented Concepts ? Click here and understand what really it means .
Learn the following concepts and they will help you becoming better JavaScript developer —
Functional Programming
At its core, functional programming is just programming with functions — pure mathematical functions. The result of a function depends only on the arguments, and there are no side effects, such as I/O or mutation of state. Programs are built by combining functions together.
In functional code, a function is not able to change the outside world, and the output value depends only on the given arguments. This allows to keep strong control over the program flow.
⚠️ Learn more about functional programming, click here. OpenSource.com has a beautiful post over functional programming. Check it out also.
📈 In JavaScript, Functional Programming is getting more popular than Object-Oriented. There are a lot of reasons for this, check out some of them.
⚜️ Design Patterns
A design pattern is a general repeatable solution to a commonly occurring problem in software design.
There are a lot of design patterns which programmers can use to solve different types of problems. Most common design patterns are listed below —
⚠️ In my recent interview, interviewer really asked me questions about design patterns. Click here to learn more about design patterns.
⚜️ JavaScript powering Servers
Oh Yeah!!. This blog series started with a line which was —
JavaScript is everywhere in the world now, dominating all other programming languages.
But till far, we are just practicing JavaScript in the browser or at the client-side. Then how in the world JavaScript become the most dominating programming language of the decade ? The truth is JavaScript is no more bounded with browser only, we can also execute it outside the browser.
Yes.. we can but the question is how ? and I am pretty sure you know the answer or encounter this term somewhere in your career, the answer is Node.js.
Node.js is the reason behind the success which JavaScript has now. Without it, JavaScript would not be able to came this far. We can execute JavaScript outside the browser scope using NodeJS.
Node.js is an open source, cross-platform runtime environment for developing server-side and networking applications. It is a platform built on Chrome’s JavaScript runtime for easily building fast and scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.
“ Now the questions that will come in everyone’s mind is that, Why the hell I will use Node.js at server-side ? I already have php, java, etc. What benefits does Node.js provides ?
For the answers of all the questions like them, Go through this… ”
The real power behind Node.js is that it has non-blocking I/O model which makes it efficient, powerful and fast.
🎬 There is a great video by Philip Roberts, just watch it 👇 .
After watching this video, you will surely understand how asynchronous code will behave. Now, start acting as a better JavaScript developer and start writing async / non-blocking code.
⚠️ To learn more about how to write async code, click here.
Thats It!!
Start playing with asynchronous code and explore more with your knowledge. Async code is not new in our path. We already learned a lot about callbacks and promises. Both of them are used to do async programming. But according to trend , callbacks are past, promises are present and async/await is future.
📑 Must read articles —
- The evolutions of asynchronous programming
- Understanding JavaScript async / await
- Why JavaScript’s Async/Await Blows Promises Away
About this post
This post is the third instalment to its series “True path to become a JavaScript Ninja”. Next will be on next Monday Morning at 08:00 AM (UTC+05:30). Stay tuned!
Happy Coding !!
🎧 “ The Last Samurai - A Way of Life ”.. peautiful music. Must listen.
If you like this article, please give it some claps 👏 and share it! If you do not like this post or have any type of questions regarding anything that i mentioned in this post. Feel free to ask me. Just post an issue in my “Ask Me Anything” by clicking here.
For more like this, follow me on Medium or Twitter. To ask a Question visit this link. More about me on my website.
Don’t forget to 👆 subscribe our weekly-newsletter service for web hackers. All latest articles and stuff like trending repositories, straight to your mailbox 📬.