46
Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION DEVELOPMENT (170705)

Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

Embed Size (px)

Citation preview

Page 1: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

Unit-1 Introduction WWWPREPARED BY:

PROF. HARISH I RATHOD

COMPUTER ENGINEERING DEPARTMENT

GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE

WEB APPLICATION DEVELOPMENT (170705)

Page 2: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

History of WWW

• The WWW (W3) is the part of history of the internet.• Invented by Tim-Berner-Lee in 1980,• For the purpose of, how computers could store information with

random link.• In 1989 he proposed the idea of a global hypertext space,• In which any network-accessible information could be referred to by

a single “Universal Document Identifier (UDI)”.

GPERI – WAD - UNIT-1 2

Page 3: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

History of WWW

• This idea was expanded in 1990 with a program called “World Wide Web (WWW)”.

• Then after development led to:• Browser, • Web server,• Hyper Text Markup Language (HTML),• Hyper Text Transfer Protocol (HTTP).

GPERI – WAD - UNIT-1 3

Page 4: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

The INTERNET and The WWW

• The internet works by defining an address for each resource attached to it.

• This address is known as Internet Protocol (IP) address.• Without IP address, no link could be formed between computers,

resource or system.• Example of an IP address is : 153.162.131.236.• The number break down to a country, to a specific domain, to a

machine itself.

GPERI – WAD - UNIT-1 4

Page 5: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

The INTERNET and The WWW

• Generally we don’t use numbers to find resources and machine.• We use name like xyz.co.in.• Each name have an associated number.• When name entered into a Web Browser,• The computer will use a special system called Domain Name System

(DNS) to lookup the associated number, to get in contact with desired server.

GPERI – WAD - UNIT-1 5

Page 6: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

The INTERNET and The WWW

• The Basic Idea behind IP addressing.

GPERI – WAD - UNIT-1 6

Page 7: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

The INTERNET and The WWW

• The basics of the actual communication take place.• Any communication occurs on the internet uses the TCP/IP

(Transport Control Protocol/Internet Protocol) suite.• It is a set of communication protocol for dialogue (interchange or

discussion) between computers and devices.• This protocol implement a stack,• At each layer solve a problems relating to the transmission of data

and providing a service to the higher layers.

GPERI – WAD - UNIT-1 7

Page 8: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

The INTERNET and The WWW

• Higher layers are logically closer to the user and relay on lower layers.

• Operating System Interconnection (OSI) model.• OSI model was theoretical and produced at an earlier stage in the

evolution of network.• The Internet model or TCP/IP model produced as practical solution.

GPERI – WAD - UNIT-1 8

Page 9: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

The INTERNET and The WWW

• OSI Model.

GPERI – WAD - UNIT-1 9

Level Stack Layer Protocol7 Application HTTP, SMTP, SNMP, FTP, Telnet, SSH, Scp, NFS, RTSP6 Presentation XDR, ASN.1, SMB, AFP

5 Session TLS, SSH, RPC, NetBIOS, ASP4 Transport TCP, UDP, RTP, SCTP, SPX, ATP3 Network IP, ICMP, IGMP, X.25, CLNP, ARP, RARP, BGP, OSFP, RIP, IPX, DDP

2 Data Link Ethernet, Token Ring, PPP, HDLC, Frame Relay, ISDN, ATM, 802.11 Wi-Fi, FDDI

1 Physical Electrical, Radio, laser.

Page 10: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

The INTERNET and The WWW

• Internet Layered (TCP/IP) Model.

GPERI – WAD - UNIT-1 10

Level Stack Layer Protocol

7 Application HTTP, SMTP, SNMP, FTP, Telnet, SSH, Scp, NFS, RTSP

4 Transport TCP, UDP, RTP, SCTP, SPX, ATP

3 Network IP, ICMP, IGMP, X.25, CLNP, ARP, RARP, BGP, OSFP, RIP, IPX, DDP

2 Data Link Ethernet, Token Ring, PPP, HDLC, Frame Relay, ISDN, ATM, 802.11 Wi-Fi, FDDI

1 Physical Electrical, Radio, laser.

Page 11: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

The INTERNET and The WWW

Physical layer:• Deal with physical characteristics of communication such as,• Which kind of medium use for communication (e.g. wires, fiber

optic, or radio links).• And other related detail such as,• Connectors, channels, modulation, signal strengths,• level synchronization, • Timing and distance.

GPERI – WAD - UNIT-1 11

Page 12: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

The INTERNET and The WWW

Data Link layer:• Specifies how packets of information are transported over the

physical layer.• For example: • How it is framed or set out with special start and stop bit pattern.

GPERI – WAD - UNIT-1 12

Page 13: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

The INTERNET and The WWW

Network layer:• Concern with how the packets are transferred over and between

