How do you structure an application where one side (client) handles user interaction while another side (server) manages data and processing? What is the fundamental architecture?
The client-server model is a distributed architecture where clients request services from servers. The client handles most user-facing tasks while the server manages data and logic. Front end maps to client, back end maps to server.
- Client: Initiates requests, renders UI, captures user input, displays results
- Server: Receives requests, processes logic, accesses data, returns responses
- Communication: Through network protocols (HTTP, WebSocket)
- Separation: Client and server can be on different machines, even geographically separated
- Responsibilities: Client focuses on presentation, server focuses on data/processing
This separation allows scaling—multiple clients can connect to one server, and servers can be scaled independently from clients.
- Client makes requests, server provides responses
- Client is typically front end, server is typically back end
- Network communication between client and server
- Server is usually more powerful, shared across clients
- Client can be thin or thick (rich client with more logic)
- Stateless or stateful communication patterns
Built from:
Builds into:
- Front End — Client side is front end
- Back End — Server side is back end
- API — Communication interface between client and server
Related:
- HTTP — Common protocol for client-server communication
- Scalability — Benefit of client-server separation
- Network latency affects responsiveness
- Server failure affects all connected clients
- Requires well-designed APIs for communication
- Security considerations for network communication