Why JavaScript is the future of software

I have been using JavaScript for a long time but the full extent of its potential didn’t really occur to me until recently and now I am convinced that JavaScript, of all languages, is the one which will carry us into the next epoch of software development.

Not so long ago, like many other software developers, the web projects which I worked on were mostly written in PHP (often using a PHP framework like Zend, CodeIgniter or a custom one) – JavaScript was just an add-on, optional feature meant to ‘enrich’ the user experience. Today it’s been over a year since I’ve been coding almost exclusively in JavaScript (both for my personal projects and at work) and I am hooked. I have a pretty broad software background (C/C++, Java, Python, ActionScript3, C#, AVR assembly and maybe a few others) so I hope that the following analysis of JavaScript is fair and accurate.

There are several aspects of JavaScript which make it a really great language to work with – One of the most important aspects for me is its conciseness and its versatility – Of all the languages that I’ve used, JavaScript is the best when it comes to turning thoughts into code – Everything is either an Object, a Function (which is also an Object, technically-speaking) or a primitive and once you understand the relationship between these three basic types (which can take a little bit of time), JavaScript becomes really easy and fun to write. Another cool aspect is that JavaScript is ideal for dealing with asynchronous logic; JavaScript allows you to define functions wherever you want – This lets you execute code asynchronously without losing the scope of the current function (this can be done using an inline callback) – This is a HUGE advantage and can save you hours (dealing with multiple parallel processes is ridiculously simple in Node.js – Especially when compared to C++).

The other, and possibly the most awesome thing about JavaScript today (which I alluded to in the previous paragraph) is the fact that you can run it on either the client side (in just about any browser) or on the server side using engines such as Node.js – And I think that this feature is what makes JavaScript the language of the future – No other language has managed to be standardized so formally by so many different companies, browsers and platforms as JavaScript. As an example of this, for the past couple of months, I’ve been doing some contract work building a framework for a major set top box company (who make those devices people plug into their TVs) and guess what the framework is written in!
It’s not actually Node.js (it’s using a custom engine based on WebKit) but yes, JavaScript! A couple of years ago, JavaScript was only for the browser on a PC, then it moved to mobile phones, then it got traction as a server-side language and now it’s moving to embedded systems!

Several decades ago, Mark Weiser ( https://en.wikipedia.org/wiki/Mark_Weiser ) who is often referred to as the father of ubiquitous computing theorized that computers would become the fabric of our everyday life – And today this sounds more like reality. We’ve had the internet, iPods, smart phones, tablet computers, internet TV, and now we are about to get smart watches and Google Glasses! Let’s face it, all of these devices will run on completely different firmware/operating systems and will be produced by different companies.
Here is the selling point of this article: JavaScript is currently the only language which is in a position to bring all of these devices together to allow them to interoperate.