EM

Dock

HomeBlogLearning PathsPricingAbout MeContact

Frontend vs Backend: A Simple Mental Model

Sandeep Varma

Nov 27, 2026
Frontend vs Backend: A Simple Mental Model
Photo by Sandeep Varma on EMDock

In the last post in this series, we talked about how almost every piece of software boils down to three jobs: something has to show you things and capture what you want, something has to make decisions and apply rules, and something has to remember information over time. That framing is useful, but engineers rarely talk about their work in exactly those terms. Instead, you will hear two words constantly, in standups, in job titles, in architecture diagrams: frontend and backend.

If you have ever sat in a meeting and heard someone say "that's a backend issue" or "we need a frontend engineer for this," and nodded along without a precise picture of what those words actually mean, this post is for you. The distinction is simpler than it sounds, and once it clicks, a lot of engineering conversations become much easier to follow.

Start With a Car

Think about driving a car. In front of you, there is a steering wheel, a set of pedals, a dashboard showing your speed and fuel level, and maybe a touchscreen for music and navigation. This is the part of the car you interact with directly. You turn the wheel, and the car turns. You press the accelerator, and the car speeds up. The dashboard shows you information you care about, updated continuously, in a form you can glance at and understand instantly.

None of that, however, is what actually moves the car. Underneath the hood and beneath the frame, there is an engine burning fuel, a transmission converting that energy into motion, a braking system, sensors constantly checking speed and temperature, and dozens of other components working together. You never see any of it directly. You do not need to. All you need is the steering wheel to respond when you turn it and the dashboard to accurately reflect what the car is doing.

This is precisely the relationship between frontend and backend in software.

What the Frontend Actually Is

The frontend is everything you directly see and interact with. It is the steering wheel and the dashboard. In software terms, this means the buttons you click, the forms you fill out, the text and images on a page, the animations, the layout, and the overall visual experience of using an app or a website.

When you open a shopping app and browse through products, the images, the "Add to Cart" button, the price displayed next to each item, all of that is frontend. When you type your address into a checkout form, the box you are typing into, the validation message that tells you if you left a field blank, the loading spinner that appears while the order is being placed, that is also frontend.

The frontend's job is to capture what you want and to display information back to you in a way that makes sense. It is built with tools designed specifically for this job, most commonly a combination of HTML for structure, CSS for appearance, and JavaScript for interactivity, often organized using frameworks that make building complex interfaces more manageable. The people who specialize in building this part of a system are often called frontend engineers, and their expertise leans toward visual design, usability, and making interfaces feel fast and intuitive.

An important detail worth remembering: the frontend runs on your device. When you open a website, your browser downloads the frontend code and runs it right there on your phone or laptop. This is different from what happens with the backend, and that difference matters more than it might seem at first.

What the Backend Actually Is

The backend is everything happening away from your screen, the engine and transmission beneath the hood. It is where decisions get made, where rules get enforced, and where information gets stored and retrieved.

Go back to that shopping app. When you tap "Place Order," the frontend does not decide on its own whether that order is valid. It cannot, by itself, know whether the item is actually in stock, whether your payment method will be accepted, or whether your account is allowed to check out at all. Those decisions require rules, and rules require somewhere trustworthy to live. That somewhere is the backend.

The backend typically runs on computers the company controls, not on your device. When your order request arrives, backend code checks the rules that matter: is this item still available, is this a legitimate payment method, has this account been flagged for any reason. Once those checks pass, the backend also handles remembering things: it records that the order was placed, updates the inventory count, and stores your order in your account history so it shows up later when you check your past orders.

In other words, the backend absorbs two of the three jobs we talked about in the previous post: deciding and remembering. Engineers who specialize in this part of the system are often called backend engineers, and their tools look quite different from frontend tools. They typically work in languages like Python, Java, or Node.js, and they spend much of their time thinking about data, business logic, and reliability rather than visual layout.

We have not yet talked about exactly where backend code physically runs, and that is worth its own post. What Is a Server, Really? picks up right where this one leaves off and demystifies the computer that is quietly doing all of this work on your behalf.

Why the Split Exists at All

It would be reasonable to ask why engineers bother separating these two things instead of just building one big program that does everything. The answer comes down to trust, and to a very practical concern: your device is not a safe place to make important decisions.

Because the frontend runs on your device, it is technically visible and changeable by whoever is using that device. Anyone with enough curiosity can open a browser's developer tools, inspect the code running a webpage, and even modify it. That is completely fine for things like layout and visual polish. It becomes a serious problem if important decisions, like whether a discount code is valid or whether a payment has actually gone through, were made entirely on your device, where they could be tampered with.

