This content originally appeared on Bits and Pieces - Medium and was authored by Fernando Doglio
You know that meme where they try to run Doom on anything electronic with a screen and some kind of input?
Well, we’re starting to see that kind of behavior with JavaScript these days, given how versatile the language is and how big and active the community behind it is, we have so many different uses for JavaScript other than its original target, browsers.
So let’s take a look at how our favorite programming language is everywhere to the point where we can start thinking about a future made entirely of JavaScript.
It’s everywhere for developers
It’s hard to point out to non-developers how something is done using JavaScript as they will most likely miss the relevance of the affirmation. But we developers can see behind the curtain and we understand the relevance of the tech behind our favorite products.
That said, as we’re about to see, JavaScript can be part of both, our technical lives as well as our personal ones. Because as I already mentioned, we’ve left the confines of the browser years ago, mainly thanks to Node.js which popularized the fact that we could run JS in any backend, and it was all downhill from there.
JavaScript on hardware
This is probably the biggest use case that puts JS in our everyday lives.
Libraries like Johnny-Five and others allow you to embed and run your JS code into almost any type of open-source hardware. While of course there are limitations and you won’t be able to pick up any chip and program it with JS, the truth is that if you’re willing to oversize your electronics and put an Arduino inside your product (for example), you can literally create any hardware that runs on JavaScript.
Don’t believe me? There is even a project called Espruino that provides all the hardware, manuals, and even development environment for you to learn and hack your way with JS.
This is just the beginning if you ask me, given how easy and flexible the language is, it lends to the raise of hackable hardware, a trend that is becoming more popular every year. Heck, you even have an open-source SmartWatch which you can hack using JavaScript, the Bangle.js.
Open hardware, coupled with open-source software and creator tools such as 3D printers evolving rapidly makes for a fantastic brewing ground for a new generation of hackers. Only they will be able to build their own electronics and appliances directly in their homes and program them using high-level APIs written in JS.
JavaScript for AI
While Python is still the more popular option here when it comes to doing some serious AI programming (I’m talking about developing new ML models, or doing some heavy data processing), JS is not far behind.
In fact, you can already write software that takes advantage of trained ML models using JavaScript thanks to libraries such as:
- TensorFlow.js allows you to run trained machine learning models directly from your browser or chosen runtime.
- Brain.js, a library to perform neural network optimization using GPUs that can run both, on the browser and on Node.js.
- ML5.js which builds on top of Tensorflow to simplify even further your access to machine learning models directly from JavaScript.
- Syntaptic.js, another library for the creation of Neural Networks directly on the browser or any other compatible runtime, such as Node.js.
There is still a gap between the ecosystem that other communities present for the AI field vs what JavaScript has to offer, but this is only going to keep on growing considering how the language is being ported to more and more platforms every year. It’s just a matter of time before the AI community sees the real potential of bringing AI everywhere thanks to JS.
JavaScript in game development
While you won’t hear about tripe-A games written entirely in JavaScript just yet, the language is slowly making its way into the industry.
While it is true that Unity, for example, dropped their support for their JS-like language, JavaScript itself has everything you’d need to make a game, at least one that can run on the browser.
And don’t get me wrong, that’s not a bad thing per se, browser graphics have evolved quite a bit since they were originally conceived, and you can get some interesting results rendered directly on your browser and still take full advantage of your computer’s GPU capabilities.
Granted, the AAA industry is still far away from accepting JS as one of their standards, but the technology is already there. The browser API allows you to deal with everything you need from input handling to hardware acceleration, so it’s just a matter of time before we start seeing the first triple-A games published by independent game studios looking to keep their costs low.
In fact, I’d go a bit further, if in 2012 this guy could get a full JS runtime to run on that year’s version of the XBOX, it’s only a matter of time before we start seeing runtimes for all major platforms. Once one company develops it and gets it approved, many will follow.
And if you’re only interested in game development for the web, you might want to check out this list of the top 9 game dev libraries to use with JS:
9 Top JS Gaming Engines and Libraries for 2020
Web3 and the relevance of JavaScript in this new world
Everyone and their brothers are talking, writing or just reading about the new distributed and blockchain version of the web: Web3.
It’s the future of the web they say. It’s also completely JS-dependant, at least at the moment.
While you won’t be coding your smart Ethereum contracts using JavaScript anytime soon, you will be using libraries such as Web3.js to interact with the blockchain to create your dApps (your distributed applications).
Heck, you can even create your own blockchain if you have to, using JavaScript. This is still a brand new playfield and it’s hard to predict exactly how it will evolve, but one thing I’m certain of is that JS will play a part in that evolution.
If you liked what you have read so far, consider subscribing to my FREE newsletter “The rambling of an old developer” and get regular advice about the IT industry directly in your inbox.
JavaScript for mobile development
This one should not be a surprise to anyone, considering we’ve had the ability to write hybrid applications for mobile for years now.
But thanks to projects like React Native, you can also create applications that will take care of using your phone’s native API for UI presentations. This definitely beats the hybrid approach in performance, and since it’s still compatible with all major mobile OS, you can still get the benefits of using a single language for all platforms.
Applications like Skype, Facebook, Uber, Discord and many others are already taking advantage of this native tech, which is a clear hint at the type of future we can expect for the mobile industry: one made up of JavaScript.
At this point one could argue that within the next few years we’ll keep seeing new use cases for JavaScript pop-up everywhere. And one would probably be right, since the language’s own evolution shows that it is adapting to the growing demands of its tireless community willing to take it everywhere with them.
Where will we see JavaScript next? My guess is that we’ll start seeing it inside more devices as soon as we realize how powerful of a tool it is and how easy it is to embed it on wearables and the like. I’ll also expect the eventual migration into consoles once game studios start realizing the power of the language and its game-making capabilities.
What about you? Where do you see JavaScript popping up in the near future?
Build applications differently
OSS Tools like Bit offer a new paradigm for building modern apps.
Instead of developing monolithic projects, you first build independent components. Then, you compose your components together to build as many applications as you like. This isn’t just a faster way to build, it’s also much more scalable and helps to standardize development.
It’s fun, give it a try →
Learn more
- Building a React Component Library — The Right Way
- 7 Tools for Faster Frontend Development in 2022
- Microservices are Dead — Long Live Miniservices
A Future Made of JavaScript was originally published in Bits and Pieces on Medium, where people are continuing the conversation by highlighting and responding to this story.
This content originally appeared on Bits and Pieces - Medium and was authored by Fernando Doglio
Fernando Doglio | Sciencx (2022-03-01T08:01:21+00:00) A Future Made of JavaScript. Retrieved from https://www.scien.cx/2022/03/01/a-future-made-of-javascript/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.