It’s omnipresent, well settled on servers, and it becomes increasingly popular in the world of mobile and desktop devices. JavaScript is one of the most popular programming languages in the recent years. This is confirmed in the annual StackOverlow research, in which JavaScript was found the most popular for the sixth year in the row.[1] There’s nothing strange about it, as the ground breaking upgrade of this language, i.e. ECMAScript 2015 (or ES6), which has significantly improved the comfort of work, had been deployed three years ago, and it is currently implemented in c.a. 97% of all new versions of the most popular runtime environments.
The most commonly used environments are web browsers, which are dominated by JavaScript, as it has been developed for this particular purpose. Frameworks, such as Angular or React, have revolutionised the method of building web services by making browser clients more and more responsible, while the front-end of many apps has become far more complex and oftentimes resembles traditional desktop applications. JavaScript is no longer viewed as a simple toy for animating forms, and community around it has significantly expanded. This resulted in the development of new tools, and so currently the process of client app development resembles the ones associated with mature Enterprise solutions. Also, new languages have been transpiled to JavaScript, both inspired by the object-oriented traditions of Java or C# (TypeScript[3]), and functional approach (Elm [4], ReasonML [5]). Apart from expanding, or almost completely altering the syntax, these technologies introduced static typing during compilation, which results in less errors and faster software development, in particular in large projects. Deployment, versioning, building, and testing at various stages – all these steps can easily be automated with the use of tools created by the community, which includes major corporations such as Facebook or Microsoft.
A major factor influencing the interest in JavaScript is its expansion to other platforms. The potential of this language has been spotted by the creators of Node.js, which marketed in 2009 and has been increasingly popular since then. Asynchronous operational model of Node.js enables high scalability, and expressiveness of this language results in high speed of app development, which makes this platform a perfect choice for numerous projects, especially in the world of microservices. In Node.js, simple prototypes can be created instantly, and for project structuring you can use numerous more or less sophisticated frameworks – from Express [6] or Hapi [7], to Angular-inspired and TypeScript-based Nest.js [8].
Also, there are JavaScript version of mobile apps (thanks to React Native [9]) and desktop apps (Electron,[10] used for building a couple of the most popular code editors – VSCode and Atom). Such variety of applications results in blurring the line between different platforms. By selecting JavaScript, you can create a homogenous programming environment, where a single developer can build a server app, a web client, and a mobile client, using the same language and toolset. This significantly decreases the cost resulting from “switching the context” between various technologies, and in some cases eliminates the need for hiring different experts in each particular field.
As usual, not everything is as perfect as it seems. Due to its huge popularity, this language offers huge amounts of libraries and materials, but their quality is not always satisfactory. One of the reasons may be that JavaScript is one of those technologies that you can easily enter into, but it’s way more difficult to master. The abovementioned expressiveness and the lack of strong typing means that it’s easy to shoot yourself in the foot by not understanding the mechanisms of the language. What’s more, Node.js is not a remedy for all ills – it uses a single thread, which means it’s not an ideal choice for apps requiring large numbers of calculations.
JavaScript has a very strong market position, and it doesn’t seem that any other technology is going to change that anytime soon. If you choose this language as the primary language for your project, while taking into consideration its strengths and weaknesses, and looking at it in terms of the actual requirements of your project, selecting this technology may be a very good idea. You can shorten the software development time (e.g. by sharing business logic between different platforms), and thus cut your costs. Thence, when selecting a technology for your project, consider JavaScript (or other languages transpiled into it) as one of the available solutions.
- “Stack Overflow Developer Survey 2018.” https://insights.stackoverflow.com/survey/2018/. Accessed on 28th May, 2018.
- “ECMAScript 6 compatibility table.” https://kangax.github.io/. Accessed on 28th May, 2018.
- “TypeScript.” https://www.typescriptlang.org /. Accessed on 28th May, 2018.
- “Elm-lang.org.” http://elm-lang.org /. Accessed on 28th May, 2018.
- “Reason ML.” https://reasonml.github.io /. Accessed on 28th May, 2018.