You probably hate JavaScript. And there is a good reason for that. Since the late 90s, JavaScript has been on the rise, primarily because of the rise in web sites and applications that use it.
Early incompatibility between different browsers lead to the development of various libraries to handle various differences. The most popular one at this point is jQuery but there are and have been a lot others. During the great incompatibility period, many developers shed JavaScript because of the troubles supporting different browsers.
Actually the fact that JavaScript was only able to run by being embedded in HTML shown in a browser somehow made it less attractive for many developers, especially those with no interest in web development.
Here are the 5 main reasons I think you should forget about all your previous reservations and start coding JavaScript right now:
1. It is the future
Whether you like it or not – JavaScript is the future. The future of software is “through the browser” and JavaScript plays a significant role in the experience. As software became a commodity, users became more and more aware of responsiveness and latency. Even if they don’t use these terms, the applications that are most loved are the ones that feel snappy and responsive to the user. In web applications, JavaScript can be used to make the application behave more dynamic and do stuff asynchronously to make the application seem faster and live.
2. It is easy
It really is. You just type away and refresh in your browser to see the result. Seriously – try to set up development environment and IDE for something and you’ll know what I mean. Every computer in the world (more or less) has a browser installed and therefore include a JavaScript interpreter. Combine that with a text editor and you are already started! Besides – if you see something on another website you like, your browser can show you the source and you can be inspired for your own code (please remember relevant copyright law example.).
3. You will understand that web stuff better
If you have a good – or at least a basic – understanding of how JavaScript works, you will understand all that web stuff better. You will understand why some websites and/or web applications make you feel good and some make you feel sad. You will understand the mechanics at play when you click away. And as a side effect – when something you use and depend on breaks, you will investigate and maybe have a good idea why!
4. You can make powerful stuff
JavaScript has moved. Actually expanded. It is no longer only living in the browser. Check out node.js – by installing this, you will have a JavaScript interpreter you can run from your command line along with a very powerful library of functions. Gone are the days of making shell scripts with cryptic languages made in a different age – with node.js, you can make very powerful scripts that do all the web and database stuff you actually need – with ease!
5. JSON
JSON is very cool. It is really not that big a deal – except when you start using it, you will throw away XML and every other format you have experimented with for transferring and storing your data. JSON is easy to read and write for humans – the best part of this is that if you use JSON with JavaScript, the interpretation is done by the runtime – no code needed.