Minimalism in Web Development

Minimalism in Web Development

Posted on

As I spend more and more time working with bloated frameworks in web development I am starting to miss the minimalism I saw when I got started. I wish websites didn’t need to load megabytes of data to display simple pages. I believe a lot of websites do not benefit at all from frameworks like React, Vue and Angular. Some have told me that these pages just need to be optimized but as far as I can tell this just spreads the loading of files out over time, you will still end up with a site of several megabytes after navigating pages.

How do we define minimalism?

I believe we need less javascript and css for the web. Things can still look great and be done quickly without a bunch of frameworks. I believe this is what we like to call minimalism in web development. Looking at Wikipedia I found a good definition for minimalism and it’s defined like so:

In software and user interface design, minimalism describes the usage of fewer design elements, flat design, fewer options and features, and tendencially less occupied screen space. 

This definition fits well and I believe it’s good to follow this principle. However, I have seen many minimalist user interfaces that look great but take ages to load and use megabytes of data. If we try to use minimalism in web design shouldn’t we also use minimalism when it comes to the underlying code? I found an article called My Minimalist Approach To Software Engineering where the author touches on this topic. Libraries and frameworks can be good but there is a lot we can do in web development without them. In this article and hopefully future articles I would like to explore what we can do with minimalist web development.

In addition to what I have written here there is an article called A Short Guide To Minimal Web Development which I found while researching this topic. I think it outlines a lot of the things for frontend development which I would like to cover but I also want to apply the principle to backend development. Frameworks and libraries have their uses but they are not needed for most web applications.

The idea, however, is that we can only tell what’s really needed once we can tell what’s really important, and why it’s really important.

Jens Oliver Meiert (https://meiert.com/en/blog/minimal-web-development/)

When do we need a backend?

You may need a backend to a web application when you have dynamic content. Now, there is no simple definition for dynamic content. Basically, if you have any form of user authentication or storage shared between users you will need a backend. A lot of things such as blogs, games, live chats and more may have dynamic content but do not need any backend to perform their function if authentication is not needed. Most sites will fall into the first category of authentication but there are some sites out there which need a backend but do not require authentication. These types of sites may exists to provide simple functions like uploading and sharing files or tracking and storing user behaviour.

Many sites like blogs or even news sites will do fine with basic HTML files with no extra code. However, for convenience some people do like to use a backend such as WordPress. WordPress lets you easily create new posts and pages. This does however come with the added cost of complexity and performance. HTML files tend to load quickly and there is very little that can go wrong. Once you add a backend with authentication there may be hundreds of checks that execute on every page load. You also have to maintain a backend, keep it updated and ensure that malicious users don’t gain access to it.

When making a new site you should always begin by asking if you really need a backend.

When is a backend framework needed?

A backend framework is never really needed. But a framework can help speed things up and provide a ready made structure. It’s similar to building a house, you build everything from scratch or use prefabricated houses where all the pieces are already made.

A framework therefore helps standardise things so that it is easier for multiple developers to work on the same project. However, there should always be some consideration as to if a framework is really needed. If you’re building a landing page you don’t need frameworks. You could probably use a simple PHP file for this instead of a full framework like Laravel. Using a framework will add overhead and complexity to the application, especially if it’s small. In the end you are trading development speed for flexibility, stability, performance and security.

When is a frontend framework needed?

Frontend frameworks like React, Angular and Vue have become very popular in the last years. I think these frameworks are needed even less than backend frameworks. Most websites do not need any javascript at all to provide their core functionality. The backend can generate html pages with any needed data and this can be styled with a bit of css.

One argument I have heard is that these frameworks allow you to load a page once and then only make requests for the data that you need. This is referred to as a single page application and I can see how it provides benefits for large applications with lots of data. However, most websites do not load large sets of data in this way and can provide pages that are small in size and load quickly. Many single page applications load so many different libraries that they often reach over a megabyte in size which is huge.

You end up trading a slow initial load for many smaller pages that load quickly. It’s also tends to become impossible to keep track of all the libraries that these frontend applications use. There have been several recent incidents where a small package had a bug or security issue which affected millions of applications. Frontend frameworks should be avoided unless they provide substantial benefits. Frontend frameworks might allow you to get something produced more quickly but once again you trade development speed for flexibility, stability, performance and security.

Conclusion

As I gain more and more experience in web development I am starting to miss the simplicity and speed of the old days. I think we need to find a way back to the simple application. I am personally starting to simplify the websites I run.

As I write this I am using WordPress to manage my posts. However, I am working on a new backend called Beubo. With Beubo I want to simplify the backend to something very basic and rethink how the backend should work. I want to write guides that teach minimalism in web development from the very start. Too many web developers start with frameworks and never learn the simplicity of vanilla CSS, JS and HTML.

I think there is more and more push for simplicity and minimalism in web development. This is as companies become more and more liable for the security of their applications. For a long time there were no real consequences of running insecure web applications. Focus has shifted towards development speed. However, with the rise of GDPR and similar laws we will see more companies looking to simplify. To reduce the amount of libraries and frameworks that are used in order to keep applications more secure and stable.

I would love to hear what you guys think about minimalism in web development. Please leave your comment below.

Comments

3 thoughts on “Minimalism in Web Development

Got Something To Say?

Your email address will not be published. Required fields are marked *