Usages of JavaScript

1. Front-end development

One of the most known usages of JavaScript is in the front-end. In fact, that’s what it was created for and it has become one of the core web technologies. The most basic usage is providing interactions like reacting to user events and providing interactivity on the web page. However, it has evolved with time and now whole pages are rendered with it. These web pages can contain more advanced elements like interactive charts, diagrams, games, and video calls. 20 years ago, the Web was mostly just text; now it contains fully-featured apps thanks to the many and varied usages of JavaScript.

For front-end development, a number of indispensable frameworks and libraries have been created, including jQuery, React, Angular, and Vue. They commonly provide a simplified way of handling page elements, which makes interactivity much easier.

In time, it is possible that JavaScript will be dethroned by WebAssembly, but it’s unlikely that browsers would move entirely to it. JS is too tightly bound to web development to just disappear.

2. Back-end development

In 2009, Ryan Dahl created Node.js. It’s one of the most important dates for JavaScript developers because, since that time, JavaScript has also become a real server language. There were prior attempts, like Netscape LiveWire, but they never gained such popularity. Node.js, in fact, is just a running environment for JavaScript based on Chrome’s V8 execution engine. To add real server-side features, Node.js introduced functionalities to JS such as file system support, full networking (DNS, HTTP, SSL, etc.), cryptography, binary data buffers and data streams.

Currently, Node.js is mostly used for microservices and simple backends. The most known framework used by backend developers is Express. It provides simple-to-use bindings for HTTP calls. However, there are also other interesting ones like NestJS, which provide an architectural style more similar to that known from C# or Java.

It’s also worth mentioning that Node.js isn’t the only way to run JavaScript on the server. 2018 saw the initial release of Deno runtime. It’s also made by Ryan Dahl and, in his own words, it’s designed to fix all the mistakes made in Node.js. Maybe it will become a new standard some time?

3. Mobile development

It’s not obvious for many, but this is one of the steadily growing usages of JavaScript. It’s common to associate Android devices with Java or Kotlin and iPhones with Swift or Objective-C. But it’s important to know that these are not the only choices; you can also create mobile apps with JavaScript in two different ways.

The first is creating traditional web pages that are run as an app. This can be done with frameworks like PhoneGap or Cordova, or by creating pages as Progressive Web Apps.

The other way is to use frameworks like React Native that allow us to develop mobile apps in JavaScript, which are then compiled into native apps. It has continuously growing popularity and you can find some successful projects which were made by ValueLogic in this way. Thanks to the excellent community support, there are many native functionalities already accessible at the JS level. Even when something isn’t already done, React Native can be extended by writing the native code. Other similar choices are ReactXP and NativeScript, but they are not as popular as React Native.

4. Desktop applications

Desktop applications are the missing piece of the puzzle when we think about the usages of JavaScript. At least in the eyes of some who don’t realize that JavaScript can also handle this. Thanks to frameworks like Electron or NW.js, we can bring fully-featured web apps to desktops. Of course, Electron and NW.js are web browsers with limited functionalities, but they also add few things that let us do the usual desktop things. Most interestingly, such desktop apps are cross-platform, so we have one code for Windows, macOS, and Linux. You’d be surprised how many well-known apps are made this way. Here are a few popular ones that might surprise you: Teams, Slack, Skype, Spotify, Visual Studio Code, and Discord…

5. Browser add-ons

Another of the prevalent usages of JavaScript is the development of browser add-ons. Currently, we have one common standard for all the browsers called WebExtension API. It’s slightly different between Chrome and Firefox (and even between desktop Firefox and mobile Firefox), but the core functionalities are the same. So, whenever you install any browser extension, it’s done in JavaScript. Or, if you’d like to create your own, you need to call on JavaScript developers.

6. Microsoft Office add-ons / Google Apps Script

The last usage of JavaScript I’d like to write about is creating add-ons to popular office suites. Both Microsoft Office and Google Apps can be extended with JavaScript. In Microsoft Office, nearly every app (including Teams) can have add-ons written in JS. These add-ons were once developed in C# and could only run in Windows versions of apps. Thanks to JavaScript, these add-ons work in all versions of Microsoft Office, including Windows, macOS, and even Web! Our JavaScript developers also have expertise in this field, so if you’re interested in customized add-ons for MS Office suite, contact us.

More interesting information? Click here: Svelte JavaScript framework