Lecture 1AB
Lecture 1AB
Engineering
Dr. Mehdi Hussain
Tenured Associate Professor
[email protected]
BSCS/BESE Lecture-1AB
Summer-2024
• Course Contents
• Course Assessment
2
Web Engineering Motivation
3
Source: Statista 2024
Motivation
Motivation - Meta Revenue Q1 FY23
Source: https://twitter.com/EconomyApp/status/1651322758977159171 5
Motivation – Amazon’s revenue
Motivation:
Alibaba
Group
8
Motivation: E-commerce in
Pakistan
9
Motivation: IT Exports
10
Motivation: Internet and Mobile Banking
11
Motivation: Alibaba vs Local Exports
12
Popular Programming Languages
13
Top
Programming
Languages
Across Globe
– 2024
14
Skill set demands of the IT Industry in Pakistan
Skill set demands of the IT
Industry in Pakistan
Skilling Stack
World
Wide Web
& Internet
• The internet is a network of computer
networks worldwide
World Wide Web • The web is a tool used to retrieve
information published on the internet
& Internet • To navigate the web we use a web
browser i.e. Firefox, Edge, Chrome,
Safari, …
• W3C or World Wide Web
Consortium
20
The
Internet!
“The Internet is not a thing, a place, a single
• Q: How to find IP address technology, or a mode of governance. It is an
of any website on internet! agreement”
- John Gage, Director of Science, Sun
• Hack: In Windows, go to Microsystems, Inc.
command prompt. Write
‘ping <URL of the website>’ Internet is a global network of computers.
e.g. ping facebook.com. Hit Nobody company or government owns it (it’s
enter! global!)
• Web Browsers
• Google Chrome
• Mozilla Firefox
• Microsoft Edge
• Apple Safari
• Others (Opera, Lynx)
• …
22
Client computer Server computer
Internet
connection
Accessing a Website
23
Uniform
Resource
Locator (URL)
Uniform Resource Locator
(URL)
• Syntax
scheme:[//[user:password@]host[:port]][/]path[?query][#fragment]
25
Uniform Resource
Locator (URL)
Type Content
• http://seecs.nust.edu.pk:80/Dep Scheme http
artments/Department-of-
User None
Computing/Degrees-
Offered/BSCS/index.php Password None
Host seecs.nust.edu.pk
Query None
Fragment None
26
Uniform Resource
Locator (URL)
Type Content
• https://www.google.com.pk/sear Scheme https
ch?q=nust
User None
Password None
• scheme:[//[user:password@]hos
t[:port]][/]path[?query][#fragment] Host www.google.com.pk
Port default port [80]
Path search
Query q=nust
Fragment None
27
Uniform Resource
Locator (URL)
Type Content
• https://www.google.com.pk/sear Scheme https
ch?q=nust#top
User None
Password None
• scheme:[//[user:password@]hos
t[:port]][/]path[?query][#fragment] Host www.google.com.pk
Port default port [80]
Path search
Query q=nust
Fragment top
28
Uniform Resource
Locator (URL)
29
IP addresses
• IP addresses can be
• Permanent also called static or
• Temporary also known as dynamic
30
Domain Names resolution
Domain Names and
Address Resolution
• An IP Address is used to connect
from computer A to computer B
32
DNS: Domain Name
System
• DNS is a distributed database of computers’
names and their corresponding IP addresses
33
How DNS Work
34
Image source: Google
DNS
35
DNS Hierarchy
36
Internet hierarchy http://library.seecs.edu.pk
PK …………….. FR UA US
Library Sub-
domain
37
Protocol Stack
Internet Protocol
• In order to send a message from one
computer to another, Protocols are used
39
Protocol Stack
Computer A Computer B
Application Layer Application Layer
(Telnet, HTTP, FTP, (Telnet, HTTP, FTP,
SMTP, SSL etc.) SMTP, SSL etc.)
Transport Layer Transport Layer
(TCP, UDP, …) (TCP, UDP, …)
Network (Internet) Network (Internet)
Layer Layer
(IP, ICMP, IPsec, …) (IP, ICMP, IPsec, …)
Physical (Link) Layer Physical (Link) Layer
40
Application Layer
Protocol Stack
Transport Layer
Network Layer
• Application Layer is specific to
applications e.g. HTTP, E-mail, FTP, etc. Physical Layer
44
Sending a message from computer A
▪toAfter
B transport layer, the packets proceed to the network layer.
This is where each packet receives it's destination IP address.
▪ Once we have a port number and an IP address, our message is
ready to be sent over the Internet.
▪ The physical layer takes care of turning data packets into
electronic signals and transmitting them over the physical
medium
48
Transmission Control Protocol (TCP)
• TCP is responsible for routing
application protocols to the correct Application Layer
application on the destination Transport Layer
computer Network Layer
Physical Layer
• What TCP does
• Get data from application to application
reliably! Two applications using TCP
must first establish a
connection before exchanging
• TCP is a connection-oriented, reliable,
data.
byte stream service
For each packet received, an
acknowledgement is sent to
the sender to confirm the
49
delivery
Transmission Control Protocol (TCP)
50
Internet Protocol (IP)
• Delivers packets across networks
through routers Application Layer
Transport Layer
• IP provides Internet-wide addressing
Network Layer
• IP provides connectionless and
unreliable packets service Physical Layer
51
Internet Protocol (IP)
52
Complete Packet
IP Header ( 20 bytes )
TCP Header ( 20 bytes )
Application
Layer
Data
53
Internet Port Numbers
• FTP 20/21
• Telnet 23
• SMTP 25
• DNS 53
• HTTP 80
• POP2 109
• POP3 110
• SFTP 115
• IMAP 143
• HTTPS 443
54
Summary
55