1 of 10

SESSION 1 · BACKEND ENGINEERING SERIES

Backend, Client-Server, HTTP & API

The Big Picture

What actually happens when a client calls a backend?

$ curl -X POST /orders

2 of 10

THE BIG PICTURE

What a request actually touches

Client

Sends the request

API

Entry point & contract

Backend

Runs the logic

Database /

External Services

Stores & fetches data

Response flows back the same path

Backend Engineering · Session 1

2 / 10

3 of 10

WHY IT EXISTS

Why do we need a backend?

Example: placing an order in an e-commerce app

If the client controlled everything

With a backend in between

Client can send any price it wants

Client has a direct line to the database

Business rules live in app code — easy to bypass

Server re-validates price & stock every time

Database access stays centralized & controlled

Business rules enforced in one trusted place

Backend Engineering · Session 1

3 / 10

4 of 10

REQUEST LIFECYCLE

What happens when you click "Place Order"?

User

1

Frontend

2

HTTP

Request

3

Backend

4

Business

Logic

5

Database /

Other Services

6

HTTP

Response

7

Frontend

renders result

8

Numbers show the order of the round trip — the response follows the reverse path back to the user.

Backend Engineering · Session 1

4 / 10

5 of 10

FOUNDATIONS

What is a server, really?

Your Laptop / Cloud VM

JVM Process — Spring Boot App

listening on localhost:8080

waits for requests → handles them → sends a response

Request

Response

• Not necessarily special hardware

• Just a running application / process

• Same code works on your laptop or in the cloud

Backend Engineering · Session 1

5 / 10

6 of 10

HTTP

HTTP — the language of the request

REQUEST

METHOD + URL

POST /orders HTTP/1.1

HEADER

Host: api.shop.com

HEADER

Content-Type: application/json

BODY

{ "productId": 42, "qty": 1 }

RESPONSE

STATUS CODE

201 Created

HEADER

Content-Type: application/json

BODY

{ "orderId": 981,

"status": "PLACED" }

Backend Engineering · Session 1

6 / 10

7 of 10

APIS

What is an API?

A contract that lets two systems talk without knowing each other's internals

Backend

Frontend

Payment API

Email / Notification API

API is the broader concept — REST is just one common way to design a web API.

Backend Engineering · Session 1

7 / 10

8 of 10

REST

REST API — practical mental model

Same resource, different HTTP methods, different intent

GET

/orders/123

Read a specific order

POST

/orders

Create a new order

PATCH

/orders/123

Update part of an order

DELETE

/orders/123

Remove an order

Resource (the noun, e.g. /orders) + HTTP method (the verb) = the action.

Backend Engineering · Session 1

8 / 10

9 of 10

PUTTING IT TOGETHER

One complete example: placing an order

POST /orders

Controller

receives & validates the request

Business Logic

applies the actual order rules

Database / External Services

saves the order, calls payment

201 Created

Next session: how do we structure the layers inside the backend itself?

Backend Engineering · Session 1

9 / 10

10 of 10

SESSION 1 RECAP

Key takeaways

1

Backend owns server-side business logic.

2

Client talks to the backend through an interface — the API.

3

HTTP carries requests and responses over the wire.

4

API is a contract between systems; REST is one style of it.

5

As backend complexity grows, architecture starts to matter.

Next up → Why do we need application architecture and layers?

Backend Engineering · Session 1

10 / 10