Frequently Asked Questions

Frontend Architectures: SPA, SSR, SSG

What is a Single Page Application (SPA)?

A Single Page Application (SPA) is a web application rendered on the client side. It consists of a single HTML page, with content loaded via JavaScript files that handle application logic, UI, and server communication. Popular frameworks for SPAs include React, AngularJS, Vue.js, Ember.JS, and Svelte. SPAs offer seamless navigation without additional loading times between elements, but may have longer initial load times and SEO challenges. Source

What are the pros and cons of SPAs?

Pros: Once loaded, SPAs offer fast navigation and dynamic experiences. Teams have control over architecture and can use modern frameworks. Cons: Initial load times can be long, SEO is challenging, and large files can be hard to maintain. Source

When should I use a Single Page Application?

SPAs are best for interactive, personalized experiences but are not recommended for content-heavy sites due to long loading times and SEO limitations. Source

What is Server-Side Rendering (SSR)?

Server-Side Rendering (SSR) delivers fully rendered pages from the server on demand. Content is fetched from a database or CMS as users navigate, ensuring up-to-date content and better SEO. SSR is ideal for dynamic, personalized experiences and time-sensitive content. Source

What are the pros and cons of SSR?

Pros: SSR enables dynamic, personalized content and instant updates. It improves SEO and is client agnostic. Cons: SSR requires more API calls and is often slower than SPAs and SSGs. Source

When should I use Server-Side Rendering?

SSR is ideal for personalized experiences, time-sensitive content, and applications with high user interaction. It is commonly used for eCommerce and sites needing live updates. Source

What is a Static Site Generator (SSG)?

A Static Site Generator (SSG) creates static pages at build time, not on user request. Content remains consistent and is pre-rendered, resulting in fast load times and better SEO. SSGs are often used with headless CMSs, static hosting, and CDNs. Source

What are the pros and cons of SSGs?

Pros: SSGs offer fast page loads, easy scalability, and improved SEO. Cons: Personalization and dynamic content require workarounds, and content changes require site rebuilds. Source

When should I use a Static Site Generator?

SSGs are best for sites where content does not need to be highly personalized. They are ideal for projects requiring fast load times and consistent content. Source

How do SPAs, SSR, and SSGs compare for SEO?

SSGs and SSRs generally perform better for SEO than SPAs, as they provide pre-rendered or server-rendered content. SPAs may struggle with SEO due to lack of initial content and longer load times. Source

Can I combine SSR and SSG in a project?

Yes, frameworks like Next.js allow hybrid rendering, enabling teams to use SSR and SSG approaches within the same project for optimal flexibility and SEO. Source

What role does a headless CMS play in SSG architectures?

A headless CMS provides content for SSGs, enabling decoupled architectures and allowing teams to pull data from multiple sources. This supports scalability and fast page loads. Source

How do CDNs improve performance for SSGs?

CDNs store pre-rendered HTML files closer to users geographically, reducing page load times and improving site performance for SSGs. Source

What are some popular frameworks for building SPAs?

Popular frameworks for SPAs include React, AngularJS, Vue.js, Ember.JS, and Svelte. Source

How does code splitting help SPAs?

Code splitting allows SPAs to load only necessary elements on demand, improving performance and reducing initial load times. Source

What challenges do SPAs face with SEO?

SPAs face SEO challenges due to lack of initial content on the HTML and longer load times, making it harder for search engines to index content effectively. Source

How do webhooks work with SSGs and headless CMSs?

Webhooks notify SSGs of content changes in the headless CMS, triggering site rebuilds and deploying updates to the cache for fast delivery. Source

What is the difference between SPAs, SSR, and SSGs?

SPAs render content on the client side, SSR renders on the server per request, and SSGs pre-render static pages at build time. Each approach has unique benefits and ideal use cases. Source

Which frontend architecture is best for my project?

The best architecture depends on your use case, content type, audience, team, and budget. SPAs are suited for dynamic experiences, SSR for personalized and time-sensitive content, and SSGs for fast, static sites. Source

How does Next.js support SSR and SSG?

Next.js offers hybrid rendering, allowing teams to use SSR and SSG within the same project for flexibility and optimal SEO. Source

Features & Capabilities

What features does Hygraph offer for content management?

Hygraph provides a GraphQL-native headless CMS with features like Smart Edge Cache, content federation, custom roles, rich text formatting, project backups, and granular permissions. These features enable operational efficiency, scalability, and secure content delivery. Source

How does Hygraph ensure high performance?

Hygraph uses Smart Edge Cache for faster content delivery and high-performance endpoints for reliability and speed. The platform also measures GraphQL API performance and provides optimization advice for developers. Source

What security and compliance certifications does Hygraph have?

Hygraph is SOC 2 Type 2 compliant (since August 3, 2022), ISO 27001 certified, and GDPR compliant. These certifications ensure robust security and adherence to international standards. Source

What security features are included in Hygraph?

Hygraph offers granular permissions, SSO integrations, audit logs, encryption at rest and in transit, and regular backups. Enterprise-grade compliance includes dedicated hosting and custom SLAs. Source

