Q1Which of a web app's four parts do you use rather than build in-house?
The Parts of a System — What You Build In-House and What You Hand to External Services
This article is part of the IT Foundations course, which builds up from scratch the practical IT knowledge you need at a minimum for programming and vibe coding.
A web app splits into four parts: frontend, backend, database, and external services. Diagrams show how much you build yourself and where you start using an outside service.
This article covers the four parts that make up a web app.
You build three of them in-house (developing and setting them up yourself), and you use the remaining one as an external service.
- The screen for entering the booking date and name
- Runs on the user's device
- Processes the booking details it receives
- The identity check happens here too
- Stores the booking and member data
- Can be searched and updated later
- Sending confirmation emails, payments, showing maps
- Calls features that another company operates
The line between building in-house and using a service is where these two frames meet.
A web app splits into four parts
The four parts are the frontend, the backend, the database, and external services.
It is the backend that connects to the database and the external services, and the screen does not connect to them directly.
The server these two run on — a computer that stays powered on and can accept requests from other computers at any time — is a different computer from the user's device.
Only the fourth one, the external service, is not built in-house; you use what another company operates.
The three on the upper branch have their implementation on your side, so you are the one who fixes them.
The database is a product you choose and operate, but when it stops working, it is your side that steps in.
Only the external service is one you cannot fix yourself when it fails, and you wait for the other company to restore it.
Deciding what to hand over is also deciding what you cannot fix yourself.
Four parts, one boundary
A web app splits into four: the frontend, the backend, the database, and external services.
You build the first three in-house and use features another company operates only for the external services, so who provides the implementation and who handles a failure both change at this boundary.
External services are not built in-house; you use them through an API
Features that are a lot of work to provide yourself, such as sending confirmation emails or taking payments, are handed to external services.
The rules you follow when calling an external service are the API — the agreed rules programs use to exchange data with each other.
Only the middle moves to the external service, and making the request and checking the result stay on your side.
What stays on your side is only sending the request and checking the result that comes back.
If you build it in-house, keeping it running becomes your job on top of the feature itself.
Even when you hand it over, sending the request and checking the result stay with you.
What moves to the external service is only the implementation.
External service and external API
You will sometimes see the two written separately: external service for what you call, and external API for the entry point you call it through.
They point at the same thing, and the difference is whether you look at it as a service or as an entry point.
Success or failure is decided independently for each part
One action can span several parts.
Whether a booking is confirmed is decided by the write to the database, and whether the confirmation email goes out is decided by the request to the external service.
A booking is confirmed the moment it is written to the database.
Sending the confirmation email happens afterward, as a separate request to the external service.
Even if the email does not arrive, a confirmed booking stays.
This split is directly useful when you investigate a problem.
"The booking is not there" and "the confirmation email did not arrive" send you to different parts.
For the first you check the backend and the database, and for the second you check the request to the external service.
The upper branch is the confirmation and the lower branch is the notification, and if one fails, the other stays as it is.
Success and failure are decided part by part
When one action spans several parts, success and failure are not decided all together.
A booking is confirmed by the write to the database and the confirmation email is decided by the request to the external service, so when a problem is reported, first work out which of the two failed.
Knowledge Check
Answer each question one by one.
Q2What happens if the confirmation email does not arrive after the booking has been written to the database?
Q3When you hand sending the confirmation email to an external service, what stays on your side?