With that said, its success wouldn't be possible without expansion into new territories. As many web developers probably know, JS is no longer bound by the browser window.
However, for beginner programmers, it might not be so obvious. And so, I'd like for this article, to be a little, beginner-friendly showcase of JS use-cases and possibilities.
Node.js also played a crucial role in the creation and rapid expansion of Node Package Manager (NPM). Its repository currently houses over 1M of both Node.js and browser-compatible open-source JS tools and libraries - all serving the good of the JS community.
While Node.js is primarily used on pure server-side, its capabilities stretch far beyond that. Its success went on to inspire others to make use of JS in different areas of the programming industry. And so, the Electron framework is a tool using both Node.js and Chromium, which lets you create full-blown desktop apps with the website-like toolset, i.e. HTML, JS, and CSS.
Electron apps are quite easy and fun to create. You can pretty much take a usual website and make it into an Electron app. That's all thanks to it being, to put it simply, just a Chromium web browser, with some additional Operating System (OS)-level features.
Furthermore, you might be using an Electron app without even knowing it. That's due to it being used by really popular apps such as Skype, Discord, and Slack.
Because Electron is for desktop OSs only (Windows, Mac OS, Linux), mobile apps require their own category.
Hybrid mobile apps
There are multiple ways of making a mobile app in JS. The first one involves the so-called hybrid mobile apps. These, in simple terms, are just usual "native" apps with a WebView (a limited browser-like embed) inside them, running the provided HTML, CSS and JS code. So, essentially, it's very similar to the Electron on the desktop, although here, the framework's name is Apache Cordova. However, hybrid mobile apps, although easy to create, have no performance benefits over a usual website. Thus, on a mobile device, where computing resources are limited, such apps can often underperform. That's probably why they're currently being cast aside in favor of a new technology called PWA.
Progressive Web Apps (or PWAs for short) are nothing more than usual websites, with some performance and offline-mode enhancements included. If the user's browser provides such functionality, they can be pinned to the main screen and be opened without the search bar, giving them a feeling of usual native apps. And as the same technology works also on desktop, developers can simply create compatible web apps and enjoy all the benefits of PWA without much additional work.
But, if you want your app to have even more "native feel" through increased performance, and availability on the local app store (PWAs are only starting to be allowed there), then there is one more option.
Frameworks like React Native and NativeScript aim to allow developers to write mobile apps with web technologies, but with the feel and performance of native apps. They achieve that by converting your code into a more platform-optimized version while retaining the ease-of-use of JS and related technologies. This approach to creating mobile apps is much more widely-used, with some really prominent apps like Facebook, Messenger, Instagram, Pinterest, Skype, Tesla and many more using the technology.
It might seem like JS, as an interpreted programming language, is not suitable for small, resource-conscious embedded devices. Surprisingly enough, it made it even there!
So, we've pretty much covered most of the programming areas already, but JS stretches even further. No, we cannot make a whole OS using this language, but if we look closer, we can see start noticing smaller use-cases appearing.
Take Adobe Creative Cloud software for example. Even though e.g. Photoshop isn't written entirely in JS, you can still use this language to write expressions and plugins that can accelerate your productivity and comfort of use of the tool!
In the end, it seems like JS is pretty much everywhere. Surely it's not true, but the sheer number of areas that it has expanded into is very impressive. And with this expanding ecosystem of tools, libraries, and frameworks, and ever-growing community, it seems like JS isn't going anywhere anytime soon!
If you like the post consider sharing it and following me on Twitter, Facebook, or through my weekly newsletter. If you're interested, I also recommend checking out my YouTube channel. Again, thanks for reading this piece and have a nice day!