Why javascript is so popular

Most points have been given in other answers. Just few other points.

Important Link

It is clearly due to the rise of web applications. The convenience of a web application where you can host it centrally and keep updating a single codebase to immediately add functionality / fix bugs for all your users is a major reason. Installed apps had a major overhead in effort and delay due to release management etc. So, most functions r moving to the web. Nobody really planned this and JavaScript happened to be the language there. People built systems and then realised it needs improvements. So, there is a huge effort today to improve it. The new ES2015 standard is one example. Also, Chrome, Firefox made big improvements in power and speed of their engines running JavaScript. All this has brought us here.

Not that there are no competitors. Google itself is building Dart which may 10 yrs down the line take up a significant share but not sooner.

When big players decide on something and push it big time, a wave comes. That’s what is happening. 

The 4 stages of web devlopment. To illustrate how much of a push is happening and what to expect. All changes are driven by javascript. : 

  • The web for long used to be more of HTML and CSS with JavaScript playing a small role of just say validating a form, submitting it etc.
  • Then came the age of ajax. Obviously, it made no sense to replace a whole page HTML if just one small thing changed. So, we relied on CSS selectors (jquery a classic example) to do DOM manipulation. But soon this got messy and unviable for larger apps.
  • Many MVC frameworks came up which allowed data to exist locally and separate the view and controller and give a more reasonable way of handling changes. Backbone, Ember were the main. Then came AngularJs and suddenly seemed to sweep all away. Not so really. It did 2 things. Firstly, covered all parts if what a developer wanted including routing, fetching / sending data to server etc. Secondly, gave the two-way binding which released people from direct DOM manipulations. Lovely. All dirty-checking taken care. Trouble though was performance. So, for large apps, its not a great idea. That’s why they themselves are moving away in Angular 2.
  • Facebook meanwhile was quietly building a great solution coz Facebook itself is one of the most complex and large web apps around. They put their solution out in the open called React. Initially people reacted with caution but it has clearly emerged as the ideal method. It uses a virtual DOM to build / update views. Along with Flux / Redux, it is now changing the game allowing for building large apps and maintain them more easily.

Lastly, with NodeJs coming and huge community following, the LAMP stack is being replaced with stacks like MEAN (Mongo, Express, Angular, Node). Does not stop here. JavaScript is becoming the choice for cross platform app development. For Android, iOS etc too. See Hybrid apps space.

Large organisations have realised that its a great bet to take and they are sparing no effort to improve everything in the ecosystem. Hence, the growth. Its going to be a major force for the next decade. 

Leave a Reply

Your email address will not be published. Required fields are marked *