network.

Transport layer:• Deal with solving problems like reliability,• For example: • Determine whether the data transferred correct or not.

GPERI – WAD - UNIT-1 13

Page 14: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

The INTERNET and The WWW

Application layer:• Program use to communicate across a network with other program.• Data is passed from the program in an application format and

encoded into some standard protocol.

GPERI – WAD - UNIT-1 14

Page 15: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

The INTERNET and The WWW

Checkpoint:• Initial was need for information exchange between systems.• Networks require common convention (agreement or bond) for

dialogue or discussion (protocol).• Each resource in a network needs a unique identifier (IP address).• An IP address can be associated with a name using DNS.• A stack of protocols exist, providing services and communication

between the various levels in a system.

GPERI – WAD - UNIT-1 15

Page 16: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

Protocols And Programs

• Few aspects (features or part) to be considered to enable communication between parties:

• Where the communication take place (a specific port, a kind of interface for communication over a network)

• How it take place.• The rules and conventions involved.

GPERI – WAD - UNIT-1 16

Page 17: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

Protocols And Programs

• There are many ways of communicating between machines and device.

• A few contexts in which we may usually wish to transfer information between systems and the mechanisms available for the task.

• File,• Email, Instant Messaging, • Remote Machine Access and Web Pages.

GPERI – WAD - UNIT-1 17

Page 18: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

Protocols And Programs

File:• If we want to send a file from one machine to another, how would

we do it?• Possible solution:• Simply email it and pick up the mail on other machine.• Problem: What it there is no client email or the file is simply too

large?

GPERI – WAD - UNIT-1 18

Page 19: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

Protocols And Programs

File:• We can use a disk or memory of some kind,• Another way is,• We can use File Transfer Protocol (FTP) to load a file either directly

on a machine, or to a server.• For example we want to transfer a file called myIndex.doc using FTP.

GPERI – WAD - UNIT-1 19

Page 20: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

Protocols And Programs

File:

> ftp mysuperserver.co.uk

Connected to mysuperserver.co.uk

220 FTP Server ready

Name : abc

Password:

ftp>put myIndex.doc

GPERI – WAD - UNIT-1 20

Page 21: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

Protocols And Programs

File:• Commonly used commands are:• ftp – start an ftp session

• ls – list files

• get – download a file from the server

• put – upload a file to the server

• mkdir – make a directory on server

GPERI – WAD - UNIT-1 21

Page 22: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

Protocols And Programs

File:• cd – change to a new directory on the server

• close – close the connection

• open – open a new connection

• bin – binary mode transfer

• asc – ASCII text mode transfer

GPERI – WAD - UNIT-1 22

Page 23: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

Protocols And Programs

Email:• Email exited as long as 1965.• Extended to work on networks between many computers.• How modern Email works?• User, writing their message using a mail client program (or Mail

User Agent MUA),• Then use Simple Mail Transfer Protocol (SMTP) to send the message

to the local Mail Transfer Agent (MTA).

GPERI – WAD - UNIT-1 23

Page 24: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

Protocols And Programs

Email:• MTA usually exist on the user’s ISP.• The MTA deciphers the email address of the recipient (who the

email is to!).• Form of email address is myname@myaddress• Where,• myname = local part and• myaddress = domain name.

GPERI – WAD - UNIT-1 24

Page 25: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

Protocols And Programs

Email:• MTA uses the DNS to find the appropriate mail exchange server

accepting message from that domain.• Once the mail server is found, the message is sent on using SMTP,• And from there it is placed using the local name(myname) to find

the correct mail box.

GPERI – WAD - UNIT-1 25

Page 26: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

Protocols And Programs

Email:• To pick up the mail, • A user’s client retrieves it from the mail box via his MUA using Post

Office Protocol (POP3).

GPERI – WAD - UNIT-1 26

Page 27: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

Protocols And Programs

Instant Messaging:• It’s possible to use an Instant Messaging (IM) service to talk a friend

on another computer.• How does this work?• It can be possible with Internet Relay Chat (IRC).• It is designed for group communication in channels and also allow

one to one communication.• IRC is an open protocol that uses TCP.

GPERI – WAD - UNIT-1 27

Page 28: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

Protocols And Programs

Remote Machine Access:• If we need to access a machine from a distance to run a program or

retrieve some data, there are a few ways to do this.• One way is through Telnet,• Which allows us:• To open a connection on a remote machine and• Issue a command.

GPERI – WAD - UNIT-1 28

Page 29: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

Protocols And Programs

Remote Machine Access:• The important thing is:• The other end of the connection must be process as a server.• Telnet uses port 23.• Providing less security. • Does not providing encrypt to any communication, so password is

open for every one.• Also possible to hijack.

GPERI – WAD - UNIT-1 29

