Why Use JAMstack for eCommerce in 2021?
Tags: jamstack, ecommerce
Published: 2021-03-02 15:29:50

<!-- wp:heading -->
<h2>Introduction</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>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.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Most common problems that online store owners face:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>Slow page speed</li><li>Poor user experience</li><li>Decreasing organic traffic</li><li>High maintenance costs</li><li>Developing new features takes a long time</li><li>Shop looks like any other shop</li></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>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.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2><br>What is JAMstack?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Let’s put it as simple as possible – <strong>JAM</strong>stack is a mix of <strong>J</strong>avaScript frameworks, <strong>A</strong>PIs and <strong>M</strong>arkup.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>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.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Elements of JAMstack:</p>
<!-- /wp:paragraph -->

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

<!-- wp:paragraph -->
<p>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.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>To make the most out of JAMstack, we recommend you to use it for:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>eCommerce shops</li><li>Custom landing pages</li><li>Software and SaaS</li></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>Today, let’s focus on eCommerce.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2><br>Why use JAMstack for eCommerce?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>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:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li><strong>Page speed </strong>– 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.</li><li><strong>SEO efficiency </strong>– 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.</li><li><strong>Omnichannel</strong> – since JAMstack websites work on any device, you can convert both web and mobile users.</li><li><strong>Rich user experience</strong> – JAMstack means freedom of creating front-end the way you always wanted, without any limitations or compromising the speed or the features</li><li><strong>Future-proof</strong> – stop using out-dated technologies and become innovative by starting to use JAMstack.</li><li><strong>Security</strong> – 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.</li></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>These are the benefits of JAMstack in general, but there are still many benefits that we could call “dedicated” for eCommerce.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3,"textColor":"vivid-red"} -->
<h3 class="has-vivid-red-color has-text-color"><strong>You can sell your products everywhere</strong></h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>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.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>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.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3,"textColor":"vivid-red"} -->
<h3 class="has-vivid-red-color has-text-color"><strong>Improved time to market</strong></h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>As already mentioned, better developer experience translates into improved time to market. JAMstack boosts development process and also helps to:</p>
<!-- /wp:paragraph -->

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

<!-- wp:heading {"level":3,"textColor":"vivid-red"} -->
<h3 class="has-vivid-red-color has-text-color"><strong>Unlimited experience possibilities</strong></h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>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.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>What’s more?</strong></p>
<!-- /wp:paragraph -->

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

<!-- wp:heading {"level":3,"textColor":"vivid-red"} -->
<h3 class="has-vivid-red-color has-text-color"><strong>It costs less than a traditional approach</strong></h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>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.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3,"textColor":"vivid-red"} -->
<h3 class="has-vivid-red-color has-text-color"><strong>Better developer experience</strong></h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>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.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2><br>How JAMstack works in eCommerce?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>If you are curious about how JAMstack works in the case of eCommerce online store, here is the summary:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>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</li><li>To publish content updates, you need to use a CDN and a headless CMS</li><li>The storefront web application is requested through a CDN by the visitor’s browser</li><li>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.</li></ul>
<!-- /wp:list -->

<!-- wp:heading -->
<h2><br>Things to consider before using JAMstack in eCommerce</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>There are two main limitations – adding eCommerce functionality to static websites and handling stores with thousands of pages.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3,"textColor":"vivid-red"} -->
<h3 class="has-vivid-red-color has-text-color"><strong>Mixing eCommerce functionality and static websites</strong></h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>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.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>It’s not exactly true.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>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.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3,"textColor":"vivid-red"} -->
<h3 class="has-vivid-red-color has-text-color"><strong>Using JAMstack for big online stores</strong></h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>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…</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>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.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2><br>How to start with a JAMstack?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Let’s move on to the more practical aspects of using JAMstack in web projects. And there are two of them to consider.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>First of all, you have to choose the technologies you will use for your eCommerce.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Second of all, if you already have an online store, you need to prepare for JAMstack migration.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3><br>JAMstack technologies for eCommerce</h3>
<!-- /wp:heading -->

<!-- wp:heading {"level":4,"textColor":"vivid-red"} -->
<h4 class="has-vivid-red-color has-text-color"><strong>Front-end technologies</strong></h4>
<!-- /wp:heading -->

<ul>
<li><a href="https://pagepro.co/gatsby-development.html" target="_blank" rel="noreferrer noopener nofollow">Gatsby.js</a></li>
<li><a href="http://nextjs.org/" target="_blank" rel="noreferrer noopener nofollow">Next.js</a></li>
<li><a href="https://pagepro.co/react-development.html" target="_blank" rel="noreferrer noopener nofollow">React.js</a></li>
<li><a href="https://www.typescriptlang.org/" target="_blank" rel="noreferrer noopener nofollow">TypeScript</a></li>
</ul>

