avatarRayRay

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

2738

Abstract

f Using a JavaScript Framework</h2><p id="6ba5">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.</p><p id="efa9">I’m using Angular in my day job and like to experiment with React or Vue.js. Or trying some small <a href="http://microjs.com/#">JavaScript micro-library</a> that does only one thing very well.</p><h2 id="adc5">When You Shouldn’t Use a JavaScript Framework</h2><p id="0207">There are a few situations I won’t recommend using a JavaScript framework but instead using a JavaScript micro-library or Vanilla JavaScript.</p><ol><li>Your application is simple or small. If you’re building a small project, such as experimenting with a new JavaScript API.</li><li>Tight on performance. When your application needs to be of very high performance, even on a low-bandwidth connection.</li></ol><p id="d083">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.</p><p id="5bbd">Well, there are many tools to make this more manageable. It’s better to prevent problems than to solve them.</p><h2 id="895f">When Would a JavaScript Framework Be a Smart Choice</h2><p id="3677">There are situations where it is smart to use a JavaScript framework. But still, we need to be careful with everything.</p><h2 id="f4c1">1. Your application is big</h2><p id="5fd3">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.</p><p id="a4c2">Most of the time, a community will provide a lot of learning material that helps to build an application for long-term support.</p><h2 id="c64f">2. You or the company values open source</h2><p id="12c7">The best thing about open source is that everyone can use it how they want (if the license allows it of course).</p><p id="fd96">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.</p><p id="537e">If a company/developer likes to contribute to a JavaScript framework, other people can benefit from that too.</p><h2 id="1b38">3. High-speed development for new features</h2><p id="94d3">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.</p><h1 id="2263">Conclusion</h1><p id="175f">In my story, I have more pros in comparison to cons when we talk about JavaScript frameworks. (If you have any additional ones, please

Options

add them in the comments!)</p><p id="b273">But even though it sounds so good to use a framework, we must be careful with what we load onto our websites and application.</p><p id="fca8">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?”</p><p id="2f42">“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?”</p><h2 id="33ca">Frameworkless Movement</h2><p id="f683">If you like the idea of not using a framework or building stuff with Vanilla JavaScript, I recommend checking <a href="https://github.com/frameworkless-movement/awesome-frameworkless">this GitHub repo</a> with inspiration. I like the idea of <a href="http://frameworklessmovement.org">FrameworklessMovement.org</a>.</p><h1 id="6e38">Thanks!</h1><figure id="30f0"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/0*Qay6DRNLz9jUR0UQ"><figcaption></figcaption></figure><p id="17bd">After reading this story, I hope you learned something new or are inspired to create something new! 🤗</p><p id="3c89">If I left you with questions or something to say as a response, scroll down and type me a message. Please send me a <a href="https://twitter.com/@devbyrayray">DM on Twitter @DevByRayRay</a> when you want to keep it private. My DM’s are always open 😁</p><h2 id="0f33">Get My Articles Via Email Click here | Buy a $5 Medium Membership</h2><h1 id="b869">Read more</h1><div id="53c9" class="link-block"> <a href="https://byrayray.medium.com/list/24674407532a"> <div> <div> <h2>Angular stories</h2> <div><h3>All my Angular stories</h3></div> <div><p>byrayray.medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*c0621ec43937477dff9dce8c59ea5d83c328506e.jpeg)"></div> </div> </div> </a> </div><div id="97ec" class="link-block"> <a href="https://byrayray.medium.com/list/0358ad941491"> <div> <div> <h2>Latest JavaScript & TypeScript stories</h2> <div><h3>Check my latest JavaScript and TypeScript stories</h3></div> <div><p>byrayray.medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*b94ab0f0170e32f95874de9ecf8879895b9eebfd.jpeg)"></div> </div> </div> </a> </div></article></body>

You Don’t Need a JavaScript Framework

Sometimes React, Angular, or Vue.js might be too much

Photo by Maria Teneva on Unsplash

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. Starting a website or web app from scratch with a single command has never been easier. For Angular, we use ng new project name, for React we use , etc.

Most of the time, we pick 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.

I also mean the JavaScript library when I talk about the JavaScript framework. 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 instead using a JavaScript micro-library or 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 must be 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 recommend checking this GitHub repo with inspiration. I like the idea of FrameworklessMovement.org.

Thanks!

After reading this story, I hope you learned something new or are inspired to create something new! 🤗

If I left you with questions or something to say as a response, scroll down and type me a message. Please send me a DM on Twitter @DevByRayRay when you want to keep it private. My DM’s are always open 😁

Get My Articles Via Email Click here | Buy a $5 Medium Membership

Read more

Programming
Software Engineering
Angular
React
JavaScript
Recommended from ReadMedium