Steve Loar

Web developer, horse rider and maker of small tables.

Ponies at Lost Valley Ranch

Why is JavaScript so popular in web development?

JavaScript's current popularity did not happen overnight. It was created in 1995 by Brendan Eich at Netscape to give some small scripting ability to their Navigator browser. Since then the language has slowly improved over time and become a language known by all web developers.

JavaScript has always had some advantages that were initially overlooked and ignored. It does not need a server to run on. You do not need to compile it. The browser handles that part for you. And it comes with every browser, so you do not need to purchase special software to run it. That browser that it runs in comes with built in security that prevents JavaScript from harming your computer, so you do not need to worry about that either. These all make the entry into JavaScript programming low enough that all can learn and experiment with it.

Along the way, JavaScript got some help in its acceptance and popularity by other changes in the world of web development. Early in the history of web browsers, their makers did whatever they wanted and things did not work the same, or even look the same between browsers. This made web development and design difficult. A grass roots movement of designers and developers pushed the browser makers to adapt standards to make it easier to create consistent web page experiences between browsers. This resulted in a standard Document Model (DOM) that JavaScript could then access and manipulate. You no longer needed to write seperate scripts for each browser. People could do things like form validations, and image manipulations. Some powerful libraries like jQuery were created on top of JavaScript that made working with the DOM easier. And as it became more popular, people started looking at JavaScript to do their own things, build other libraries or add more functionality to jQuery. Then another technology started to become popular that allowed the browser to behave more like a desktop application. This technology is AJAX and JSON. AJAX allows JavaScript to send and recieve data with the server without the web page being refreshed. JSON is a data format that is easy to work with in JavaScript.

Today, JavaScript is running outside of the browser on the server. libraries like Node.js make this easier to work with. On the browser side, AJAX and JSON are being leveraged in new JavaScript libraries like Angular.js, or Backbone.js, to create seamless experiences for web users. The popularity of JavaScript looks like it will continue as new technologies allow it to do more things.