DEV Community

Cover image for Why Use JAMstack for eCommerce in 2021?
tomgrabski for Pagepro

Posted on • Originally published at pagepro.co

Why Use JAMstack for eCommerce in 2021?

Introduction

Online stores are facing the biggest number of challenges ever. Also, they compete with each other harshly for actual and future increasingly demanding customers. Meeting these demands and overcoming challenges is getting harder because it requires flexibility, readiness to make changes fast, and knowledge of ever-changing modern technologies.

Most common problems that online store owners face:

  • Slow page speed
  • Poor user experience
  • Decreasing organic traffic
  • High maintenance costs
  • Developing new features takes a long time
  • Shop looks like any other shop

The good news is that such problems are solvable and today I want to introduce you to JAMstack – one of the most popular solutions these days.


What is JAMstack?

Let’s put it as simple as possible – JAMstack is a mix of JavaScript frameworks, APIs and Markup.

Matt Billmann, CEO of Netlify, and Chris Bach came with the name of “JAMstack” to make it easier to talk about this architectural approach in everyday conversations. JAMstack means using existing technologies and fundamentals of web development, so it’s not a name for something new – it’s rather a name for something we already use to build the modern web.

Elements of JAMstack:

  • JavaScript – responsible for handling dynamic programming during the request/response cycle
  • APIs – responsible for handling all server-side databases and database actions, which are then accessed through HTTPS with JavaScript
  • Markup – responsible for what user will see that can be pre-build with Gatsby, for example.

The main goal of JAMstack is to help developers build faster, more secure, and easier to scale web. It does this by providing a possibility to use tools and workflows which support productivity.

To make the most out of JAMstack, we recommend you to use it for:

  • eCommerce shops
  • Custom landing pages
  • Software and SaaS

Today, let’s focus on eCommerce.


Why use JAMstack for eCommerce?

Many businesses decide to go with JAMstack to start building their online businesses or develop them, and they have strong arguments for that. Among them are:

  • Page speed – websites created with JAMstack amaze users with their page load speed. In other words, you will stop losing clients because your website’s performance is poor.
  • SEO efficiency – getting high rankings in Google means getting more organic traffic which means more clients. JAMstack helps you achieve better positions because Google favours static pages (aka JAMstack pages) as they are fast, light and easy to scan.
  • Omnichannel – since JAMstack websites work on any device, you can convert both web and mobile users.
  • Rich user experience – JAMstack means freedom of creating front-end the way you always wanted, without any limitations or compromising the speed or the features
  • Future-proof – stop using out-dated technologies and become innovative by starting to use JAMstack.
  • Security – more and more people are aware of the importance of cybersecurity. As JAMstack websites have no direct connection to the database, user data or any other sensitive information, it makes your website bullet-proof like Robocop.

These are the benefits of JAMstack in general, but there are still many benefits that we could call “dedicated” for eCommerce.

You can sell your products everywhere

Creating a JAMstack eCommerce store means decoupling the front-end layer (what users see) with a back-end layer (business logic). Because of that, you have freedom of publishing and displaying your products and contents on multiple online platforms from Facebook to Amazon, to name just two.

Such a possibility comes with the ease of managing all digital sales channels in one place instead of checking data in each of these channels separately.

Improved time to market

As already mentioned, better developer experience translates into improved time to market. JAMstack boosts development process and also helps to:

  • Build user interfaces the way you want
  • Personalise customer experience so your online store can truly be unique
  • Add new touchpoints (places where customers can find your products) without the necessity of using additional software
  • Develop new features or implement changes faster because it’s possible to work on front-end and back-end layers at the same time

Unlimited experience possibilities

JAMstack allows you to build a custom storefront for your customers which provides unique shopping experiences and makes you truly stand out from the competition. In other words, now the time has come to have total freedom of designing a front-end layer finally.

What’s more?

  • You can build a custom storefront or PWA based on BigCommerce, Shopify or some other eCommerce platform
  • JavaScript SDKs like those provided by Shopify will help you to create a user-friendly shopping experience
  • If you have more than one group of customers, you can design a unique experience for each one of them

It costs less than a traditional approach

First of all, static websites don’t require as much storage space as dynamic websites so that hosting will cost less. Second of all, development costs will be lower than in the case of building everything from scratch. Third of all, maintenance is less painful, so, consequently, its cost will drop.

Better developer experience

Developers don’t have to be full-stack developers who take care of everything, from implementing layout to connecting it with the back-end layer. As JAMstack makes it possible to use APIs, developers can rely on eCommerce solutions like Shopify and focus just on creating a front-end layer. Consequently, the development time and cost drop.


How JAMstack works in eCommerce?

If you are curious about how JAMstack works in the case of eCommerce online store, here is the summary:

  • In a case of any changes, these are pushed to a Source Code Management (SCM). As for the hosting, you can use either static-site providers or services like Firebase or Netlify
  • To publish content updates, you need to use a CDN and a headless CMS
  • The storefront web application is requested through a CDN by the visitor’s browser
  • Although our website is static-generated, it can contain dynamic elements. Thanks to this, we don’t lose on functionality while improving performance at the same time.


Things to consider before using JAMstack in eCommerce

There are two main limitations – adding eCommerce functionality to static websites and handling stores with thousands of pages.

Mixing eCommerce functionality and static websites

As static websites are, well, static, some may have a belief that such websites can’t offer features or functionalities inevitable for eCommerce stores like handling payments, product recommendations, product searching, just to name a few.

It’s not exactly true.

There are some ready-to-use workarounds in the form of so-called third-party tools. In other words, JAMstack developers can use the power of APIs to make building an eCommerce store on top of a static website possible.

Using JAMstack for big online stores

However, it’s not the biggest issue – build time of huge online stores is. And by huge I mean these stores that have like thousands of product pages. The problem is because the JAMstack approach requires the rebuild of every page even if only one page has been changed. So imagine rebuilding thousands of pages every time you make a minor change…

But there is a solution for that – something called incremental builds. It’s a feature available in Gatsby Cloud and Next.js that limits rebuilding only to those pages that have been changed. Therefore, large online stores with thousands of pages also can migrate to JAMstack if it’s what they want.


How to start with a JAMstack?

Let’s move on to the more practical aspects of using JAMstack in web projects. And there are two of them to consider.

First of all, you have to choose the technologies you will use for your eCommerce.

Second of all, if you already have an online store, you need to prepare for JAMstack migration.


JAMstack technologies for eCommerce

Front-end technologies

eCommerce Platforms

Content Management Systems

Hosting and deployment


How to prepare for a JAMstack migration?

Some time ago, we wrote a guide about migrating websites from WordPress to JAMstack. In the case of online stores, you can choose one of two strategies:

  • You can use your existing eCommerce platform (i.e. Shopify) as a headless eCommerce
  • You can migrate from an existing platform to the other one, and use it as a headless platform

The decision depends only on whether you are satisfied with the existing solution because you can use any eCommerce platform with JAMstack as long as it provides an API.

How the entire process of migration to JAMstack will look depends on from what and to what one wants to migrate. In one case, you may get a storefront you just need to customise the way you want, and in the other case, you may need to synchronise eCommerce with a storefront, i.e. through a plugin.


Examples of JAMstack eCommerce stores

ButcherBox

https://butcherbox.com

Paul Valentine

http://paul-valentine.com/

Victoria Beckham Beauty

https://www.victoriabeckhambeauty.com/

Top comments (0)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.