Page 30: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

Protocols And Programs

Remote Machine Access:• Due to lack authentication between the parties:• it is impossible to know whether parties are involved or not. • A better remote access id SSH (Secure Shell),

GPERI – WAD - UNIT-1 30

Page 31: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

Protocols And Programs

Remote Machine Access:• A SSH session run like: Raptor – Computer :~ ralphmoseley$ ssh [email protected]

Password : [type password]

aphid# ls

aphid# logout

Connection to 192.168.1.4 closed

GPERI – WAD - UNIT-1 31

Page 32: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

Protocols And Programs

Web Pages:• The main protocol use for a communication between browser and a

web server is HTTP.• It is designed to enable document to be transferred but can be used

with other types of data too.• For Web document the HTTP protocol works by sending command

over a TCP connection.

GPERI – WAD - UNIT-1 32

Page 33: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

Protocols And Programs

Web Pages:• To understand the how information passed from machine to

machine, • we need to know how such system can connect to each other.• Generally, for the Web, client-server model is use.

GPERI – WAD - UNIT-1 33

Client(browser) Server

Hppt://www.mysports.com/index.html

Page 34: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

Protocols And Programs

Web Pages:• The first stage is the user typing a URL in the browser address

window.

GPERI – WAD - UNIT-1 34

Client(browser) Server

Hppt://www.mysports.com/index.html

192.168.18.32Port 80

192.168.18.32

Page 35: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

Protocols And Programs

Web Pages:• In the next stage the URL is converted to an IP address,• IP address is use to make a connection via port 80,• The port 80 is use for HTTP and Web.

GPERI – WAD - UNIT-1 35

Client(browser) Server

Hppt://www.mysports.com/index.html

GET index.html

HTTP/1.1

Page 36: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

Protocols And Programs

Web Pages:• Once the connection is established,• The client application extracts the file name that is required from

the URL and send the request down the established connection.

GPERI – WAD - UNIT-1 36

Client(browser) Server

Hppt://www.mysports.com/index.html

HTTP/1.1 200 OK

[Content of document]

Page 37: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

Protocols And Programs

Web Pages:• The HTTP message is sent saying that the page was found, followed

by the page itself.• When the page has been sent the connection is dropped.

GPERI – WAD - UNIT-1 37

Client(browser) Server

Hppt://www.mysports.com/index.html

HTTP/1.1 200 OK

[Content of document]

Page 38: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

Protocols And Programs

Web Pages:• The HTTP message is sent saying that the page was found, followed

by the page itself.• When the page has been sent the connection is dropped.• The following HTTP command may originate from a browser to

request a Web page from a server:

GET/index.html HTTP/1.0

GPERI – WAD - UNIT-1 38

Page 39: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

Protocols And Programs

Web Pages:• This Command is text-based command. Has several fields.

GPERI – WAD - UNIT-1 39

RequestLine Optimal HTTP Header “\r\n” Optimal Data

Type of request (e.g. GET)

Additional Information such as browser being used, media types accepted Delimiter

Carriage returnLine feed

User data (e.g. contents of completed form)

Page 40: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

Protocols And Programs

Web Pages:• Types of error code:• 404 = Not found.• 401 = Unauthorized.• 500 = Internal server error.• 501 = Not implemented.

GPERI – WAD - UNIT-1 40

Page 41: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

Secure Connections

• Most of the protocol are not secure.• They use plain text to transfer data, it could be viewed or tempered

with at some stage.• There are some protocols that make it more secure to send and

receive data.• Which include:• Special version of FTP as SFTP/FTPS and • HTTP as HTTPS.

GPERI – WAD - UNIT-1 41

Page 42: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

Secure Connections

• SSH and various virtual network tools allows a user to create a secure tunnel through the host machine.

• SSH allows communication in a secure manner over port 22, with encryption,

• Which minimizing the risk of tempering.• SSH allows the user to log in and execute commands on a remote

computer.

GPERI – WAD - UNIT-1 42

Page 43: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

Secure Connections

• To transfer files using FTP there exist a version that uses a secure method of communication.

• SFTP – Secure (Shell) File Transfer Protocol.• FTPS – which utilize Secure Socket Layer(SSL)/Transport Layer

Security.

GPERI – WAD - UNIT-1 43

Page 44: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

Secure Connections

• Various protocol and associated port;

GPERI – WAD - UNIT-1 44

Page 45: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

Secure Connections

Checkpoint:• SFTP and FTPS can be used in place of FTP.• SSH can be used in place of Telnet.• The SSH TCP port is 22.

GPERI – WAD - UNIT-1 45

Page 46: Unit-1 Introduction WWW PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE WEB APPLICATION

Self Study

• Application and Development Tools.• The Web Browser.

GPERI – WAD - UNIT-1 46