By keeping decision-making and data storage on the backend, on computers the company controls rather than computers you control, engineers ensure that the rules that matter cannot be bypassed just because someone changed something in their browser. The frontend can suggest, hint, and guide. The frontend can disable a button until a form is filled out correctly, for example, purely to make the experience smoother. But the backend is what actually enforces the rule, checking again, independently, before anything important happens. This separation is not an accident or a historical habit. It is a deliberate safeguard.

There is a second, more everyday reason for the split as well. Keeping frontend and backend separate lets each one change without constantly breaking the other. A team can redesign how a page looks, change colors, rearrange buttons, rebuild the entire visual experience, without touching a single line of the logic that checks inventory or processes payments. Likewise, a team can improve how orders are processed behind the scenes, make it faster, more reliable, more secure, without needing to touch the screen you look at. Just like a car manufacturer can redesign a dashboard without re-engineering the entire engine, separating these two layers means each one can evolve at its own pace.

Walking Through One Example, Piece by Piece

Let's trace a single action all the way through, now that we have both terms in hand.

You open a food delivery app and tap on a restaurant. That tap, and the screen that appears showing the restaurant's menu, is entirely frontend. You are looking at information, images, prices, all displayed on your device.

You select a few items and tap "Add to Cart." Again, mostly frontend. Your device is keeping track of what you have selected and updating the little cart icon in the corner of the screen.

You tap "Checkout" and confirm your order. This is the moment where frontend hands off to backend. Your device sends a request out, essentially saying, "here is what this person wants to order, please process it." The backend receives that request and gets to work. It checks whether the restaurant is currently accepting orders. It verifies your payment method. It calculates the total, including tax and delivery fees. It records the order so the restaurant's kitchen can see it, and it updates your account so this order appears in your history later.

Once all of that is done, the backend sends a response back, and the frontend takes over again, displaying a confirmation screen, an estimated delivery time, maybe a little animation of a delivery driver moving along a map.

Notice how naturally the work divided itself. Anything about what you saw and touched was frontend. Anything about verifying, calculating, storing, and enforcing rules was backend. That division holds up remarkably well across almost any application you can think of.

A Note on "Full-Stack"

You will sometimes hear the term full-stack engineer, which simply describes someone comfortable working on both sides of this divide, capable of building the visual experience as well as the logic and data handling underneath it. Neither side is more important than the other. A beautifully designed interface connected to unreliable, poorly enforced logic will eventually break trust with users. A perfectly solid backend attached to a confusing, clunky interface will frustrate people before they ever experience how well it works underneath. Good products need both done well, which is exactly why teams usually have specialists in each area, and sometimes people who can move fluidly between them.

Where This Fits in the Bigger Picture

This frontend and backend split is genuinely one of the most useful mental models you can carry into any conversation with an engineering team. It explains why some bugs are "frontend bugs," things looking wrong, buttons not responding, layouts breaking on certain screen sizes, while other bugs are "backend bugs," orders not saving correctly, incorrect totals being calculated, data not showing up where it should. It explains why frontend changes often ship faster than backend changes, since visual updates rarely touch the sensitive logic and data underneath.

It is also worth knowing that this two-way split is a simplified starting point. Later in this series, once we have covered a few more foundational pieces, we will revisit this same idea in more depth and see how the backend itself is often broken down further, into a layer that handles logic and a separate layer that handles data storage. For now, though, frontend and backend is the right level of resolution. Everything you see belongs to one side. Everything that decides and remembers belongs to the other.

What Do You Think?

Now that you have this mental model, try applying it the next time you use an app. Can you spot the moment where a tap or a click hands off from something visual to something that clearly required a decision or a stored piece of information?

Have you run into a "frontend vs backend" conversation at work that felt confusing at the time? I would love to hear what it was about, and whether this mental model would have made it easier to follow.

Enjoyed this? Get the next one by email

New posts on leading engineering teams, straight to your inbox.

No spam. Unsubscribe any time.

Did you find this useful?


Comments

Loading comments...

to post a comment.


About the author

Sandeep Varma

Senior Engineering Manager

I write about leadership and software engineering from experience as a software engineer, product owner, and engineering manager, grounded in a Bachelor’s in Computer Science Engineering and an MBA in IT Strategy.

View full profile

Continue reading


How Software Systems Actually Work (At a High Level)

Before Software Goes Live: Understanding Dev, QA, and Production Environments

A simple, real-world way to understand how software moves from a developer’s laptop to a live application.