4. Main Lessons
In this section, you will go through 12 short lessons. Each lesson teaches one big
idea. Each lesson ends with a mini summary. Read slowly. Think about the examples.
Ask questions. That is how you learn.
Lesson 1 — What is a Client?
Definition
A client is the device or program that asks for information.
In a web application, the client is usually your browser. It is the part that
you see and use.
Why it is important
The client is the starting point. Without a client, there is no request. No
request means no response. The client is what you use to talk to the web
application.
Simple explanation
Think of a customer in a shop. The customer asks for something. The shopkeeper
gives it. The customer is the client. Your browser is the client when you use
a web application.
Real-life example
When you open Chrome and go to Gmail, Chrome is the client. It asks Gmail for
your inbox. Gmail sends it back.
School example
When you use a school result portal, your browser is the client. It asks the
school's computer for your results.
Home example
When you watch YouTube on your phone, your phone's browser is the client. It
asks YouTube for the video.
Nigerian example
When you use a bank web application on your laptop, your laptop's browser is
the client. It asks the bank's server for your balance.
Illustration
CLIENT IN ACTION
================
[ Client ] --> [ Asks for something ]
Examples of clients:
- Chrome browser
- Firefox browser
- Safari browser
- Edge browser
- A phone's built-in browser
Mini summary
A client is the device or program that asks for information. In a web
application, the client is usually your browser.
Lesson 2 — What is a Server?
Definition
A server is a computer that answers requests. It waits for
clients to ask for something. When a request comes, the server finds the
answer and sends it back.
Why it is important
The server is the brain of the web application. It holds the program. It
processes requests. It sends responses. Without a server, there is no web
application.
Simple explanation
Think of a library. You ask the librarian for a book. The librarian finds it
and gives it to you. The librarian is like a server. The library building is
like the server computer.
Real-life example
When you open Gmail, your browser sends a request to a Google server. That
server finds your emails and sends them back to you.
School example
When you check your results online, the school's server finds your records and
sends them to your browser.
Home example
When you order food online, the restaurant's server receives your order and
sends it to the kitchen.
Nigerian example
When you use a Nigerian bank's web application, the bank's server in Lagos or
Abuja receives your request and sends your balance.
Illustration
SERVER IN ACTION
================
[ Server ] --> [ Waits for requests ]
When a request arrives:
1. Server receives it
2. Server finds the answer
3. Server sends the response
Servers run all day and all night.
Mini summary
A server is a computer that answers requests. It holds the program and sends
responses back to the client.
Lesson 3 — What is a Database?
Definition
A database is a special place where information is stored.
It keeps data safe and organized. Servers use databases to find and save
information.
Why it is important
Without a database, the server would forget everything. It would not remember
your account, your messages, or your orders. The database is the memory of the
web application.
Simple explanation
Think of a school file cabinet. Each student has a file. The file holds the
student's name, class, and grades. A database is like that file cabinet, but
on a computer.
Real-life example
When you log into Gmail, the server looks in its database for your account. It
finds your emails and sends them to you.
School example
A school's result portal uses a database. It stores every student's name,
class, and scores.
Home example
A family budget app stores your expenses in a database. It remembers what you
spent last month.
Nigerian example
When you send money using a bank web application, the bank's database records
the transaction. It remembers who sent money to whom.
Illustration
DATABASE IN ACTION
==================
[ Database ]
| Name | Class | Score |
|----------|-------|-------|
| Ngozi | JSS 2 | 85 |
| Chidi | JSS 3 | 78 |
| Amina | JSS 1 | 92 |
The database stores information in tables like this.
Mini summary
A database is where information is stored. It is the memory of a web
application. Servers use it to find and save data.
Lesson 4 — Client, Server, and Database Together
Definition
A web application has three main parts: the client, the server, and the
database. They work together like a team.
Why it is important
Understanding how they work together helps you see the full picture. It also
helps you understand what happens when you click a button.
Simple explanation
Think of a restaurant again. You (the client) give your order to the waiter.
The waiter (the server) takes it to the kitchen. The kitchen uses ingredients
from the store room (the database). Then the food comes back to you.
The Three Parts
- Client — asks for something
- Server — receives the request, processes it, and sends
back an answer
- Database — stores the information the server needs
Real-life example
When you log into Facebook, your browser (client) asks for your profile. The
Facebook server receives the request. It looks in the database for your
information. Then it sends it back to your browser.
School example
When you check your results online, your browser (client) asks the school's
server. The server looks in the database for your scores. Then it sends them
back.
Home example
When you use a shopping web application, your browser asks the server. The
server looks in the database for the product. Then it shows it to you.
Nigerian example
When you check your bank balance, your browser asks the bank's server. The
server looks in the database for your account. Then it sends your balance.
Illustration
CLIENT, SERVER, DATABASE
========================
[ Client ] --> [ Server ] --> [ Database ]
^ | |
| | |
+--------------+--------------+
Response comes back
Client asks.
Server processes.
Database stores.
Mini summary
The client, server, and database work together. The client asks. The server
processes. The database stores. Together they form a web application.
Lesson 5 — What is the Front End?
Definition
The front end is the part of a web application that you see
and interact with. It includes the buttons, boxes, colours, and text on the
screen.
Why it is important
The front end is what users see first. If it is clear and beautiful, users
enjoy using the app. If it is messy, users get confused.
Simple explanation
Think of a restaurant. The front end is the dining area — the tables, chairs,
menus, and the way the place looks. It is what customers see when they walk in.
What the Front End Includes
- Buttons
- Text boxes
- Images
- Colours and fonts
- Layout (where things are placed)
- Menus and navigation
Real-life example
When you open Gmail, the front end is the inbox you see — the list of emails,
the buttons, and the search bar.
School example
When you check results online, the front end is the page where you type your
exam number and click "Check".
Home example
When you watch YouTube, the front end is the video page — the play button, the
comments, and the like button.
Nigerian example
When you shop on Jumia, the front end is the page with products, prices, and
the "Add to Cart" button.
Illustration
FRONT END EXAMPLE
=================
+---------------------------------------+
| [ Search box ] [ Search button ] |
| |
| [ Product image ] ₦5,000 |
| [ Add to Cart ] |
| |
| [ Checkout ] |
+---------------------------------------+
This is what the user sees = FRONT END
Mini summary
The front end is what you see and interact with. It includes buttons, boxes,
images, and layout.
Lesson 6 — What is the Back End?
Definition
The back end is the part of a web application that works
behind the scenes. It includes the server, the database, and the programs
that make everything work.
Why it is important
The back end does the hard work. It processes requests, saves information,
and sends responses. Without the back end, the front end would do nothing.
Simple explanation
Think of a restaurant. The back end is the kitchen — the cooks, the recipes,
the ingredients, and the work that happens out of sight. Customers do not see
it, but it makes the food.
What the Back End Includes
- The server
- The database
- The program that processes requests
- Security and login checks
- Records and reports
Real-life example
When you send an email in Gmail, the back end receives it, stores it in the
database, and sends it to the receiver.
School example
When you submit homework on Google Classroom, the back end stores it, marks it
as submitted, and shows it to the teacher.
Home example
When you pay a bill online, the back end checks your account and records the
payment.
Nigerian example
When you send money using a bank web application, the back end checks your
balance, subtracts the amount, and adds it to the receiver's account.
Illustration
BACK END EXAMPLE
================
[ User clicks "Pay" ]
|
V
[ Server receives request ]
|
V
[ Server checks account in database ]
|
V
[ Server updates balance ]
|
V
[ Server sends confirmation ]
|
V
[ User sees "Payment successful" ]
All of this happens behind the scenes = BACK END
Mini summary
The back end is what happens behind the scenes. It includes the server, the
database, and the programs that process requests.
Lesson 7 — Front End vs Back End
Definition
The front end is what the user sees. The back
end is what happens behind the scenes. Both are needed for a web
application to work.
Why it is important
Knowing the difference helps you understand how a web application is built.
It also helps you decide what part you might want to work on in the future.
Simple explanation
Think of a car. The front end is the dashboard, the steering wheel, and the
seats. The back end is the engine, the fuel system, and the wheels. You see
the front end. The back end makes it move.
Comparison Table: Front End vs Back End
| Front End |
Back End |
| What the user sees |
What happens behind the scenes |
| Buttons, boxes, colours |
Server, database, programs |
| Runs in the browser |
Runs on the server |
| Example: Gmail inbox |
Example: Gmail's email storage |
Real-life example
On Facebook, the front end is your news feed. The back end stores your posts,
friends, and messages.
School example
On a result portal, the front end is the form you fill. The back end looks up
your scores in the database.
Home example
In online shopping, the front end is the product page. The back end checks
stock and processes payment.
Nigerian example
On a bank web application, the front end is the page where you type the amount.
The back end moves the money.
Illustration
FRONT END vs BACK END
=====================
FRONT END: [ What you see ]
|
V
BACK END: [ What happens behind ]
Front end: Buttons, colours, text
Back end: Server, database, logic
Mini summary
The front end is what you see. The back end is what happens behind the scenes.
Both are needed for a web application to work.
Lesson 8 — What is a Request?
Definition
A request is a message sent by the client to the server. It
asks for something. For example, it might ask for a webpage, a photo, or a
piece of information.
Why it is important
Every action you take in a web application starts with a request. Without
requests, nothing would happen.
Simple explanation
Think of raising your hand in class. You are asking the teacher for something.
That is a request. In a web application, your browser raises its hand by
sending a request.
Examples of Requests
- Opening a webpage
- Clicking a button
- Typing in a search box
- Logging in
- Submitting a form
Real-life example
When you type "jollof rice" in YouTube's search box and press Enter, your
browser sends a request to YouTube's server.
School example
When you click "Check Results" on a school portal, your browser sends a
request to the school's server.
Home example
When you tap "Buy" in an online shop, your browser sends a request to the
shop's server.
Nigerian example
When you type your account number in a bank web application and click "Check
Balance", your browser sends a request to the bank's server.
Illustration
SENDING A REQUEST
=================
[ You click a button ]
|
V
[ Browser builds a request ]
|
V
[ Request travels through internet ]
|
V
[ Server receives the request ]
Mini summary
A request is a message from the client to the server. It asks for something.
Every action you take sends a request.
Lesson 9 — What is a Response?
Definition
A response is the message the server sends back to the
client. It contains the answer to the request.
Why it is important
Without a response, the client would never know the answer. The response is
what makes the web application useful.
Simple explanation
Think of asking a question in class. The teacher gives an answer. That answer
is like a response.
Examples of Responses
- A webpage appears on your screen.
- A list of search results appears.
- A message says "Login successful."
- A payment confirmation appears.
- An error message appears.
Real-life example
When you search on Google, the response is the list of results that appear.
School example
When you check your results, the response is your scores appearing on the
screen.
Home example
When you order food online, the response is a message saying "Order
confirmed."
Nigerian example
When you send money using a bank web application, the response is a message
saying "Transfer successful."
Illustration
RECEIVING A RESPONSE
====================
[ Server finds the answer ]
|
V
[ Server builds a response ]
|
V
[ Response travels back ]
|
V
[ Browser shows it to you ]
Mini summary
A response is the answer the server sends back to the client. It shows you
what you asked for.
Lesson 10 — How a Request Travels
Definition
A request travels from your browser to the server through the
internet. The journey has several steps.
Why it is important
Knowing how a request travels helps you understand why some web applications
are slow. It also helps you appreciate what happens when you click a button.
Simple explanation
Think of sending a letter. You write it, put it in an envelope, and drop it in
a post box. The postman carries it to the post office. The post office sends
it to the right address. A request travels the same way.
Steps in the Journey
- You type a web address or click a button.
- Your browser builds a request.
- The request travels through the internet.
- It finds the server using its IP address.
- The server receives the request.
- The server processes it.
- The server prepares a response.
- The response travels back.
- Your browser shows the result.
Real-life example
When you open YouTube, your request travels from your phone to a Google
server. The server finds the video and sends it back.
School example
When you check results online, your request travels from your laptop to the
school's server. The server finds your scores and sends them back.
Home example
When you pay a bill, your request travels to the bank's server. The bank
processes the payment and sends a confirmation.
Nigerian example
When you use a Nigerian bank web application, your request may travel from
Kano to Lagos in less than a second. The internet makes this possible.
Illustration
HOW A REQUEST TRAVELS
=====================
[ You click ]
|
V
[ Browser builds request ]
|
V
[ Internet ]
|
V
[ Server receives ]
|
V
[ Server processes ]
|
V
[ Response sent back ]
|
V
[ Browser shows result ]
Mini summary
A request travels from your browser through the internet to the server. The
server processes it and sends a response back.
Lesson 11 — What is a URL and an IP Address?
Definition
A URL is the web address you type in your browser. For
example, "gmail.com". An IP address is a set of numbers that
identifies a computer on the internet. For example, "142.250.190.46".
Why it is important
URLs are easy for humans to remember. IP addresses are what computers use.
The URL is like a name. The IP address is like a house number.
Simple explanation
Think of a phone contact. You save "Mama" as a name. But the phone actually
uses a phone number to call her. The name is like a URL. The number is like an
IP address.
Real-life example
You type "youtube.com" in your browser. That is a URL. The browser finds
YouTube's IP address and connects to it.
School example
Your school portal may have a URL like "results.myschool.edu.ng". The browser
finds the school's server IP address.
Home example
"google.com" is a URL. It is easier to remember than a long IP address.
Nigerian example
"jumia.com.ng" is a URL. The browser finds Jumia's server IP address.
Illustration
URL vs IP ADDRESS
=================
URL: www.gmail.com (easy for humans)
IP: 142.250.190.46 (used by computers)
The browser looks up the IP address for the URL.
Mini summary
A URL is a web address you type. An IP address is a set of numbers that
identifies a computer. The browser uses both to connect you.
Lesson 12 — Why Some Web Applications Are Slow
Definition
A web application is slow when the request or response takes
a long time. Many things can cause this.
Why it is important
Understanding slowness helps you be patient and helps developers fix problems.
It also helps you choose better networks.
Simple explanation
Think of a traffic jam. The car is fine. The road is fine. But too many cars
slow everything down. The internet can have traffic jams too.
Common Causes of Slow Web Applications
- Slow internet connection
- Many people using the app at the same time
- A slow server
- A large amount of data to send
- Far distance between client and server
- Problems with the database
Real-life example
When many people watch a live football match online, the app may slow down.
The server is busy.
School example
When all students check results on the same day, the portal may be slow. Too
many requests at once.
Home example
When your data is weak, YouTube videos load slowly.
Nigerian example
When there is a network problem, bank web applications may be slow. Customers
must wait.
Illustration
WHY WEB APPLICATIONS ARE SLOW
=============================
[ Many users ] --> [ Server busy ] --> [ Slow response ]
[ Weak network ] --> [ Slow request ] --> [ Slow response ]
Mini summary
Web applications can be slow for many reasons: weak network, busy server,
large data, or long distance. Patience and better networks help.
Summary of Main Lessons
You have now learned the core ideas of Module 2: the client, the server, the
database, the front end, the back end, requests, responses, how requests travel,
URLs, IP addresses, and why web applications can be slow.