<!-- wp:heading {"level":4,"textColor":"vivid-red"} -->
<h4 class="has-vivid-red-color has-text-color"><strong>eCommerce Platforms</strong></h4>
<!-- /wp:heading -->

<ul>
<li><a href="https://shopify" target="_blank" rel="noreferrer noopener nofollow">Shopify</a></li>
<li><a href="https://www.bigcommerce.com/" target="_blank" rel="noreferrer noopener nofollow">BigCommerce</a></li>
<li><a href="https://crystallize.com/" target="_blank" rel="noreferrer noopener nofollow">Crystallize</a></li>
<li><a href="https://magento.com/products/magento-commerce" target="_blank" rel="noreferrer noopener nofollow">Magento</a></li>
<li><a href="https://saleor.io/" target="_blank" rel="noreferrer noopener nofollow">Saleor</a></li>
</ul>

<!-- wp:heading {"level":4,"textColor":"vivid-red"} -->
<h4 class="has-vivid-red-color has-text-color"><strong>Content Management Systems</strong></h4>
<!-- /wp:heading -->

<ul>
<li><a href="https://www.contentful.com/" target="_blank" rel="noreferrer noopener nofollow">Contentful</a></li>
<li><a href="https://www.sanity.io/" target="_blank" rel="noreferrer noopener nofollow">Sanity</a></li>
<li><a href="https://strapi.io/" target="_blank" rel="noreferrer noopener nofollow">Strapi</a></li>
<li><a href="https://wordpress.org/" target="_blank" rel="noreferrer noopener nofollow">WordPress</a></li>
</ul>

<!-- wp:heading {"level":4,"textColor":"vivid-red"} -->
<h4 class="has-vivid-red-color has-text-color"><strong>Hosting and deployment</strong></h4>
<!-- /wp:heading -->

<ul>
<li><a href="https://www.netlify.com/" target="_blank" rel="noreferrer noopener nofollow">Netlify</a></li>
<li><a href="https://vercel.com/" target="_blank" rel="noreferrer noopener nofollow">Vercel</a></li>
<li><a href="https://aws.amazon.com/" target="_blank" rel="noreferrer noopener nofollow">AWS</a></li>
<li><a href="https://firebase.google.com/" target="_blank" rel="noreferrer noopener nofollow">Firebase</a></li>
</ul>

<!-- wp:heading {"level":3} -->
<h3><br>How to prepare for a JAMstack migration?</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Some time ago, we wrote a guide about <a href="https://pagepro.co/blog/migration-from-wordpress-to-jamstack/" target="_blank" rel="noreferrer noopener">migrating websites from WordPress to JAMstack</a>. In the case of online stores, you can choose one of two strategies:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>You can use your existing eCommerce platform (i.e. Shopify) as a headless eCommerce</li><li>You can migrate from an existing platform to the other one, and use it as a headless platform</li></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>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.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>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.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2><br>Examples of JAMstack eCommerce stores</h2>
<!-- /wp:heading -->

<!-- wp:heading {"level":3} -->
<h3>ButcherBox</h3>
<!-- /wp:heading -->

<!-- wp:image {"id":5058,"sizeSlug":"large"} -->
<figure class="wp-block-image size-large"><img src="https://pagepro.co/blog/wp-content/uploads/2020/12/butcherbox-screenshot-1024x508.png" alt="" class="wp-image-5058"/><figcaption><a href="https://butcherbox.com" target="_blank" rel="noreferrer noopener nofollow">https://butcherbox.com</a></figcaption></figure>
<!-- /wp:image -->

<!-- wp:heading {"level":3} -->
<h3>Paul Valentine</h3>
<!-- /wp:heading -->

<!-- wp:image {"id":5059,"sizeSlug":"large"} -->
<figure class="wp-block-image size-large"><img src="https://pagepro.co/blog/wp-content/uploads/2020/12/paul-valentine-screenshot-1024x508.png" alt="" class="wp-image-5059"/><figcaption><a href="http://paul-valentine.com/" target="_blank" rel="noreferrer noopener nofollow">http://paul-valentine.com/</a></figcaption></figure>
<!-- /wp:image -->

<!-- wp:heading {"level":3} -->
<h3>Victoria Beckham Beauty</h3>
<!-- /wp:heading -->

<!-- wp:image {"id":5060,"sizeSlug":"large"} -->
<figure class="wp-block-image size-large"><img src="https://pagepro.co/blog/wp-content/uploads/2020/12/victoria-beckham-beauty-screenshot-1024x508.png" alt="" class="wp-image-5060"/><figcaption><a href="https://www.victoriabeckhambeauty.com/" target="_blank" rel="noreferrer noopener nofollow">https://www.victoriabeckhambeauty.com/</a></figcaption></figure>
<!-- /wp:image -->