SWE 444 Internet and Web Application Development Introduction to Web Technology Dr. Ahmed Youssef Internet It is a network of networks connected and communicating using TCP/IP communication protocol 2 1
Brief History of the Internet 1968 - DARPA (Defense Advanced Research Projects Agency) contracts with BBN (Bolt, Beranek & Newman) to create ARPAnet 1970 - First five nodes: UCLA Stanford UC Santa Barbara U of Utah, and BBN 1974 - TCP specification by Vint Cerf 1984 On January 1, the Internet with its 1000 hosts converts to using TCP/IP for its messaging Memex Conceived 1945 A Mathematical Theory of Communication 1948 A Brief Summary of the Evolution of the Internet Silicon Chip 1958 First Vast Computer Network Envisioned 1962 Packet Switching Invented 1964 Hypertext Invented 1965 ARPANET 1969 TCP/IP Created 1972 Internet Named and Goes TCP/IP 1984 WWW Created 1989 Mosaic Created 1993 1945 1995 Age of ecommerce Begins 1995 Copyright 2002, William F. Slater, III, Chicago, IL, USA 2
Intranet & Extranets Intranet A private network contained within an organization or business used to share information and resources among coworkers. Extranet A private network that securely shares part of an organization s information or operations with external partners Intranet & Extranets Ahmed Youssef:: SWE444: Internet and Web Application Development 6 3
Components of Web Web Site Web Browsers Web Servers Uniform Resource Locator(URL) HTML HTTP Internet Protocol 7 Web Page vs Website A web page is a part of a complete web site. It is a document or information resource that is suitable for the World Wide Web and it can be accessed through a web browser. Websites can consist of only a few web pages or many hundreds of web pages. Ahmed Youssef:: SWE444: Internet and Web Application Development 8 4
Web Browser A web browser or Internet browser is a software application for retrieving, presenting, and traversing information resources on the World Wide Web. Ahmed Youssef:: SWE444: Internet and Web Application Development 9 Web Browser Web pages are viewed in Web browsers Internet Explorer Mozilla Firefox Netscape Navigator 5
Web Browsers First graphical browser running on generalpurpose platforms: (1993) 11 Web servers Web servers are computers on the Internet that host websites, serving pages to viewers upon request using HTTP protocol. This service is referred to as web hosting. Apache web server Microsoft Internet Information Server IIS Ahmed Youssef:: SWE444: Internet and Web Application Development 12 6
Accessing a web site Client computer Server computer Internet connection Web browser Web server Database server Internet Protocols Communication protocol: how computers talk The Internet Protocol (IP) is the method or protocol by which data is sent from one computer to another on the Internet. 14 7
Internet Protocol address (IP address) It is a usually numerical label assigned to each device participating in a computer network that uses the Internet Protocol for communication. IP address: 32-bit number (in IPv4) Written as four dot-separated bytes, e.g. 212.138.86.31 (www.uoh.edu.sa) IP IP function: transfer data from source device to destination device IP source software creates a packet representing the data Header: source and destination IP addresses, length of data, etc. Data itself If destination is on another LAN, packet is sent to a gateway that connects to more than one network 8
IP Source Network 1 Gateway Destination Gateway Network 2 Network 3 17 IP Source LAN 1 Gateway Destination Gateway Internet Backbone LAN 2 18 9
Transmission Control Protocol (TCP) Limitations of IP: No guarantee of packet delivery (packets can be dropped) Communication is one-way (source to destination) TCP enables two hosts to establish a connection and exchange streams of data. Provides guarantee that packets delivered Provide two-way (full duplex) communication 19 TCP Establish connection. { Can I talk to you? OK. Can I talk to you? OK. { Send packet with acknowledgment. Source Here s a packet. Got it. Destination Resend packet if { no (or delayed) acknowledgment. Here s a packet. Here s a resent packet. Got it. 20 10
Hypertext Transport Protocol (HTTP) Protocol for HTML retrieval of and other documents from website throughout the Internet. HTTP is based on the request-response communication model: Client sends a request Server sends a response 21 HTTP Each HTTP operation is known as a transaction. The HTTP transaction process involves the following steps: Establishing connection with the server Sending a client or user request Sending a response by the server Terminating the connection by the server Ahmed Youssef:: SWE444: Internet and Web Application Development 22 11
HTTP The information transmitted using HTTP is often totally text Can use the Internet s Telnet protocol to simulate browser request and view server response 23 Uniform Resource Locator URL is a standard way to specify the location of a resource URLs are the unique addresses of Internet Resources. A URL is divided into four parts. Transfer protocols Server name Directory path File name 24 12
General URL syntax <scheme>:<scheme-dependent-information> Scheme examples: http (Hyper Text Transfer Protocol) ftp (File Transfer Protocol) news (News protocol) Example http://www.uoh.edu.sa/dept/swe444.html Transfer Protocol: Server name: Directory Path: File name: Ahmed Youssef:: SWE444: Internet and Web Application Development 26 13
HTML HyperText Markup Language HTML is a coding language used to create hypertext/hypermedia documents known as web pages. Ahmed Youssef:: SWE444: Internet and Web Application Development 27 Domain Name Service (DNS) DNS is the phone book for the Internet Map between host names and IP addresses Host names Labels separated by dots, e.g., www.example.org Final label is top-level domain Generic:.com,.org, etc. Country-code:.us,.sa,.eg, etc. 28 14
Types of Web Sites Static: It contains a fixed amount of pages and the information is presented in HTML. Dynamic: the content changes every time the page loads. This change in content will directly be related to the latest updated information present on the database. Ahmed Youssef:: SWE444: Internet and Web Application Development 29 Accessing static web pages Static the contents don t change (unless they re edited). Web pages (text files) and other needed files (e.g. images) are stored as files on the web server and are retrieved as needed in response to HTTP requests Client Server HTTP request Browser Web server HTML file HTTP response 15
Types of web sites based on content Information Search Engines Educational Entertainment Forums Company Online shops Ahmed Youssef:: SWE444: Internet and Web Application Development 31 World Wide Web Originally, one of several systems for organizing Internet-based information Characteristic of Web: support for hypertext (text containing links) Communication via Hypertext Transport Protocol (HTTP) Document representation using Hypertext Markup Language (HTML) 32 16
World Wide Web The Web is the collection of machines (Web servers) on the Internet that provide information, above all HTML documents, via HTTP. Machines that access information on the Web are known as Web clients. A Web browser is software used by an end user to access the Web. 33 Client Caching A cache is a local copy of information gets from some other source 34 17
Client Client Caching Server 1. HTTP request for image Browser 2. HTTP response containing image Web Server 3. Store image Cache 35 Client Client Caching Server This Browser I need that image again HTTP request for image HTTP response containing image Web Server Cache 36 18
Client Client Caching Server Browser I need that image again Web Server Get image or this Cache 37 Client Caching Cache advantages (Much) faster than HTTP request/response Less network traffic Less load on server Cache disadvantage Cached copy of resource may be invalid (inconsistent with remote version) 38 19
Secure Servers Since HTTP messages typically travel over a public network, private information (such as credit card numbers) should be encrypted to prevent eavesdropping https URL scheme tells browser to use encryption Common encryption standards: Secure Socket Layer (SSL) Transport Layer Security (TLS) 39 HTTP Requests Secure Servers I d like to talk securely to you (over port 443) Here s my certificate and encryption data HTTP Requests Here s an encrypted HTTP request Browser TLS/ SSL Here s an encrypted HTTP response TLS/ SSL Web Server HTTP Responses Here s an encrypted HTTP request Here s an encrypted HTTP response HTTP Responses 40 20