H.Y.Z

Modern Decoupled Commerce:What is static sites

Web development is the key to build successful online business and shape branding for enterprise. Modern static website with create user-friendly provides a solid digital infrastructure for business growth, and increasingly win valued by entrepreneur.

HTML static pages

In early web development, websites are built based on different HTML files, which are rendered on the browser side, this was not user-friendly. Each request required a separate HTML file with slow load speed, especially for large websites with a number of HTML pages, this will cause performance degradation.

PHP dynamic website

In order to improve website performance, avoid repetitive codes in the development, developers use modularization to split HTML pages. This is what we know as dynamic website, usually refers to PHP website with server-site rendering mode. The PHP website simplifies the programming and improves the performance, but still get a problem, it calls the server data by every request and highly relies on the server performance. For large projects, enterprise purchase a server with higher performance and expand the database due to business needs which is an expensive.

Both browser-site rendering HTML page or a server-site rendering PHP site, the performance and speed are not meet the demands in the digital age. With the popularity of mobile devices and development of e-commerce, these outdated technologies will gradually be replaced.

Pre-rendered static site

Static site generator SSG (learn more about what are static site Generators) tools can solve the problems well which occur in the browser rendering and server rendering. Usually, the static site generator SSG (Next.js and Gatsby.js) is used to package all site resources, such as HTML, JavaScript and CSS, images and videos, use the server-side pre-rendering to generate HTML pages which will be deployed on the global CDN.

The biggest feature of the static website generated by SSG is the amazing fast speed, 5-10x than traditional. In addition, they don't need servers and databases which save costs particularly in development of big projects.

SSG static sites and dynamic websites

Both the SSG static site and dynamic website are server-site rendering. SSG static sites is pre-rendered HTML pages, using the global CDN edge network to display the content in lightning-fast to users while a dynamic website generates the content through interaction with server.

Currently, almost CMS platforms are dynamic websites, the most famous WordPress CMS use PHP as the building language. In the e-commerce world, Shopify online business CMS build the platform using Liquid language developed by shopify. The common features of CMSs are that the front-end and the background data are tightly bound together, which limits the flexibility and scalability of the enterprise development.

Three key components of static website

With the promotion of the JAM-Stack, more and more static websites, consists of three key components, are getting popular for building a modern web application.

Static Site Generators SSGs: SSG is a front-end development tool that can pre-render the HTML pages using content templates and raw data. Commonly used SSG tools are, for example, Next.js and Gatsby.js which developed based on React framework, Nust.js is based on Vue.js, and Hugo static site generator belong to Go language.

Headless CMS and API: Using headless CMS as the backend to construct the content fields and data types. Developers obtain the data by calling from the API-layer and integrate in the page. Among them, API connect the headless CMS and SSG together, to build a complete static website, although, they are independent systems. Content editors and marketers take headless CMS to simplify the workflows, create and modify content without the involvement of developers.

CDN Pre-Caching: The content delivery network is a strong accelerator which will be deployed in every node worldwide. The content will be sent by the closest CDN node which extremely improve the data response. Vercel, Netlify, and Digital Ocean are the commonly used CDNs for deployment.

Pros of a static website

Lightning-fast: The static website generated by SSG provides lightning-fast loading speed, which is 10x faster than traditional. Speed optimization in WordPress website is significant, but still hit limitations because of the bottom language of PHP. Therefore, more and more enterprises are now using Headless WordPress to rebuild their websites to accelerate business growth.

Security: One of the biggest advantages of SSG static sites is secure tech stack. It uses headless CMS and APIs, and does not need a traditional server and databases. In this way, hackers can't find the system vulnerabilities.

High performance: The separation of the front-end and back-end offers web application lightweight and easier coding maintenance, to create best user experience.

Extensible: Static website is flexible and scalable. Developer can freely choose the language framework and third-party software in the project to cut down the costs without re-development. On-demand cost give enterprise much more flexible in the future.

Cons of static websites

There are two disadvantages that you should consider in building the SSG static site.

Professional Dev-Knowledges

Professional knowledges of full-stack web development and higher coding skill are required by IT team, who will build the website in use of many different dev-tools in complicate development workflow.

Not for frequently data changing

Static site isn't a master for dynamic website with high frequency. Every changing will trigger re-rendering the complete website, this may occur more cost for long build time. To fix this problem, developers need to do more extra work. But this shortcoming will be solved using the Next.js framework, which offer a mix of SSG and SSR to create dynamic content.

If your website is overload with big traffic and works slowly, building a SSG static site is definitely a ideal solution for your business growth. Try to use new modern tech stack like headless commerce to stay ahead is significant in a digital age.

Conclusion

Static site is essential component in building a decoupled architecture commerce, lick headless or Jamstack website. It can be easily decoupled on CND networks to boost the site speed and sell your products and serveices to global. If you need more information about the headless commerce please move to this page, or ask HaiCommerce's expert to give you more suggustions for your online business.

COLLABORATION

© 2023 H.Y.Z Based in Shenzhen China
LET'S TALK
+8618818587045
jonas.zhan@gmail.com