Tue Nov 22 2016
Paul Shan
Though JavaScript is growing super fast and has already became the most popular language in github and stack-overflow; there are a lot of misconceptions or myths about JavaScript. I still remember when I started involving myself into JavaScript, few of my friends who were working with Java or C# used to stare at me like, hey bro, why are you downgrading yourself?. :D
JavaScript is one of the most misinterpreted language probably because of its name where there are two parts, Java
and Script
. Few thinks it has some relation with Java and a lot of people think it’s a scripting language which is kind of a subset of programming language and not a fully grown language.
JavaScript was being developed under the name Mocha
on May 1995, but while releasing the first beta version Netscape (the company who created it) named it as LiveScript. On Dec 1995 they again renamed it as JavaScript. Few people think it happened because Netscape started supporting Java technology in its Netscape Navigator web browser; while some other claims it’s because of the co-marketing deal between Netscape and Sun Microsystems.
Many thinks JavaScript is not as powerful as other languages like Java, Python etc. It is neglected language which was created just in 10 days.
Though JavaScript was created in 10 days only and when released it used to cover a very small portion of a proper programming language; but since last few years, JavaScript is growing like anything. There are huge number of JavaScript frameworks and plugins available. EcmaScript version 6 (which is the draft of JS) brought significant changes in JS to make it more powerful. ES7 and 8 are also targeting the same. But even today, there are many improvement scope in JS.
JavaScript is last few years has been evolved so much that working in browser has become just a part of its entire ability. Below are few points to support JavaScript’s ability :
Well, forget about non-JS people; till ES5, even many of those who were working with jQuery etc didn’t know JavaScript is object oriented. You can do both functional and oops using JavaScript. From ES6 onwards there are keywords like class
extend
etc for proper syntactical object oriented support. But even in ES5 or before creating class (not class, but constructors, which works like class), object, polymorphism, inheritance (which is prototypal inheritance) and everything else was supported in JavaScript (not in the first few versions though).
As JS didn’t have any IDE for years (even today also the quality of them are not good), some people had a misconception that console.log() or alert() are the ways to debug JavaScript. Even when I joined my company I saw people working like that.
But browsers has great developer tools to help people debugging JavaScript properly. Even backend JS like Node also have tools or plugins to help you debugging.
JavaScript is single threaded. So lot of people who are into multi threaded programming thinks it will work slow as it won’t be able to use all the cores of the cpu properly.
Well, JavaScript is asynchronous and event driven. So for any kind of IO operation JS is best suited. So it’s definitely not slow. Now, what in case of tedious work? Will it be really slow? It depends on the developer. There are web workers for kind of multithreading
in JS. He can also distribute tasks in different application instances. So may be the tedious tasks will also not be that slow.
May be years ago, there was an era when many people coded in JavaScript in a very inefficient way, with no design patterns and completely unmanageable codes. But those days are gone. EcmaScript has improved it’s specs, there are great design patters, many frameworks like ember forces some consistent ways. Even there are ways to compile JavaScript to a certain extent using webpack etc.
So it’s certainly not inconsistence. Consistency is like beauty. It lies in the eyes of the beholder :)
SHARE THIS ARTICLE
Thu Mar 10 2016
OAuth authentications are pretty popular now a days and another thing which is popular is JavaScript. This article shows how to plugin google’s oAuth api for authentication in your own node application.Sat Mar 01 2014
This is a continuation of my CSS3 loader snippet collection series. I've provided spinning css3 animation loader in the part 1 of this series and here in part 2, I'm providing various square type loading