Client-Server Architecture


Client
The client is the entity that makes a request.
In most cases, this is the user’s web browser, like Google Chrome, Safari, or Firefox.


Server
The server is a computer running a program that receives and responds to client requests.
Sometimes it simply returns a webpage.
Other times, it processes data sent by the client, for example, saving a form submission to a database.
 



Web developers are responsible for creating programs that run on both sides:
the client side and the server side.


 


Frontend Developer

Focuses on the client side:
what the user sees and interacts with.
Common tools:


HTML, CSS, JavaScript

HTML logo CSS logo JavaScript logo

Frameworks like
React, Vue, or Angular

React logo    Vue logo    Angular logo



Backend Developer

Focuses on the server side,
handling logic, databases, and data processing.
Common languages:

Python, PHP, Java

Python logo    PHP logo    Java logo



Full-Stack Developer

Works on both the frontend and backend.
A full-stack developer builds complete web applications from start to finish.





How does this apply in Django?

Django logo



Django MTV architecture diagram
 

Model

Models define the structure of your database tables.
They are usually written in a file called models.py.

For instance, this post that you are reading is based on a model named Post in models.py.
It has fields such as title, body, and other information.

 

View

Views handle the user’s request,
communicate with the database,
and return a response.
They are written in Python, usually in a file called views.py.

For example, when you access a page on this website,
a specific view is triggered to generate and return the content for that URL.
 

Template

Templates define the HTML structure of your Django pages.
They are usually HTML files, such as post.html,
and they can include dynamic content from the database.

The template used to display this post contains HTML
together with dynamic content retrieved from the database.
Django renders this template on the server
and sends the final HTML to the browser.





This is just an overview and does not need to be memorized.
With time, these concepts become obvious naturally.