You Don’t Need a JavaScript Framework

Do we suffer from JavaScript frameworks fatigue? Or are we ignoring the performance and data bundles of our users?

Let’s Go Back to the jQuery Era

Do you remember those days when everyone used jQuery for everything! jQuery before, jQuery after, everything smelled like jQuery. Every website or web application included jQuery.

Why?

Developers found Vanilla JavaScript was too difficult or complex to handle. There where a lot of big differences between browsers.

Thank God those days are over! jQuery fixed a big problem for the JavaScript community. But it made most of us lazy because we didn’t understand what was going on under the hood.

For me, it all ended when this website launched.

The JavaScript Fatigue Era

Right now, 2020 is just starting but we are making overweight websites and web applications. We can choose Angular, React, Vue.js, Svelte, or Polymer. Sorry, I won’t name all of them…

Maybe you’re thinking: “Well, go ahead and judge for yourself.” Well, that is also what I’m doing with this article. I’m very critical about my own JavaScript fatigue.

But let’s be honest. It has never been easier to start a website or web app from scratch with a single command. For Angular, we use ng new project name, for React we use , etc.

Most of the time, we are picking what suits us the best. But we have to decrease our JavaScript weight some more and be more thoughtful on what we load into our application.

Because, maybe HTML, CSS, and JavaScript are enough.

When I talk about the JavaScript framework, I also mean the JavaScript library. Angular, React, Vue.js and Svelte are for me in this category. (Yes, there are a lot more…)

Pros and Cons of Using a JavaScript Framework

Using a JavaScript framework has some pros and cons. Because it’s about good and evil. It’s more like one’s better in one situation than the other.

I’m using Angular in my day job and like to experiment with React or Vue.js. Or trying some small JavaScript micro-library that does only one thing very well.

When You Shouldn’t Use a JavaScript Framework

There are a few situations I won’t recommend using a JavaScript framework, but rather recommend using a JavaScript micro-library or use Vanilla JavaScript.

  1. Your application is simple or small. If you’re building a small project, such as experimenting with a new JavaScript API.
  2. Tight on performance. When your application needs to be of very high performance, even on a low-bandwidth connection.

Every byte that is sent over the line counts. Then, it’s not smart to use a big framework. Because a JavaScript framework comes with a cost because of its overhead.

Well, there are many tools to make this more manageable. It’s better to prevent problems than to solve them.

When Would a JavaScript Framework Be a Smart Choice

There are situations where it is smart to use a JavaScript framework. But still, we need to be careful with everything.

1. Your application is big

When you’re building a big application, it could be smart to use a JavaScript framework. A framework, most of the time, comes with great support from a community.

Most of the time, a community will provide a lot of learning material that helps to build an application for long-term support.

2. You or the company values open source

The best thing about open source is that everyone can use it how they want (if the license allows it of course).

A lot of the elements of that framework are built by people that spent their free time on it. This doesn’t cost the developer or the company that is using it any money.

If a company/developer likes to contribute to a JavaScript framework, other people can benefit from that too.

3. High speed development for new features

Because most frameworks offer a lot of tools they make it easier for the developer to build new features in shorter times, they can rest on the shoulders of smart engineers that did a lot of testing for them.

Conclusion

In my story, I have more pros in comparison to cons when we talk about JavaScript frameworks. (If you have any additional ones, please add them in the comments!)

But even though it sounds so good to use a framework, we have to be very careful with what we load onto our websites and application.

Always ask the question: “Why do I need this framework? What benefit would we have from building it ourselves or using something that already exists?”

“What consequences does it have for the user? Is a low-end mobile phone also able to use the application with the same user-experience as a high-end mobile phone?”

Frameworkless Movement

If you like the idea of not using a framework or building stuff with Vanilla JavaScript I would recommend checking this Github repo with inspiration. I like the idea of FrameworklessMovement.org.

Thanks

Thanks for reading all this way! I hope that after reading this story you will be more careful picking a JavaScript framework, or not picking one.

Because, in the end, our goal should be building an application that has great user experience and is scalable.

If you have any questions, please let me know in the comments.

Do you want to learn JavaScript the easy way? I’m working on a set of project to teach you JavaScript in a low-barrier way, so you can build you own interactive ui components 👍

Read more

Frontend Development On A Budget: Raspberry Pi 4
medium.com

5 Tips For Healthier Developers
_Your Body And Brains Need Attention_
medium.com

What Tech I Use in 2020 As Developer
_Software, Hardware and other stuff I use during my work_
medium.com

JavaScript Concepts You Need Before Starting w/ Frameworks & Libraries
_Don’t start before you are comfortable with them_
medium.com

Did you find this article valuable?

Support Dev By RayRay by becoming a sponsor. Any amount is appreciated!