The FUTURE of JS
# Disclaimer: This is just an opinion article #
It’s not a secret that JS has an endless amount of frameworks, most of which exist only for making the life of a developer easier.
There is almost no new functionality in the base ES, unless it’s added by an official authority. What this means, is that VanillaJS, as it is right now, gives you all the functionality you need. Almost all the rest- are just addons for better syntax, code styling, time saving and comfort.
In a world like this, where 2 new JS frameworks were created while you were reading this intro, there’s going to be a dilemma at some point; If hundreds of thousands of people use ES6 or future ES7, when does it become the standard, and how can you ensure that all the target platforms support it?
It’s a tough one. There are known authorities that are responsible for the standard, and each browser creator has the responsibility to support that standard.
Maybe in a perfect world- it would work exactly the way we want it to, and all the browser creators would support new syntax and features as they come out. But unfortunately, it’s not the real world.
Maybe you can trust companies like Mozilla and Google to be up to date. But when each smartphone company has it’s own browser (like ASUS browser, Samsung browser, LG browser, etc.) — you can’t count on the new feature being there when needed. Even though those mobile browsers are usually based on standart webkit base, you still can’t
So there’s a thing called “polyfill” which takes care of missing functionality. it’s basically a bridge between a new feature and the legacy browser. It’s nice and everything, but it has a big impact on the deployed app’s size & performance. This means that an end-user from India with an old smartphone might have awful experience on your website because of long loading times and waits.
How is it going to be resolved?
The way I see it, there are 2 options:
- The endless frameworks era will end.
- The polyfill world will improve.
I believe that the first option will happen, but neither fully nor globally. As of today, using various frameworks is super trendy. It is also very useful, but lots of times- it’s an overkill. Trends have the tendency to pass, new trends come and go. Today it’s fashionable to use react, but maybe in a few years- the fashion will be writing clean and native JS code. Or maybe react will become such a basic framework, that it will be the new standard, and all the rest — will be just toys.
The second option is already happening, but not fast enough. I believe that at some point, the polyfill world will become a core part of the browser, and will automatically try to resolve missing features from global repositories, Just like an automated version of the NPM.
At the end, JS will never die. what will happen to it? It’s up to people that write on Medium to decide.