I still think of it as a quickie love-child of C and Self.
Johnson’s words come to mind: “the part that is good is not original, and the part that is original is not good.
I mean, it’s everywhere.
Don’t take my words for it, it’s by far the most popular programming language (considering you can’t do much with HTML & CSS without JS)[Source]Why is that?For answers, we need to look at the amazing ecosystem that was built on it.
We’ve got ourselves a good ol’ “chicken or the egg” paradox here.
Language of the now powerful frontendFor a long time, websites were mostly powered by PHP-based CMSs, such as WordPress.
Server-side code was handling the major part of the logic.
Things are changing though-you might have heard that “static” sites are making a comeback.
However, they’re nothing like the ’90s statically generated websites I mentioned earlier.
Modern browsers now have the capacity to make these interactive and fully-dynamic.
A particularity they share with their ancestors, though, is the abstraction of backend development.
Modern web trends were born from this new paradigm, like the JAMstack.
I wrote a whole post on the subject that I invite you to read here.
Some of the most prominent web applications around today are built using JS.
Think Facebook, Gmail, Twitter, and many more.
It wouldn’t have much appeal without it.
You might have heard of Angular, backed by Google, and React, backed by FB.
I also have to mention Vue here that, even if not supported by a tech powerhouse, completes the triad of important JS frameworks.
Other than reducing the amount of time and efforts required for developing JS-based sites and apps, these frameworks helped shape new web experiences.
Take Single-Page Applications (SPA), for instance.
A SPA is a website that interacts with users by dynamically rewriting a page in the browser rather than loading entire new pages from a server, making them behave more like desktop applications.
Truth is though, in 2019, it’s doing so much more than that.
Many thought it would just never become a stable backend language, until the arrival of Node.
Today, this JS runtime is a popular tool to power web servers.
This means that JS developers can use Node.
I dove deeper in Node.
→ Mobile appsIn the past, you would need other languages to develop great mobile applications, like Objective-C for iOS or Java for Android.
This means that you can use mobile devices features, such as the camera or localization to build JS-powered apps.
Once again, this opened mobile app development to a more significant number of developers who no longer need to learn a new language.
Take a look at Progressive Web Apps (PWA) for instance.
Combining the best of the web and the best of apps, PWAs improve reliability, performance, and engagement.
They enable impressive new functionalities such as offline navigation.
Aforementioned frameworks like Vue.
js and React are increasingly used to craft PWAs.
One concept that is more promoted than ever in web development is modularity-using different tools to execute specific tasks.
Learn more about APIs and how they work in this piece.
With the code running directly in the browser, the need for server calls is abstracted, hence a cut in loading times.
Even with the presence of a server, the fact that JS is asynchronous means that it’s able to communicate with the server in the background without interrupting the user interaction taking place in the frontend.
It now does the same for applications of all kind, helping to develop the most engaging UX.
Today, frameworks like Vue.
js are bringing transitions & animations to the next level.
More and more, developers need to adapt their design across multiple browsers and devices.
For developers, JS is easy to learn and fast to get into active development.
Its syntax is easy and flexible for newcomers.
It also simplifies the development of complex applications by enabling developers to simplify the app’s composition.
The many frameworks & packages out there also ease the life of developers to some extent.
If popularity doesn’t always equal quality in life in general, it at least mean one important thing: you’ll find the solution to any problem within the community.
In web development, that’s not a negligible detail.
If you’re someone that needs to hire developers, that’s also a big plus, as the pool of candidates is huge.
Does this mean that JS is perfect? Not at all, there are indeed disadvantages to be aware of.
Even though Google claims it mostly does, you shouldn’t take any chance if you don’t want to face crawlability/SEO issues.
Bloating your projects with JS will do you a disservice in the long term as it will eventually cause performance issues.
The thousands of packages that constitute the JS ecosystem allow developers to work quickly without reinventing the wheel for each new task.
However, they also cause what some have called “dependency hell.
” You need to learn how to deal with these often necessary dependencies, so they don’t become a hassle for you and the people using your projects.
Because trust me, it’s not going anywhere, whether you like it or not.
I personally think the future begins with less new tools being created and the big players getting more mature and gaining major adoption.
We’re already observing this in the field of JS frameworks, where React and Vue.
js are taking the edge.
Same at other levels where tools are built on these frameworks.
js & Nuxt are slowly becoming the leading static site & PWA generators.
TypeScript will probably play a big part in what’s to come as well.
The future holds many things in the tech world that will no doubt have an influence on frontend development, such as Artificial Intelligence or the Internet-of-Things.
How?.Well, this question seriously exceeds my expertise for now and would deserve its own article.
Regardless, it will be interesting to follow these changes as they come along.