Frontend & Backend Defined

Words like frontend, backend, and variations of them like “frontend development” are broadly used, yet there is little shared understanding as to their meaning leading to inefficient communication at best, and plain misunderstandings at worst.

The cause of the misunderstanding #

The cause for this misunderstanding is that the terms frontend and backend are inherently relative concepts. They can only be well defined given a certain reference frame or position in a distributed system where something is on the front and something is on the back relative to that position.

Graph showing a system that has a frontend and 3 backends. 2 of the backends in turn talk to 1 additional backend.

However, folks often think about the terms in absolute terms:

  • If it is towards the front of the system it is the frontend (e.g. the user interface)
  • and if it is towards the back of the system is is the backend (e.g. the database)

But there are plenty of counter examples that defy this absolute categorization. My personal favorites are:

  • Blink is the Chrome browser’s backend. It runs on the client like the rest of the browser and it is responsible for actually drawing the pixels of the website.
  • The database MySQL has pluggable storage engines that act as a backend to a common database frontend which handles the SQL parsing and other horizontal tasks.

General definition #

In general, the frontend of a system is the part that provides interfaces (UIs or APIs) to the system’s clients. A system is a backend if it is a backend of another system. Being a backend of another system means that the other system in very broad terms invokes services against the backend.

Disambiguating the absolute terms #

That general definition out of the way, using the terms in the absolute sense is widely done. It leads to misunderstandings because the system boundaries of the absolute terms are arbitrary and there are multiple reasonable boundaries to place them. For this post we’ll be using uppercase-Frontend and uppercase-Backend when referring to the absolute terms to remove ambiguity. Outside of blog posts about these literal terms, things are not as complicated as long as one does not mix the relative and absolute usage in the same text.

So, let’s define Frontend and Backend in the most sensible way:

  • The Frontend is the part of a distributed system that is concerned with serving clients that are external to the system.
  • The Backend is the part of a distributed system that provides services to internal clients but where the services aren’t only needed because of intricacies of the external client concern.
  • If the exact same service serves both internal and external clients, then the service is a Backend.

Visualization of the absolute terms. The following text has the same info as image.

The Frontend #

Notably, in this definition the Frontend can be a complex distributed system in its own right. So, what is the Frontend:

  • The user interface implementation of an application
  • The part of an application that runs on the client
  • User-facing reverse-proxies like CDNs and ingress firewalls
  • Servers that respond directly or through reverse-proxies to end users to perform tasks such serving assets or performing server-side rendering.
  • API services, like GraphQL or RPC servers, that respond directly or through reverse-proxies to external clients.
  • Specialized services that are technically a backend to the above, but are specialized for Frontend concerns such as services for image optimization.

The Backend #

And the Backend is:

  • The services that implement business logic that is independent of presentation logic for external clients.
  • GraphQL or RPC services that get invoked by other internal services.
  • Databases
  • Everything needed to communicate between these services, persist data, query data, etc.

This may just be 4 bullet points, but the variety of backend-specific services summarized above is huge.

Other definitions #

Some folks use the word frontend to strictly refer to the human-facing client-side. This seems less useful as one can just call that client-side to avoid ambiguity.

Somewhat out of fashion, there was a time where the word backend was used for the administrative user interface of an otherwise end-user-facing application. This definitely seems like a bad use of the word backend since it, technically, refers to a frontend that happens to be directed at your employees.

The benefits of definitions #

The main purpose of this post is to highlight the genuine confusion created by the ambiguous usage of the terms backend and frontend, and to provide a useful definition for the most popular usages of the terms. This post likely won’t end the confusion, but it can help raise awareness that it’s worth clarifying the meaning if there is a chance of ambiguity.

At Vercel we're building the Frontend Cloud providing the infrastructure to effortlessly run the Frontend while traditional hyper-scalers have been more focused to provide a cloud for the Backend.

Published