This relatively new concept of software development is becoming one of the most significant trends that will soon change the face of eCommerce. Based on the idea of separating the UI (frontend) from the application logic (backend), it provides even the most mature businesses with the maneuverability and flexibility of a start-up.

"Headless architecture" is an approach that fits into broader trends, such as microservices architecture, which have been a lifeline for the monolithic systems of Netflix, Amazon, and Uber. All of them made a significant shift to microservices because they realized that sticking with the applications they started with was becoming an obstacle to scaling the business.

Netflix, Amazon and Uber: From monolith apps to microservices

Netflix was one of the first businesses to conclude that a monolithic architecture is not an optimal solution for a complex application, because the components in a monolithic app are tightly connected and a single mistake can lead to several days of downtime. In the VOD business, it is a dealbreaker to users, and so the risk was too high to bear.

Amazon, now the largest eCommerce platform in the world (which sells literally everything), started out as a modest bookstore. A two-tier monolithic app was a perfect solution for this relatively small entity. However, when Amazon started to grow, it faced a pressing problem with the system's scalability. Typical bottlenecks such as long deployments, hard to handle vast databases, difficulties with adding new features, and fluctuating website traffic, delayed the company’s growth.

Uber was, at first, a straightforward app available only in San Francisco and consisting of a few features like connecting drivers and users, billing, and payments. A monolithic architecture was just fine for a local enterprise but, similar to Amazon, became a massive roadblock when Uber began to scale.

In fact, it’s the same story told many times over in different major companies. Zalando hit a similar wall in 2010. It had already transformed from a modest store that primarily sold flip flops to a widely known fashion brand—and their Magento-based eCommerce system couldn't handle so much more load. Switching to microservices gave Zalando the possibility to speed up the integration of new innovations and A/B testing which one would bring the best conversion. Zadig & Voltaire and Tally Weijl, both brands operating in the fashion industry similarly to Zalando, have followed the lead. These fast-growing French and Swiss companies have also moved over to microservices. No wonder, in the fast-growing eCommerce market, there is no place for laggards—and the fashion industry is particularly ruthless with those who deal in last year's trends.

Microservices are, however, certainly not limited to the big, globally-operating brands. In fact, they are very democratic, simply because they don't force a bloody revolution in the system, by killing off the whole class of existing functionalities and restarting the architecture from the very beginning. On the contrary, they are very agile and enable the addition of new business functionalities to existing monoliths, and integrate with standard UI with almost no technical support. In practice, it means that several different platforms (e.g., CRM, CMS, OMS, loyalty programs) can be ‘covered’ under one umbrella (i.e., frontend) and managed by a person without deep technical knowledge.

Monolithic software? Time to move forward

A monolithic architecture provides all the components needed for managing and publishing content on the web with a single codebase. Fifteen years ago, monoliths were the only option for eCommerce businesses; they seemingly represented a cozy "all-in-one" approach and guarantee full control of the system. What more could you ask for?

However, many companies that relied on them, found that growth led to problems with keeping up with their own scale or—in case of big enterprise companies—with legacy systems issues. They often required large IT departments, specialized in old frameworks like DB2, C, Pascal, .NET, Java, or Cobol, only to maintain infrastructure and solve technical problems. Maintenance took up the time that should have been spent building modern features for users.

Long story short, monoliths were simply incapable of keeping up with the pace of business.

Staying up to date with the latest market trends is difficult

Fast-paced changes in customer habits make the eCommerce market a highly competitive environment. The sellers must be agile enough to implement modern solutions and meet trends and expectations quickly, because the user loyalty is very fragile and depends directly upon the experience they are given. Monolithic architecture makes it challenging to deliver great experiences when all elements are tightly connected; moving to modern frameworks that deliver, for instance, better web performance can be risky, as can changing the UI. Since the frontend and the backend are one unit, developers can't just alter the frontend layer to adjust it to the new brand identity or marketing goals without interfering with the underlying database code.

Every change needs a lot of coding

