Professional Documents
Culture Documents
Lec 01
Lec 01
Development (Part 1)
Introduction
2
Understanding the Web Ecosystem: Mapping the Terrain
3
Origins and Evolution of the Web: A Historical Perspective
4
The Web's Pillars: Protocols, Languages, and Standards
Overview: Client-server architecture is a distributed system design that allocates tasks and
resources between two distinct types of computer programs: clients and servers. Clients initiate
requests for services from servers, which process the requests and return the results to the
clients.
Client's Role: In the context of the web, users act as clients by sending HTTP requests to web
servers. These requests typically specify the URL of the resource that the user wants to access.
Server's Response: Web servers receive and process HTTP requests from clients. If the request
is valid, the server will return the requested resource to the client. Otherwise, the server will
return an error response.
6
The Role of Web Browsers: Gateway to the Digital Frontier
Overview: Web browsers are software applications that allow users to access and view web
pages. They are essential gateways to the digital frontier, providing users with a window into
the vast and ever-evolving world of the web.
Interpreting Languages: Web browsers are responsible for interpreting the core languages of
the web - HTML, CSS, and JavaScript. These languages are used to create the structure, style,
and interactivity of web pages.
Rendering Web Pages: Once a web browser has interpreted the HTML, CSS, and JavaScript of
a web page, it renders the page into a visual representation that can be displayed on the user's
screen.
7
Beyond Web Pages: Exploring Web Applications and
Services
Overview: The web is a dual entity, comprising two vital components - the front-end and the
back-end. The front-end is the part of the web that users see and interact with, while the back-end
is the part of the web that powers the front-end and handles all the behind-the-scenes operations.
Front-End Focus: Front-end developers are responsible for creating the user interface of a
website or web application. This includes designing the layout, choosing the colors and fonts, and
adding interactivity. Front-end developers use a variety of programming languages and
technologies, such as HTML, CSS, and JavaScript, to create the front-end of a website or web
application.
Back-End Power: Back-end developers are responsible for building and maintaining the server-
side logic of a website or web application. This includes handling user requests, processing data,
and storing and retrieving data from a database. Back-end developers use a variety of
programming languages and technologies, such as Python, Java, and PHP, to build the back-end of
a website or web application.
9
Technologies Used in Front-End and Back-End
Front-End Stack:
HTML (HyperText Markup Language) is the foundation of the web,
providing the structure for web pages.
CSS (Cascading Style Sheets) is used to style web pages, including the
layout, colors, and fonts.
JavaScript is a programming language that is used to add interactivity to
web pages.
Back-End Toolbox:
Python is a general-purpose programming language that is popular for
back-end development due to its simplicity and readability.
Java is a platform-independent programming language that is known for
its reliability and security.
PHP is a scripting language that is specifically designed for web
development.
10
Recap of What We've Covered So Far
Foundational Concepts:
Web Ecosystem: The web ecosystem is a complex network of technologies and protocols that
work together to make the web possible.
HTTP Protocol: The HTTP protocol is the foundation of the web, enabling communication
between web servers and browsers.
Front-End and Back-End Development: Front-end development focuses on the user interface
of a website or web application, while back-end development focuses on the server-side logic
and data processing.
Our Ongoing Journey:
Diving Deeper into Web Development: In the upcoming lectures, we'll explore a
variety of web development topics in greater depth, including:
Programming languages and technologies
Web frameworks and libraries
Databases
Security and performance
Testing and deployment
11
Demystifying the HTTP Protocol: Decoding the Language of
Web Communication
What is HTTP?
HTTP stands for Hypertext Transfer Protocol. It is the underlying protocol
that powers the web, enabling communication between web servers and
browsers.
Why is HTTP important?
HTTP is essential for the functioning of the web. It is used to transfer web
pages, images, videos, and other resources between web servers and
browsers.
How does HTTP work?
HTTP is a request-response protocol. This means that a client sends a
request to a server, and the server sends back a response.
The client's request typically specifies the resource that the client wants to
access, such as a web page or an image. The server's response typically
contains the requested resource, as well as other information, such as the
status code and the content type.
12
HTTP Basics: Request and Response
An analogy:
HTTP mirrors the process of placing an order in a cafe:
HTTP request: You walk up to the counter and tell the barista what you
want (e.g., a latte).
HTTP response: The barista makes your drink and gives it to you.
In the same way, an HTTP request is a message sent from a
client to a server, specifying what the client wants (e.g., a web
page). The server then sends back an HTTP response, which
contains the requested resource, as well as other information,
such as the status code and the content type.
13
Anatomy of an HTTP Request
15
HTTPS: Secure HTTP
What is HTTPS?
HTTPS (Hypertext Transfer Protocol Secure) is a secure
version of HTTP that encrypts data in transit. It is used to
protect web traffic from eavesdropping and man-in-the-
middle attacks.
How does HTTPS work?
HTTPS uses SSL/TLS (Secure Sockets Layer/Transport
Layer Security) protocols to create secure connections.
These protocols use a combination of public and private
key encryption to encrypt and decrypt data.
When a client connects to an HTTPS website, the client
and server negotiate a secure connection using SSL/TLS.
Once a secure connection is established, all data
transmitted between the client and server is encrypted.
Why is HTTPS important?
HTTPS is important because it protects user privacy and
security. By encrypting data in transit, HTTPS prevents
attackers from eavesdropping on web traffic and stealing
sensitive information, such as passwords and credit card
numbers.
16
Status Codes: Deciphering the Web's Language
17
Statelessness and Cookies
Statelessness:
HTTP is a stateless protocol, meaning that each request is independent of all previous requests. This
means that the server does not keep track of any information about the client between requests.
Cookies:
Cookies are used to maintain user context across requests. A cookie is a small piece of data that is stored
on the client's computer by the server. When the client makes a subsequent request to the server, the
cookie is sent back to the server. The server can then use the cookie to identify the client and maintain
their context.
Example:
One example of how cookies are used is to maintain a user's shopping cart on an e-commerce website.
When a user adds an item to their shopping cart, the e-commerce website stores a cookie on the user's
computer. When the user makes a subsequent request to the e-commerce website, the cookie is sent
back to the website. The website can then use the cookie to identify the user and load their shopping cart.
Benefits of cookies:
Cookies provide a number of benefits, including:
Maintaining user context: Cookies can be used to maintain user context across requests, such as a user's
shopping cart or login status.
Personalization: Cookies can be used to personalize the user experience, such as by recommending products
or displaying relevant content.
Analytics: Cookies can be used to collect analytics data about user behavior, such as which pages they visit and
how long they stay on each page.
18
HTML: The Blueprint of Web Content
What is HTML?
HTML stands for HyperText Markup Language. It is the standard markup language for creating
web pages.
What is HTML used for?
HTML is used to define the structure and content of web pages. It uses a variety of tags to define
different elements of a web page, such as headings, paragraphs, images, and links.
How does HTML work?
When a web browser encounters an HTML file, it parses the HTML code and renders the web page
accordingly. The web browser reads the HTML tags and uses them to determine how to display the
content of the web page. <!DOCTYPE html>
<html>
Example: <head>
The following is a simple example of HTML code: <title>My Web Page</title>
</head>
<body>
<h1>This is my web page!</h1>
</body>
</html>
This HTML code will create a web page with a single heading that says "This is my web page!".
Importance of HTML:
HTML is an essential part of the web ecosystem. It is used to create all web pages, and it is the
foundation for all other web technologies, such as CSS and JavaScript.
19
HTML Document Structure
<!DOCTYPE html>
<html>
<head>
<title>My Web Page</title>
</head>
<body>
<h1>Welcome to My Web Page</h1>
<p>This is a sample paragraph of text.</p>
</body>
</html>
20