Static Websites vs Dynamic websites

published on: November 22nd 2019

Recently a very respected and intelligent developer posted this in response to a customer's inquiry:

"The disadvantage to static websites is that they are not interactive, meaning they cannot perform functionality. Dynamic systems can handle functionality and can perform customized returns based on user, channel or application. When a web page is requested by a user, the web server where the page is stored returns the HTML document to the user’s computer and the browser displays it. On a static web page, this is all that happens. Static web pages load much faster for this reason."

This statement is a symptom of the broad ignorance or agnosticism of the fullstack monolithic developer towards modern architecture. The only piece in that statement that hints at reality is that static sites load much faster.

To be fair, the complex dynamic nature she is referring to was typically absent from a static site just a few years ago. Her understanding of a modern paradigm seems to have stalled in 2015. Sure, once upon a time static sites were not connected to databases, couldn't query data, or partake in complex functionality. They just spit out HTML files for users to view. They were sites that didn't require functionality therefore no database and logic were needed. If you did need complex data...well, you built a monolithic site with one executable containing all logic, assets, and data. That was the just way it was done and understood. Static was faster than dynamic because it didn't have to go retrieve data on interactions.

Well, a few odd things happened in the last few years that turned our understanding - if we are willing to see it - on it's head. The rise of the JAM stack and the hordes of headless web solutions that followed. No longer did one need a single executable or a backend to perform the very calculations that made dynamic - dynamic. A developer can now build a super fast static site that utilizes JavaScript to connect to other people's "dynamic" APIs for functionality. Need payment processing? Easy. Need to query data? Easy. Keep track of inventory? Easy. Need search? Easy. In fact, we are hard pressed to come up with a reason to have a clunky monolithic site. The list of companies that agree with us is endlessly growing. Visit Harry's razors. A massive E-commerce site built in GatsbyJS. Nike, IBM, Paypal, Figma, and the list goes on and on and on..use this very stack to power extremely fast and functionality rich websites.

We define the difference between static and dynamic websites as :

We generalize the difference as : Static sites send the entire site as HTML. Once on the client device, it re-hydrates javaScript to utilize the functionality and logic of third party solutions. Dynamic sites keep all functionality coupled with it's data and logic as a single executable and must return to host server for functionality.

Our take? Static sites are the superior choice for 90% of all websites. They are much faster, hosted for free, easy to maintain, easy to develop, and can do what most businesses require of their website. Why make it complicated?