Member-only story
Web Development in 2021: Dynamic vs. Static vs. Single-Page Architecture
Know the architecture that best suits your website

It is easy to overlook that we have more ways of building websites than with just single-page applications.
In this article, I want to look at three of these significant free alternatives we have and help you understand when you might want to use which alternative for building your website for 2021.
Static Web Apps

The first approach is the deep, oldest method you have: the static website in which you have an HTML file or maybe a bunch of HTML files.
We can put HTML files onto a server. Then these files will be served to users. If your user enters a web page, each time they will get into different HTML files which are served back from the server.
Why and where should you use static websites?
If people have an elementary page with no dynamic content, like a personal home page where things do not change that often, then developers can build just some HTML files with CSS and maybe JavaScript and deploy that to a server.
So why wouldn’t developers use that?
Even if you have content that changes more frequently, you can use static site generators to have some data source (database). Then you can define how your pages should generally look, how the frame for each page looks, etc. Let’s look at the process:
- Then this static site generator can be run by you — you start the generation process.
- The generator looks at all your data sources, fetches the data, and takes your predefined HTML frame.
- It then inserts the data and spits out many pre-generated HTML files not generated on a server but on your machine or in the cloud. (But not as part of an incoming request).
The great thing there is that there are even solutions, like Gatsby and NextJS, that allow you to build a React app.