All updates made in the monolithic systems are highly time-consuming since they need to be thoroughly tested. It requires more labor to make sure nothing goes wrong, and the time of IT professionals does not come cheap. The testing processes, however, is impossible to avoid since one single mistake can cause the whole system to collapse.

One Service provider limits the business possibilities

The all-in-one approach, as we mentioned above, seems comfortable at first. There is no need to dig the internet in search of additional solutions; everything is simple to develop, test, and implement—especially since the providers often deliver easy-to-use tools to handle all these processes.

The problems start at during growth, when default features turn out to be not the best ones available on the market, and the dependency on one IT provider reveals itself as a significant drawback.

Microservices architecture as a way to rescue old systems

Monolithic architecture predetermines the usage of specific schemes. Most monolith systems are powerful and do have multiple plugins and features but—especially in online businesses—it is usually necessary to stray from the beaten track to ahead of the competition. Or at least that was the accepted norm…

And then the microservices appeared. They suddenly allowed for the construction of the systems by putting together loosely coupled elements, almost like working with digital LEGO.

Microservices allow the whole system to develop at different speeds: eg. at the front with fast-paced design iteration and a field to explore new features, and at the back with taking care of security and stability. The two sides of the system communicate via API, so they remain separate entities while the data flow is undisturbed.

That model clarifies not only the structure of code, making it easier for developers to navigate it, but also simplifies the organization's structure, which can mirror it in compliance with Conway's law.

(...) organizations which design systems (...) are constrained to produce designs which are copies of the communication structures of these organizations.

Melvin E. Conway

API (e.g., RESTful API or Storefront API) is a bridge for data transferred between the backend and the frontend, which provides a presenting layer in a consistent and standard format across multiple channels.

This approach has many benefits:

Let's see some examples of these benefits. One of the crucial obstacles in finalizing purchases is poor user experience. Users make snap decisions to abandon the cart if they have to wait for a page to load or are forced to figure out how to find the right information. Yet, they also expect that the content applies to their personal preferences that differ depending on the country in which they live, the devices they used, their age, and other factors. That means sellers need to meet user expectations by offering precisely what they want. Nothing less, nothing more—because overwhelming people with features or content is just as dangerous as offering too little.

With a monolithic system, every frontend design change forces a change in the backend, and vice versa, which makes every decision becomes more consequential. And this issue becomes more complicated as the business grows, e.g., expanding to new countries or offering new products. Every single change on the presentation layer, every customization of templates, site structure, or design, jeopardizes the whole system, including the database.

Microservices solve that problem. Their general idea assumes that technology is used to serve the business, not the other way around. All of the units that an application consists of are focused around business goals and can be deployed or removed as needed.

Headless is must-have in omnichannel eCommerce

Monolithic architecture, such as Magento, for instance, is undoubtedly robust and offers a number of excellent features. However, its great power comes at great cost when it comes to performance. As one extra-large unit with frontend tightly coupled to and dependent upon the backend, monoliths can be very slow. All of the out-of-the-box features mean lots of code—and the more code you have, the longer it takes to process. Headless architecture is based on a decoupled frontend integrated with content management tools via an API, so there is no need to render so much "default" code and everything runs faster.

The advantages of headless CMS, like Prismic, Adobe Experience Manager, Storyblok, Contentful, CoreMedia are, however, not limited to performance. Above all, a decoupled frontend makes the UI layer more flexible. Product Designers and Frontend Developers have much more freedom when it comes to UX/UI design and the preparation of various template options that then can be integrated with CMS and gives the content team a lot of flexibility and the ability to quickly change content without IT being involved. API-based connection to backend enables businesses to serve the content not only to one channel but a whole variety of devices such as websites, smartphones, or even wearables. For example, Netflix, with their headless architecture, could reach the users anywhere within the Internet of Things (IoT) with its familiar UI and near-instant performance speeds.

Thanks to the headless CMS, it is possible to provide as many different experiences for users as needed in the omnichannel world, with no coding. It gives the freedom to adapt the content for specific channels and devices in order to deliver the best possible UX. And since the better UX, the bigger chance to conversion, it is a solution worth considering.

Technical expertise: Piotr Karwatka, CTO, Vue Storefront