You don’t need a web framework.

Kaan Yagci
Makepad
Published in
4 min readSep 21, 2022

Stop using web frameworks and focus on your project.

With the progress in the web in the last decades, a web application is more or less capable of anything that a mobile or desktop application can do. Therefore there’s a web application for nearly everything. It also increased the demand for web technologies and web development.

If you do a quick search on Google about web development, you’ll have an impression that you need to use a framework if you want to build a web application. If you continue your search, you’ll find out that there are even fanatics of each framework who clashes with each other on social media. Because of these, today, when someone wants to start web development, they tended to choose a web framework before doing anything. But do you even need a framework at all? Today we’ll try to answer this question.

What’s a web framework?

Let’s start with the basics, the definition of a framework. Wikipedia defines “web framework” as follows:

A web framework or web application framework is a software framework that is designed to support the development of web applications including web services, web resources, and web APIs. Web frameworks provide a standard way to build and deploy web applications on the World Wide Web.

First, let’s be clear that a web framework differs from a library and is not a programming language. So, starting your web development journey, you must first learn the programming language to learn a web framework. Also, per its definition, it provides a way to build web applications. It means the way to do things will be different than the programming language itself, and there will also be a difference between other frameworks. So to learn a framework, you need to know JavaScript, and then you need to learn the framework itself. It means that you’ll double your learning curve just for the sake of using a web framework. Also, good luck migrating your project if your framework becomes paid or the maintainer drops the support.

Also, as per the definition, when you use a framework, you’ll be limited to the features within the framework. So all these cool things you can do with the JavaScript you may not do in your framework.

Lastly, as JavaScript is an in-demand programming language, the JavaScript libraries, aka npm modules, are under active development. It means that you can practically find a new patch update each week, a new minor update each month, and a major update each year. The same goes for frameworks; at the end of the day, they are all written in JavaScript and published as npm modules. So, you need to expect a major update at least every year. If you do not update your codebase following this major update, you’ll probably need to rewrite your code in the next one, or you’ll need to use an outdated version of your cool framework.

From my experience, if you’re not working for a tech giant such as Google, Amazon, or Facebook, you’ll be rewriting the entire codebase each 2–3 years because the development team was busy focusing on the business needs, and they skipped two major framework updates.

Who needs to use a Web framework?

You need to use a framework when you do not have any other choice.

If your applications handle billions of daily requests, you’ll probably need to deal with serious optimizations. If this is your case, you’ll probably be better off using a web framework that outputs more optimized code. Also, if this is your case, you are probably already a severe development team, so you hopefully won’t run into this rewriting codebase trap.

How to build a web application without a framework?

If you followed through here, you’re probably convinced you do not need to use a framework to develop your web application. But how on earth a web application can be developed without a framework?

All web frameworks use an underlying technology to create custom elements with JavaScript. This technology is Web Components.

What’s Web Components?

MDN (Mozilla Developer Network) defines Web Components as:

Web Components is a suite of different technologies allowing you to create reusable custom elements — with their functionality encapsulated away from the rest of your code — and utilize them in your web apps.

This means that you can use good old JavaScript to create web components by extending the HTMLElement class. You’ve access to all attributes and properties of a web component programmatically, and you can create your component with customElements.create(<component_name>, <component_class>) . You can find more information and tutorials about Web Components on MDN’s page.

Conclusion

Unless you’re dealing with serious security or serious performance problems, you should not use a web framework. Instead, you should focus on your application’s needs. Not using a web framework does not mean using vanilla HTML and JavaScript, as in the old days, you could use Web Components with no additional dependency and no additional learning curve than the JavaScript itself.

What’s next?

If you’re interested in software development and liked this article, please follow us on Medium.

--

--