Blog

Web Architecture

There are 3 main approaches to building applications each providing its own set of benefits and drawbacks. But when should we use each one and why? 

Server Side Rendering (SSR)

Server side rendering platforms involves a client such a web browser sending requests to a server where the web page is built and sent back to the client.

Pros: search engine optimization, linkability and instant first page load.

Cons: struggles to handle heavy server requests, flexibility in user interface.

As a result server side rendering is ideal for content sites like blogs where search engine optimization (SEO) is important and dynamic content is often being added.


Static Site Generation (SSG)

Static site generators such as Gatsby generate html pages from templates at build time that are stored on a content delivery network or server. This allows pre compiled page to be served without the need to build them on the backend at runtime.

Pros: high speed content delivery.

Cons: only useable with static content, website requires regenerating (full or partial) when new data is added.

Site generated using static site generation are ideal for content heavy applications where information isn’t changing often such as marketing, documentation and blog websites.


Single Page Application (SPA)

Single page applications are loaded on initial page load (although state can be lazy loaded later) so they don't require reloading when data changes and pages are updated.

Pros: interactivity, fast rendering after the app is loaded.

Cons: poor search engine optimiztion and linkability, long time to first load, limtied routing.

This makes single page applications ideal for situations where search engine optimization is not important but there are lots of content changes such as in a customer relationship manager (CRM) dashboard or preferences/account section on a website.