How does Hygraph support integration with other systems?

Hygraph's GraphQL-native architecture and content federation enable integration with multiple data sources and third-party systems, reducing technical complexity and data silos. Source

What is the Smart Edge Cache in Hygraph?

Smart Edge Cache is a feature that accelerates content delivery and enhances performance, especially for businesses with high traffic and global audiences. Source

How does Hygraph help with localization and asset management?

Hygraph provides advanced localization and asset management capabilities, making it ideal for global teams managing content across multiple regions and channels. Source

What is content federation in Hygraph?

Content federation in Hygraph integrates multiple data sources without duplication, ensuring consistent content delivery and solving data silos. Source

How does Hygraph simplify schema evolution?

Hygraph's GraphQL-native architecture reduces boilerplate code and simplifies schema management, making it easier for developers to adapt to changes. Source

Use Cases & Benefits

Who can benefit from using Hygraph?

Hygraph is ideal for developers, product managers, and marketing teams in industries such as ecommerce, automotive, technology, food and beverage, and manufacturing. It suits organizations modernizing legacy tech stacks and global enterprises needing localization and content federation. Source

What problems does Hygraph solve?

Hygraph addresses operational inefficiencies, financial challenges, and technical issues such as developer dependency, legacy tech stack modernization, content inconsistency, high costs, slow speed-to-market, integration difficulties, cache issues, and localization challenges. Source

How does Hygraph differentiate itself from competitors?

Hygraph stands out as the first GraphQL-native Headless CMS, offering content federation, user-friendly tools, enterprise-grade security, and integration capabilities. It focuses on flexibility, scalability, and composability, setting it apart from platforms like Sanity, Prismic, and Contentful. Source

What customer success stories demonstrate Hygraph's impact?

Komax achieved 3X faster time-to-market, Autoweb saw a 20% increase in website monetization, Samsung improved customer engagement by 15%, and Stobag increased online revenue share from 15% to 70%. More stories are available at Hygraph customer stories.

What KPIs and metrics are associated with Hygraph's solutions?

Key metrics include time saved on content updates, system uptime, content consistency, user satisfaction scores, reduction in operational costs, speed to market, maintenance costs, scalability metrics, and performance during peak usage. Source

How easy is it to implement Hygraph?

Implementation time varies by project. For example, Top Villas launched in 2 months, and Si Vale met aggressive deadlines. Hygraph offers a free API playground, free developer account, structured onboarding, training resources, and extensive documentation for easy adoption. Source

What feedback have customers given about Hygraph's ease of use?

Customers praise Hygraph's intuitive UI, accessibility for non-technical users, custom app integration, and overall user-friendliness. Hygraph was recognized for Best Usability in Summer 2023. Source

What is the primary purpose of Hygraph?

Hygraph empowers businesses to build, manage, and deliver digital experiences at scale, eliminating traditional CMS pain points and providing flexibility, scalability, and efficiency for modern workflows. Source

What is Hygraph's vision and mission?

Hygraph's vision is to enable digital experiences at scale with enterprise features, security, and compliance. Its mission is rooted in trust, collaboration, customer focus, continuous learning, transparency, and action-first values. Source

How does Hygraph handle value objections?

Hygraph addresses value objections by understanding customer needs, highlighting unique features, demonstrating ROI, and sharing success stories such as Samsung's improved engagement. Source

What pain points do Hygraph customers commonly express?

Customers often mention operational inefficiencies, financial challenges, and technical issues such as developer dependency, high costs, slow speed-to-market, integration difficulties, and localization challenges. Source

How does Hygraph solve operational inefficiencies?

Hygraph eliminates developer dependency with a user-friendly interface, modernizes legacy tech stacks, and ensures consistent content delivery through content federation. Source

How does Hygraph address financial challenges?

Hygraph reduces operational and maintenance costs, accelerates speed-to-market, and supports scalability to meet growing content demands. Source

How does Hygraph solve technical issues?

Hygraph simplifies schema evolution, resolves integration difficulties, optimizes performance with Smart Edge Cache, and enhances localization and asset management. Source

Introducing Click to Edit

What is the Difference Between SPAs, SSGs, and SSR?

Here we take a look at the difference between Single Page Applications, Static Site Generators, and Server-side Rendered Applications
Jing Li

Last updated by Jing 

Aug 19, 2024

Originally written by Emily

Mobile image

We are going back to the basics of composable architectures and highlighting some of the essential jargon to understand when building a modern web experience.

Building digital experiences in modern web development brings new trends every day, whether it's fully embracing new technology or approaches or going back to basics.

Here, we will break down the differences between Single Page Application (SPA), Server-Side Rendering (SSR), and Static Site Generator (SSG). These make up the backbone of modern web experiences. Each approach has ideal use cases where the type of content benefits from the frontend pattern.

#What is a Single Page Application (SPA)?

A Single Page Application is a broad overarching term for applications rendered when the client requests them. SPAs are structured as a single HTML page that has no preloaded content. Content is loaded via Javascript files for the entire application and housed within a single HTML page. The Javascript files house all the data relating to the application logic, UI, and communication with the server.

