Copyright (c) 2010, Dr. Kuanchin Chen1 The Client-Server Architecture of the WWW Dr. Kuanchin Chen.

Slides:



Advertisements
Similar presentations
PHP syntax basics. Personal Home Page This is a Hypertext processor It works on the server side It demands a Web-server to be installed.
Advertisements

HTTP HyperText Transfer Protocol. HTTP Uses TCP as its underlying transport protocol Uses port 80 Stateless protocol (i.e. HTTP Server maintains no information.
Hypertext Transfer Protocol Kyle Roth Mark Hoover.
How the web works: HTTP and CGI explained
The abs_path in a URI If the abs_path is not present in the URL, it must be given as "/" in a Request-URI for a resource. Thus, if a user points a browser.
Introduction to Web Based Application. Web-based application TCP/IP (HTTP) protocol Using WWW technology & software Distributed environment.
The World Wide Web and the Internet Dr Jim Briggs 1WUCM1.
Chapter 2 Application Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley, July.
Definitions, Definitions, Definitions Lead to Understanding.
HTTP Overview Vijayan Sugumaran School of Business Administration Oakland University.
2/9/2004 Web and HTTP February 9, /9/2004 Assignments Due – Reading and Warmup Work on Message of the Day.
The abs_path in a URI If the abs_path is not present in the URL, it must be given as "/" in a Request-URI for a resource. Thus, if a user points a browser.
Hypertext Transport Protocol CS Dick Steflik.
Client, Server, HTTP, IP Address, Domain Name. Client-Server Model Client Bob Yahoo Server yahoo.com/finance.html A text file named finance.html.
 What is it ? What is it ?  URI,URN,URL URI,URN,URL  HTTP – methods HTTP – methods  HTTP Request Packets HTTP Request Packets  HTTP Request Headers.
Web Programming Language Dr. Ken Cosh Week 1 (Introduction)
Web Servers Web server software is a product that works with the operating system The server computer can run more than one software product such as .
Human-Computer Interface Course 5. ISPs and Internet connection.
Web Servers1-1 Web Servers Xingquan (Hill) Zhu
Introduction to ASP.NET. Prehistory of ASP.NET Original Internet – text based WWW – static graphical content  HTML (client-side) Need for interactive.
COMP3016 Web Technologies Introduction and Discussion What is the Web?
Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
Chapter 1: Introduction to Web
FTP (File Transfer Protocol) & Telnet
HyperText Transfer Protocol (HTTP).  HTTP is the protocol that supports communication between web browsers and web servers.  A “Web Server” is a HTTP.
CP476 Internet Computing Lecture 5 : HTTP, WWW and URL 1 Lecture 5. WWW, HTTP and URL Objective: to review the concepts of WWW to understand how HTTP works.
TCP/IP Protocol Suite 1 Chapter 22 Upon completion you will be able to: World Wide Web: HTTP Understand the components of a browser and a server Understand.
2: Application Layer1 CS 4244: Internet Software Development Dr. Eli Tilevich.
Introduction to Internet Programming (Web Based Application)
Chapter 17 - Deploying Java Applications on the Web1 Chapter 17 Deploying Java Applications on the Web.
WebServer A Web server is a program that, using the client/server model and the World Wide Web's Hypertext Transfer Protocol (HTTP), serves the files that.
MySQL and PHP Internet and WWW. Computer Basics A Single Computer.
1 Introductory material. This module illustrates the interactions of the protocols of the TCP/IP protocol suite with the help of an example. The example.
Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Muhammad Ibn Saud Islamic University College of Computer and Information Sciences Chapter.
Web Client-Server Server Client Hypertext link TCP port 80.
HTTP1 Hypertext Transfer Protocol (HTTP) After this lecture, you should be able to:  Know how Web Browsers and Web Servers communicate via HTTP Protocol.
2: Application Layer1 Chapter 2 Application Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
WWW: an Internet application Bill Chu. © Bei-Tseng Chu Aug 2000 WWW Web and HTTP WWW web is an interconnected information servers each server maintains.
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
Operating Systems Lesson 12. HTTP vs HTML HTML: hypertext markup language ◦ Definitions of tags that are added to Web documents to control their appearance.
IS-907 Java EE World Wide Web - Overview. World Wide Web - History Tim Berners-Lee, CERN, 1990 Enable researchers to share information: Remote Access.
2: Application Layer 1 Chapter 2: Application layer r 2.1 Principles of network applications  app architectures  app requirements r 2.2 Web and HTTP.
CITA 310 Section 2 HTTP (Selected Topics from Textbook Chapter 6)
ECMM6018 Enterprise Networking for Electronic Commerce Tutorial 7
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1 Fundamentals.
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Computer Networks with Internet Technology William Stallings Chapter 04 Modern Applications 4.1 Web Access - HTTP.
JavaScript and Ajax (Internet Background) Week 1 Web site:
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 7 Omar Meqdadi Department of Computer Science and Software Engineering University of.
COSC 2328 – Web Programming.  PHP is a server scripting language  It’s widely-used and free  It’s an alternative to Microsoft’s ASP and Ruby  PHP.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 22 World Wide Web and HTTP.
Web Server Design Week 3 Old Dominion University Department of Computer Science CS 495/595 Spring 2006 Michael L. Nelson 1/23/06.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
Web Programming Language
Section 6.3 Server-side Scripting
WWW and HTTP King Fahd University of Petroleum & Minerals
HTTP – An overview.
Web Development Web Servers.
Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Hypertext Transport Protocol
Tutorial (4): HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 27 WWW and HTTP.
PHP and Forms.
Web Page Concept and Design :
Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Architecture of the web
Traditional Internet Applications
HTTP Hypertext Transfer Protocol
Presentation transcript:

Copyright (c) 2010, Dr. Kuanchin Chen1 The Client-Server Architecture of the WWW Dr. Kuanchin Chen

Copyright (c) 2010, Dr. Kuanchin Chen2 The Hypertext Transfer Protocol (HTTP)  HTTP governs the messages exchanged between a Web server and a Web client.  Who put together the HTTP standard?  What is the current version of it?  Links: Main site for HTTP: The HTTP Specification: html html

Copyright (c) 2010, Dr. Kuanchin Chen3 WWW Client-Side Technologies  (X)HTML  CSS  JavaScript (VBScript, PerlScript, etc.)  XML/XSLT

Copyright (c) 2010, Dr. Kuanchin Chen4 Server-Side Technologies (I)  Active Server Pages (ASP) Languages: VBScript, JavaScript, … Platforms: mostly Windows  ASP.NET is supported on more operating systems than ASP, but … Portability: Medium-to-low Execution: Interpreted (compiled in.NET) Technology: Proprietary  Java Server Pages (JSP) Language: Java Platforms: Windows, UNIX, Mac OS, … Portability: High Execution: Compiled Technology: Proprietary

Copyright (c) 2010, Dr. Kuanchin Chen5 Server-Side Technologies (II)  PHP Hypertext Preprocessor (PHP) Language: PHP Platforms: Windows, UNIX, Mac OS,… Portability: High Execution: Compiled Technology: Open source  Common Gateway Interface (CGI) Language: any Platforms: Windows, UNIX, Mac OS, … Portability: High Execution: Interpreted and/or compiled Technology: Proprietary or open source  Others

Copyright (c) 2010, Dr. Kuanchin Chen6 What is a Port?  A port is a logical connection place for client and server programs to “talk” to each other. Each server program or service is assigned a numeric port number. This is like a main telephone number (the server computer’s physical network connection) and extensions (individual port numbers for services).  Well-known port numbers: FTP: port 21; HTTP: port 80; SMTP: port 25; IMAP: port 143 IANA (Internet Assigned Numbers Authority ) port assignment IANA (Internet Assigned Numbers Authority ) port assignment vs

Copyright (c) 2010, Dr. Kuanchin Chen7 WWW Message Exchange Client (E.g., a browser) Server (E.g., a Web server) A REQUEST message A RESPONSE message HTTP

Copyright (c) 2010, Dr. Kuanchin Chen8 The Hypertext Transfer Protocol (HTTP)  HTTP governs the messages exchanged between a Web server and a Web client.  Who put together the HTTP standard?  What is the current version of it?  Links: Main site for HTTP: The HTTP Specification: html html

Copyright (c) 2010, Dr. Kuanchin Chen9 Syntax of the REQUEST Message Request = Request-Line …………………….. (1) *(( general-header | request-header | entity-header ) CRLF) …………………….. (2) CRLF …………………….. (3) [ message-body ] …………………….. (4) Symbols used in the syntax: 1. | denotes OR 2. [ ] denotes OPTIONAL 3. * denotes ONE OR MORE 4. CRLF: Carriage Return (ASCII 13) and Line Feed( ASCII 10)

Copyright (c) 2010, Dr. Kuanchin Chen10 Syntax of the Request Line Request-Line = Method SP Request-URI SP HTTP Version CRLF Note: 1. Method: POST | GET | others 2. HTTP version: E.g., HTTP/1.1

Copyright (c) 2010, Dr. Kuanchin Chen11 The REQUEST Message – A Graphical View GET / HTTP/1.1 CRLF Host: CRLFwww.yahoo.com From: Accept: text/plain, text/html CRLF CRLF The request line The header section An empty line The optional message body The REQUEST Message

Copyright (c) 2010, Dr. Kuanchin Chen12 Want More Information about the REQUEST message?  See the REQUEST section of the HTTP specification.the REQUEST section

Copyright (c) 2010, Dr. Kuanchin Chen13 The Request Message - Examples Example 1: GET / HTTP/1.1 CRLF Host: CRLF CRLFwww.yahoo.com Example 2: GET /library/ HTTP/1.1 CRLF Host: CRLFwww.wmich.edu CRLF Q: What are the equivalent URLs for the above two examples?

Copyright (c) 2010, Dr. Kuanchin Chen14 Syntax of the RESPONSE Message Response = Status-Line …………………….. (1) *(( general-header | request-header | entity-header ) CRLF) …………………….. (2) CRLF …………………….. (3) [ message-body ] …………………….. (4) Symbols used in the syntax: 1. | denotes OR 2. [ ] denotes OPTIONAL 3. * denotes ONE OR MORE 4. CRLF: Carriage Return (ASCII 13) and Line Feed( ASCII 10)

Copyright (c) 2010, Dr. Kuanchin Chen15 Syntax of the Status Line Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF Note: 1. HTTP version: E.g., HTTP/ Status-Code: See status code def.status code def.

Copyright (c) 2010, Dr. Kuanchin Chen16 Common Status Codes  200 OK: the request is fulfilled and the requested document is attached in the MESSAGE BODY section of the response message.  404 Not Found: the requested document is not found.  505 Internal Server Error: the server cannot fulfill the request (mostly because of the problems in the server-side programs)  For more status code definitions, see the HTTP specification. HTTP specification

Copyright (c) 2010, Dr. Kuanchin Chen17 The RESPONSE Message – A Graphical View HTTP/ OK Date: Wed, 25 Dec :45:47 GMT Content-Type: text/html Content-length: 7386 CRLF My Test Page … The status line An empty line The optional message body The REQUEST Message The header section

Copyright (c) 2010, Dr. Kuanchin Chen18 The Response Message – An Example HTTP/ OK CRLF Date: Mon, 08 Sep :04:24 GMT CRLF Content-Type: text/html CRLF CRLF Yahoo! …

Copyright (c) 2010, Dr. Kuanchin Chen19 Exercise  “Browser-less” request and response messages

Copyright (c) 2010, Dr. Kuanchin Chen20 Server vs. Client?  Web Servers Apache Internet Information Service (IIS) …  Web Clients Browsers Programs simulating the functionality of browsers  Q: How do you know what server a site uses and how many days a site has been up?

Copyright (c) 2010, Dr. Kuanchin Chen21 Introduction to Web Servers  The Web Server marketWeb Server market Market share User community  Installation & Configuration See a document on WebCT  Directories/Folders Server root Document root

Server Root vs. Document Root Copyright (c) 2010, Dr. Kuanchin Chen22 Internet Information Services (IIS) Apache (actually WAMP, a variant of Apache) Document Root Server Root

Copyright (c) 2010, Dr. Kuanchin Chen23 Default File(s)  Default files The file to load when no file name is provided in a URL  Apache and others: index.htm …  IIS: default.htm, default.htm, index.htm…  Locations of files and directories

Copyright (c) 2010, Dr. Kuanchin Chen24 Checking What Server-Side Technology is Used on a Web Site  By file extension  By checking modules installed on the Web server  By asking around

Copyright (c) 2010, Dr. Kuanchin Chen25 XHTML Form Methods  GET Used to retrieve an online document Also used to send HTML form data to a web server Data are sent along with the URL (therefore, they are visible in the address box) Limited URL length, therefore limited data volume Easier to bookmark dynamic pages  POST Data are sent in the message body section (not visible to the user) Larger volume of data is possible More secure (compared with the GET method)  Other form methods

Copyright (c) 2010, Dr. Kuanchin Chen26 URL Encoding (I)  An encoded URL: Server%22  Certain characters of form data are encoded "...Only alphanumerics [0-9a-zA-Z], the special characters $- _.+!*'(), and reserved characters used for their reserved purposes may be used unencoded within a URL." (RFC 1738)RFC 1738 Reserved characters that have special meanings in a URL: Dollar ("$") Ampersand ("&") Plus ("+") Comma (",") Forward slash/Virgule ("/") Colon (":") Semi-colon (";") Equals ("=") Question mark ("?") 'At' symbol

Copyright (c) 2010, Dr. Kuanchin Chen27 URL Encoding (II)  Unsafe characters that need to be encoded: "{", "}", "|", "\", "^", "~", "[", "]", and "`".  How encoding is done.

Copyright (c) 2010, Dr. Kuanchin Chen28 URL Encoding (III)  x?name=John+Doe&phone=  sp.net&start=0&ie=utf-8&oe=utf- 8&client=firefox- a&rls=org.mozilla:en-US:official