Gone are the days, where JavaScript developers were primarily seen as front-end developers, typically bound to the web browser. Today JavaScript is everywhere and is touted as the crown jewel of programming languages, the popularity can be clearly seen in Figure 1. The growth of JavaScript ecosystem coupled with the rise in popularity has literally changed the face of web development. For instance, earlier from only browsers it expanded to the server and now it’s become more extensive. Right from mobile apps, IoT devices, Bot Frameworks, 3D games and even Virtual Reality can be developed using JavaScript.
Figure 1 Stack overflow developers’ survey
(Source: https://insights.stackoverflow.com/survey/2019#technology)
So, still wondering what led to this emergence and popularity of JavaScript?Here are some interesting features I opine that contributed to the popularity of JavaScript.
Ease of Use
Relevant frameworks and libraries are available online. JavaScript code is executable on the browser (client) as well as the server, and doesn’t require complitation at the client side . It has the ability to support functional as well as OOPS programming style. The presence of numerous JavaScript frameworks and libraries enables to develop both web and mobile applications.
Accessibility
We know that the success of any product depends on the ease of access. In this regard, this salient feature “accessibility” has made possible the growth of JavaScriptand its community. The online community provides relevant solutions to common problems, which is another reason that developers prefer JavaScript. As a result,the community has fostered creativity and innovation thus forming an integral part of JavaScript’s progress and evolution.
Performance
Being an interpreted language, JavaScript tends to be lighter and faster and less bulky than Java.This coupled with scalabilityand ease of use makes it ideal for most tasks.
Code Sharing
The package managers in JavaScript are intuitive and easy to use. These package managers and hassle-free environment allow the developers to share the code, thus saving a lot of time.
Editor/IDE support
No need of full-fledged IDE, allows developers to use lightweight editors such as Atom, VIM, Emacs etc.
Signs of constant innovation and adoption
Gradual rise in number of environmentshas led the JavaScript developers to create and explore new platforms. A classic example of Netflix utilizing Node.js for their front-end web applications. Besides, it serves as a great choice for developing cross-platform native applications.For instance, React and React Native is widely employed by Facebook, companies like Microsoft and Github have adopted electron.js to aid the development of cross-platform desktop applications.
Having gained an outline of JavaScript, let us dive into some of the essential JavaScript frameworks and libraries.
Node.js
Node.js is an open-source, cross-platform JavaScript run-time environment which allows to execute code outside of a browser. It has variety of applications, right from running the backend of websites to controlling robots and IoT applications on cloudplatforms.It is built on Google Chrome’s V8 engine.
React.js
React is a versatile, declarative and comprehensible JavaScript library for developing interactive UIs. Based on the data from NPM trends, the usage of different libraries, frameworks have been plotted in Figure 2 and percentage change in growth over a year has been tabulated in Table 2. The number of downloads statistic indicates that React.js is way head compared to other libraries which confirms that it is popular among developers.Further React.js has seen a swift growth since its inception by Facebook in 2013. Other attributes include ease of management, efficiency, ideal for large web applications, processes the data without page reloadings, SEO friendly and at last its reusable components which reduces the development time
.
Figure 2. JavaScript libraries usage trends
Table 1. Growth of JS libraries
Framework | Jan 28th 2018 | July 21st 2019 | Percentage change |
React | 779709 | 5050896 | 547.7% |
Angular | 133806 | 465417 | 247.8% |
Node | 14282 | 45924 | 221.5% |
Vue | 129299 | 1004463 | 676.8% ? |
Electron | 57176 | 198729 | 247.6% |
Angular
Angular is a full-fledged framework which can run in any platform. It is robust and mature when compared to React, besides it is primarily used for developing single page applications. It is maintained by Google and predominantly used in Google Fiber and AdWords. Though Angular is catching up, from Figure 2 it can be inferred that it is still behind React in terms of usage. Some of the influential factors include two-way data bind, components that support content projection, and Angular CLI as a decision making tool.
Vue.js
Vue.js is a relatively new JavaScript library that gained traction since 2018. It is easier to learn, thanks to excellent documentation coupled with numerous live examples. Moreover, it enables the developers to convert parts to old application to Vue without any rebuilding process, meaning enables to test small parts of the application without altering the entire application.The striking aspects of Vue.js are its clarity, simplicity, versatility, performance, enables to implement great UI ideas, easier to control the look and functionality of UI, provides proxy support, SVG animations and stable API.
Electron.js
Electron.js is a run-time framework which enables the user to create desktop-suite applications with JavaScript, CSS and HTML5. In a nutshell, it is an amalgamation of Node.js and Chromium.While developing a Desktop application the user needs to focus on certain secondary aspects like simplification of installation and packaging, optimization of crash reports, supporting native menus, dialogs and notifications. In this regard usage of Electron.js addresses the aforementioned aspects, thereby allowing the developer to concentrate only on the core of the application. In addendum, it has the ability of auto-updating and crash reporting on Windows/Mac with Squirrel.
Final Notes
As a developer if you need your apps to be used by most people, then JavaScript is a great choice. The combination of all the above discussed features makes it more powerful and popular, which no other programming language can offer. Besides in this era of application development where speed, flexibility and versatility are highly valued, JavaScript is one of the valuable skills to have. Finally JavaScript is literally your canvas, now its time to paint the lily!