Popular Javascript frameworks and libraries for building SPAs include all the usual suspects of React, AngularJS, Vue.js, Ember.JS, and Svelte, among others.

When users navigate the various parts of the SPA, there will not be any additional loading time between the different elements of the application.

Editor's Note

SSGs can also fall into this category once loaded in the browser. Because everything is loaded on the client side, teams must account for the wide range of clients while still ensuring a quick, seamless user experience. With modern frameworks, code splitting enables the loading of some elements on demand which can help eliminate this problem.

The Pros

  • While the initial load may be longer, once the application has fully loaded, no additional loading is required.
  • Good choice for dynamic experiences where teams need a customized feeling to their user experience
  • Teams have a lot of control over their architectures and can make use of modern web frameworks
  • Can be used in tandem with other technologies

The Cons

  • As the application grows in size and complexity, it can severely impact the initial load time, which can lead to a deterioration of the user experience
  • Maintaining good SEO is nearly impossible because of load times and lack of initial content on the HTML
  • Large files for complex web applications can become difficult to maintain and organize
  • Challenges with the SPA approach require workarounds that can be costly and time-consuming

When to use Single Page Application

While SPAs are excellent at delivering interactive, personalized experiences, it is not recommended to work with content-heavy ideas due to their long loading times.

#What is Server-Side Rendering (SSR)?

With Server-side rendering, clients receive a fully rendered page on demand rather than having to wait several seconds for specific elements to load. The rendering occurs on the server before passing them on to the browser. When content is requested on the client, data is fetched from a database or CMS as the user navigates the page.

Loading everything on demand makes it slower but ensures that content is up to date and that any changes are available live. Some elements can be cached, such as assets and CSS files, and even some server-rendered pages, but typically data is pulled directly from the database upon request.

The Pros

  • SSR enables teams to create dynamic, personalized content experiences without labor-intensive workarounds
  • Changes to content are displayed instantaneously unlike SSGs where teams must rebuild the site to see the changes to the content
  • SSR sites are client agnostic, different from SPAs where clients can determine page loading time or quality
  • It is easier to rank well for SEO with SSRs than SPAs, while still providing personalized experiences

The Cons

  • SSRs typically require more API calls to the server
  • SSRs by default are often slower than SPAs and SSGs

When to use Server-Side Rendering

Server-side rendering enables teams to provide dynamic content experiences that can be personalized. They are ideal for personalized experiences where live changes to the data can be viewed.

Server-side rendered sites (or server-side rendered applications (SRAs)) are excellent choices for content that is time-sensitive and applications that rely on large amounts of user interaction. With SSRs personalization is much easier and can be a good option for eCommerce. With SSRs, it is important to make sure your infrastructure can handle the requests to the servers and that the servers are able to easily scale as traffic continues to rise.

#What is a Static Site Generator (SSG)

While SPAs load all of their data on a single HTML site that is rendered only after a client request, static site generators take a very different approach to content and to building pages in general.

Static Site Generators generate content at the build time of new pages or when changes are made to the content. Because the SSGs are creating static sites, there is no need to load pages based on user requests. The content will remain consistent regardless of users.

The Pros

  • Easy to create decoupled architecture with multiple content sources
  • Fast page load times due to much of the content being pre-rendered and the static nature of the content
  • Better for SEO
  • Easily scalable infrastructure that allows the project to grow organically

The Cons

  • Personalization and dynamic content require workarounds or additional services
  • When content does change, you must rebuild the site in order to have these changes reflected on the site

When to use Static Site Generator

Employing SSGs as part of the tech stack enables teams to pull data from multiple data sources and lets teams take advantage of modern approaches to web development. Use cases that are ideal for the SSG approach are those where content does not need to be highly personalized.

Static site generators are typically used in concert with a headless CMS, a static hosting site, and a CDN to cache all of the data. Webhooks trigger to the SSG that there have been changes in the content and the changes are deployed to the site which is stored in a cache. CDNs enable teams to store pre-rendered HTML files in places that are geographically closer to the request, further reducing page load times. We’ve gone into depth on SSGs and their benefits in other posts but here are some highlights on the pros and cons of SSGs.

#Which approach is better?

Like many things in web development, there is no definitive answer on which is better, but rather, it depends.

It depends on the use case and content in addition to the audience, the development team, budget, etc. SPAs with client-side rendering can be more effective for creating dynamic web experiences; however, teams will face the challenges of page load times and may struggle with SEO. Dynamic content that requires a high level of personalization is likely better suited for an SSR approach. SSGs enable teams to build static sites that load quickly and perform well with SEO but may limit the amount of personalization and dynamic content available without labor-intensive workarounds.

There are some tools that can help bring together modern frameworks with greater flexibility. Next.js enables you to create static sites and use server-side rendering using their hybrid approach. Meaning that teams can reap the benefits of SSR or SSG depending on the ideal use case for the elements of their project. Working with Next.js can be helpful to ensure that projects maintain good SEO.

Blog Authors

Share with others

Sign up for our newsletter!

Be the first to know about releases and industry news and insights.