26
Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Mohammad Bin Saud Islamic University College of Computer and Information Sciences Chapter 1: Introduction to Web IS 203: IS 203: Web Web Programming Programming Information Systems Department

Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Mohammad Bin Saud Islamic University College of Computer and Information Sciences Chapter

Embed Size (px)

Citation preview

Page 1: Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Mohammad Bin Saud Islamic University College of Computer and Information Sciences Chapter

Kingdom of Saudi ArabiaMinistry of Higher Education

Al-Imam Mohammad Bin Saud Islamic University College of Computer and Information Sciences

Chapter 1: Introduction to Web

IS 203:IS 203: WebWeb ProgrammingProgramming

Information Systems Department

Page 2: Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Mohammad Bin Saud Islamic University College of Computer and Information Sciences Chapter

2

Table of contents History of Web Web System Architecture URL DNS Protocols governing the Web HTTP Request Response Creating Static and Dynamic Websites

Information Systems Department

Page 3: Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Mohammad Bin Saud Islamic University College of Computer and Information Sciences Chapter

3

History of Web In the 1960's, Ted Nelson

popularized the hypertext concept, and Douglas Engelbart created the first working hypertext systems.

In 1989, Tim Berners-Lee had suggested a way to let all users, but particularly scientists, browse each others’ papers on the Internet.

He developed HTML, URLs, and HTTP. Information Systems Department

Page 4: Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Mohammad Bin Saud Islamic University College of Computer and Information Sciences Chapter

4

What is a Web ?

The Web is a shared information space.

Information Systems Department

Page 5: Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Mohammad Bin Saud Islamic University College of Computer and Information Sciences Chapter

5

Basic Web System Architecture

The web is a two-tiered architecture. A web browser displays information content, and a web server that transfers information

to the client.

Information Systems Department

Page 6: Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Mohammad Bin Saud Islamic University College of Computer and Information Sciences Chapter

6

Web Browser The primary

purpose is to bring information resources to the user.

An application for retrieving, presenting, and traversing information resources.

Information Systems Department

Page 7: Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Mohammad Bin Saud Islamic University College of Computer and Information Sciences Chapter

7

History of Web Browsers

Page 8: Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Mohammad Bin Saud Islamic University College of Computer and Information Sciences Chapter

8

History of Web Browsers

Page 9: Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Mohammad Bin Saud Islamic University College of Computer and Information Sciences Chapter

9

History of Web Browsers

Page 10: Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Mohammad Bin Saud Islamic University College of Computer and Information Sciences Chapter

10

History of Web Browsers

Page 11: Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Mohammad Bin Saud Islamic University College of Computer and Information Sciences Chapter

11

History of Web Browsers

Page 12: Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Mohammad Bin Saud Islamic University College of Computer and Information Sciences Chapter

12

Web Server The term web server or webserver

can mean one of two things: A computer program that accepts HTTP

requests and return HTTP responses with optional data content.

A computer that runs a computer program as described above.

Information Systems Department

Page 13: Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Mohammad Bin Saud Islamic University College of Computer and Information Sciences Chapter

13

Basic Web System Architecture

This architecture depends on three key standards: HTML for encoding document content. URLs for naming remote information

objects in a global namespace. HTTP for staging the transfer.

Information Systems Department

Page 14: Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Mohammad Bin Saud Islamic University College of Computer and Information Sciences Chapter

14

HTMLHypertext Markup Language

Document layout language (not a programming language)

Defines structure and appearance of Web pages

Page 15: Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Mohammad Bin Saud Islamic University College of Computer and Information Sciences Chapter

15

URLUniform Resource Locator URLs are location dependent It contains four distinct parts: the protocol

type, the machine name, the directory path and the file name.

There are several kinds of URLs: file URLs, FTP URLs, and HTTP URLs.

Page 16: Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Mohammad Bin Saud Islamic University College of Computer and Information Sciences Chapter

16

HTTPHyper Text Transfer Protocol HTTP is a request/response standard

of a client and a server. Typically, an HTTP client initiates a

request. Resources to be accessed by HTTP

Information Systems Department

Page 17: Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Mohammad Bin Saud Islamic University College of Computer and Information Sciences Chapter

17

HTTPRequest Methods HTTP defines eight methods (sometimes

referred to as "verbs") indicating the desired action to be performed on the identified resource. HEAD GET POST PUT DELETE TRACE OPTIONS CONNECT

Information Systems Department

Page 18: Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Mohammad Bin Saud Islamic University College of Computer and Information Sciences Chapter

18

Sample HTTP Request and Response

Client request

Server response

Information Systems Department

Page 19: Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Mohammad Bin Saud Islamic University College of Computer and Information Sciences Chapter

19

Web Architecture Extension CGI extends the

architecture to three-tiers by adding a back-end server that provides services to the Web server.

Information Systems Department

Page 20: Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Mohammad Bin Saud Islamic University College of Computer and Information Sciences Chapter

20

Database Driven Website Architecture

Information Systems Department

Page 21: Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Mohammad Bin Saud Islamic University College of Computer and Information Sciences Chapter

21

Server-side Processing

In server-side processing, the Web server: Receives the dynamic Web page request Performs all of the processing necessary to

create the dynamic Web page Sends the finished Web page to the client

for display in the client’s browser

Information Systems Department

Page 22: Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Mohammad Bin Saud Islamic University College of Computer and Information Sciences Chapter

22

Client-side Processing

Client-side processing Some processing needs to be “executed”

by the browser, either to form the request for the dynamic Web page or to create or display the dynamic Web page.

Eg. Javascript code to validate user input

Information Systems Department

Page 23: Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Mohammad Bin Saud Islamic University College of Computer and Information Sciences Chapter

23

Server and Client side processing

Server-side processing PHP ASP ASP.NET Perl J2EE Python, e.g. Django Ruby, e.g. Ruby on Rails ColdFusion

Client-side processing CSS HTML JavaScript Adobe Flex Microsoft Silverlight

Information Systems Department

Page 24: Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Mohammad Bin Saud Islamic University College of Computer and Information Sciences Chapter

24

Domain Name System DNS

Each host on the Internet has a range of IP (or Internet protocol) numbers.

The Domain name system (DNS) maps the numbers to names of hosts or websites (eg www.google.com, www.hotmail.com).

Information Systems Department

Page 25: Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Mohammad Bin Saud Islamic University College of Computer and Information Sciences Chapter

25

Protocols Governing the Web

TCP/IP, or Transmission Control Protocol-Internet Protocol. Essentially, TCP/IP describes a protocol which will work on any sort of computer and operating system for transportation of data across the internet between different systems. 

SMTP, or the Simple Message Transfer Protocol, is the basic standard for email, and again exists since the 1980s when the Internet was small and honest.

Another important protocol which dates from pre 1972 is FTP, or the file transfer protocol. This simply is the way to upload or download a file from an Internet computer.

With the coming of the World Wide Web, we see another powerful protocol - http, or hypertext transfer protocol. HTTP allows us to click on the name of a site and visit it. Simple, but very powerful.

Information Systems Department

Page 26: Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Mohammad Bin Saud Islamic University College of Computer and Information Sciences Chapter

26

Static vs Dynamic Sites A static web site is a web site where the content,

the HTML and graphics, are always static—it is served up to any visitor the same, unless the person who created the web site decides to manually change the copy of it on the server.

On a dynamic web site on the other hand, the content on the server is the same, but instead of just being HTML, it also contains dynamic code, which may display different data depending on information you feed to the web site. Another thing to note is that special software must be installed on the server to create a dynamic web site.

Information Systems Department