Networking and Internet

Similar documents
1.264 Lecture 12. HTML Introduction to FrontPage

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM Advanced Internet Technology Lab.

Summary 4/5. (contains info about the html)

CS 43: Computer Networks. Layering & HTTP September 7, 2018

Introduction to the Internet and World Wide Web p. 1 The Evolution of the Internet p. 2 The Internet, Intranets, and Extranets p. 3 The Evolution of

Global Servers. The new masters

A Brief Introduction to HTML

CS144 Notes: Web Standards

World Wide Web, etc.

The figure below shows the Dreamweaver Interface.

Certified HTML5 Developer VS-1029

A HTML document has two sections 1) HEAD section and 2) BODY section A HTML file is saved with.html or.htm extension

INTRODUCTION TO HTML5! HTML5 Page Structure!

(Refer Slide Time: 01:41) (Refer Slide Time: 01:42)

COSC 2206 Internet Tools. The HTTP Protocol

Building Web Based Application using HTML

Web Programming. Based on Notes by D. Hollinger Also Java Network Programming and Distributed Computing, Chs.. 9,10 Also Online Java Tutorial, Sun.

Html basics Course Outline

3. WWW and HTTP. Fig.3.1 Architecture of WWW

Basics of Web Design, 3 rd Edition Instructor Materials Chapter 2 Test Bank

Spring 2014 Interim. HTML forms

How to work with HTTP requests and responses

D B M G. Introduction to databases. Web programming: the HTML language. Web programming. The HTML Politecnico di Torino 1

Web Designing HTML5 NOTES

Web Programming Paper Solution (Chapter wise)

Announcements. Paper due this Wednesday

INTERNET ENGINEERING. HTTP Protocol. Sadegh Aliakbary

OU EDUCATE TRAINING MANUAL

Certified HTML Designer VS-1027

Notes beforehand... For more details: See the (online) presentation program.

Web Publishing Basics I

COPYRIGHTED MATERIAL. The Basics of HTML. What Is the World Wide Web?

Chapter 1 Getting Started with HTML 5 1. Chapter 2 Introduction to New Elements in HTML 5 21

Lecture : 3. Practical : 2. Course Credit. Tutorial : 0. Total : 5. Course Learning Outcomes

HTTP and HTML. We will use HTML as a frontend to our webapplications, therefore a basic knowledge of HTML is required, especially in forms.

Web Development and HTML. Shan-Hung Wu CS, NTHU

HTTP Protocol and Server-Side Basics

Programmazione Web a.a. 2017/2018 HTML5

COMPUTER APPLICATIONS IN BUSINESS FYBMS SEM II

CPET 499/ITC 250 Web Systems. Topics

Web Systems & Technologies: An Introduction

Applications & Application-Layer Protocols: The Web & HTTP

FileNET Guide for AHC PageMasters

WEB TECHNOLOGIES CHAPTER 1

Web Systems & Technologies: An Introduction

HTML: Fragments, Frames, and Forms. Overview

CS WEB TECHNOLOGY

PBwiki Basics Website:

Creating Web Pages Using HTML

HTML TAG SUMMARY HTML REFERENCE 18 TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES MOST TAGS

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB

recall: a Web page is a text document that contains additional formatting information in the HyperText Markup Language (HTML)

HTML Forms. By Jaroslav Mohapl

Unit 4 The Web. Computer Concepts Unit Contents. 4 Web Overview. 4 Section A: Web Basics. 4 Evolution

FileNET Guide for AHC PageMasters

Introduction to Computers and Their Applications

Beginning Web Site Design

HYPERTEXT MARKUP LANGUAGE ( HTML )

Dreamweaver Primer. Using Dreamweaver to Create and Publish Simple Web Pages. Mark Branom, Stanford University, Continuing Studies June 2011

Week 1 - Overview of HTML and Introduction to JavaScript

Web Development & Design Foundations with XHTML. Chapter 2 Key Concepts

CSC 121 Computers and Scientific Thinking

CSC Web Technologies, Spring HTML Review

Chapter 15 Plug-ins, ActiveX, and Applets

Uniform Resource Locators (URL)

GoLive will first ask you if your new site will be for one individual or a work group; select for a Single User, and click Next.

Programming the Web 06CS73 INTRODUCTION AND OVERVIEW. Dr. Kavi Mahesh, PESIT, Bangalore. Textbook: Programming the World Wide Web

Using Dreamweaver CS3 to Create and Publish Simple Web Pages

Javascript, Java, Flash, Silverlight, HTML5 (animation, audio/video, ) Ajax (asynchronous Javascript and XML)

COPYRIGHTED MATERIAL. Contents. Chapter 1: Creating Structured Documents 1

1.1 A Brief Intro to the Internet

CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0

CS 350 COMPUTER/HUMAN INTERACTION. Lecture 6

HTML. HTML Evolution

WWW Document Technologies

Web technologies. Web. basic components. embellishments in browser. DOM (document object model)

HTML forms and the dynamic web

Creating and Building Websites

Creating Web Pages with SeaMonkey Composer

Networking. INFO/CSE 100, Spring 2006 Fluency in Information Technology.

1. The basic building block of an HTML document is called a(n) a. tag. b. element. c. attribute. d. container. Answer: b Page 5

UNIT I. A protocol is a precise set of rules defining how components communicate, the format of addresses, how data is split into packets

This document provides a concise, introductory lesson in HTML formatting.

M3-R3: INTERNET AND WEB DESIGN

c122jan2714.notebook January 27, 2014

How to Edit Your Website

HTML Tables and Forms. Outline. Review. Review. Example Demo/ Walkthrough. CS 418/518 Web Programming Spring Tables to Display Data"

Forms, CGI. Objectives

Selected Sections of Applied Informatics

By Ryan Stevenson. Guidebook #2 HTML

Comp-206 : Introduction to Software Systems Lecture 23. Alexandre Denault Computer Science McGill University Fall 2006

Web Technology. COMP476 Networked Computer Systems. Hypertext and Hypermedia. Document Representation. Client-Server Paradigm.

As we design and build out our HTML pages, there are some basics that we may follow for each page, site, and application.

Introduction to using HTML to design webpages

A Balanced Introduction to Computer Science, 3/E

Web Technologies - by G. Sreenivasulu Handout - 1 UNIT - I

introduction to XHTML

Jeff Offutt SWE 642 Software Engineering for the World Wide Web

SYBMM ADVANCED COMPUTERS QUESTION BANK 2013

HTML Element A pair of tags and the content these include are known as an element

Transcription:

Today s Topic Lecture 13 Web Fundamentals Networking and Internet LAN Web pages Web resources Web client Web Server HTTP Protocol HTML & HTML Forms 1 2 LAN (Local Area Network) Networking and Internet 3 Local area network connects local computing devices to share data or information Computers, printers, main-frame, routers, Topology: defines physical connectivity between computing devices Star, ring, bus, tree, Computing devices talk to each other using LAN protocols Protocol: The 'language' spoken between devices to help them exchange information. A formal description of message formats and the rules that two computers must follow in order to exchange those messages. Apple Talk, NetBUI, MS-Network (Network Neighborhood), Each computing device must have an unique identifier such as MAC (Media Access Control address) Each modern NIC has an unique MAC address (e.g. 00:0D:60:B1:39:7B) http://standards.ieee.org/regauth/oui/index.shtml 4 Network Topology Internet Inter-Net Inter-connected LAN (local area network) through WAN (wide-area network) Nearly no centralized control or management Network segments are interconnected through routers Routers are dedicated computers managing packets or data TCP/IP is the universal data transport protocol on the Internet Actual format or content is left to higher-level protocols (next), like the web 5 Source MIT 1.264 lecture notes 6 1

Network Communication OSI Layered Network Model Most applications are at layer-7 that uses high-level of abstraction to communicate with other devices I want to talk to Mr. Smith Logically, Each layer talks directly to the same layer on the other side. Smith says Hi! There. Physically, data is moved down to lower levels and wrapped up with additional information (headers) Message for Smith@140.118.105.12: I want to talk to Mr. Smith The layered model Pro: each layer is unaware of other layers change of networking device requires little effort Con: each layer introduces some latency or processing overhead 7 Layer5 & Layer6 not shown here due to their infrequent use! 8 TCP/IP Layering Source MIT 1.264 lecture notes 9 10 Hardware (1) Web Pages Web page is the basic unit of organization 3 4 Software Simple pages retrieved in a single operation Compound pages (typically text and graphics) take multiple passes (multiple TCP/IP connections unless Keep-Alive is set) Give me page, give me graph1, give me graph2, Pages have hypertext 2 Links to other pages, implemented via embedded URLs 1 Data in transmission Pages are described using Hypertext Markup Language (HTML) High level document description language Specifies structure but not appearance of document Defines sections, such as level 1 header, list, emphasized text Browser handles rendering of page on client machines 11 12 2

(2) Web Resources Each web resource (document) has a type The type is described as MIME (Multi-purpose Internet Mail Extension) types Some types (e.g. HTML) are rendered directly by web browsers Some types (video, flash, ) are displayed via plug-ins Web type system is extensible. New types are easy to accommodate. Define new MIME type in server Browser will prompt for helper application if MIME type unrecognized Browser can suggest Web site from which to download helper app Download and install helper app, and use the new MIME type Web server extensibility: programs to generate documents URLs can point at programs as well as pages Programs can be simple (time of day) or complex (database, analysis) Java, Perl, C++, Java Server Pages, Visual Basic, Active Server Pages, Applications vary from simple (time of day) to complex database and analysis 13 MIME type examples application/msword Word application/pdf Acrobat application/vnd.ms-excel Excel application/zip Zip file audio/basic.au,.snd audio/x-wav MS audio image/gif GIF image/jpeg JPEG text/plain Plain text text/html HTML video/mpeg Video See http://www.rfc-editor.org for current list of HTTP, MIME, other Internet specifications 14 (3) Web Clients (4) Web Servers Most web clients are web browsers Internet Explorer, Mozilla Firefox, Opera, Web browsers request web pages (through URL), render the gotten pages, and present it to the user Web clients can also be autonomous applications Web spider / robots search engines Standard (application) protocol HTTP (HyperText Transfer Protocol), current version 1.1 Four phases Open Connection (e.g. Hello there!) Request (e.g. Please give me a big mac!) Response (e.g. Here comes your big mac!) Web servers serve web content and send out data using HTTP protocol The content can be static content (HTML pages, images, video files, ) The content can also be generated dynamically based on some header info in the HTTP request Two of the most popular web server software: Apache & Microsoft IIS A world-wide survey can be found at http://news.netcraft.com/archives/web_server_survey.html Netcraft can also be used to make a site report, including the web server software, last reboot, network owner, Close Connection (e.g. Thank you and good bye!) 15 16 HTTP Protocol Developer November 2011 Percent December 2011 Percent Change Apache 341,880,66 2 65.00% 362,267,92 2 65.22% 0.22 Microsoft 81,261,099 15.45% 82,521,809 14.86% -0.59 nginx 44,731,780 8.50% 49,143,289 8.85% 0.34 Google 17,749,748 3.37% 18,464,148 3.32% -0.05 17 Source: www.netcraft.com 18 3

Hardware Software Data in transmission 19 HTTP Protocol 1. Open connection Connection is opened by giving URL URL: Uniform Resource Locator (e.g. http://www.ntust.edu.tw) 2. Request Send request: 1. Request method (GET, POST,, may have additional data) 2. URL 3. HTTP version number 4. Header Information, terminated with a blank line 3. Response: Server processes the request and sends: HTTP protocol version and status code Header information, terminated by blank line Text (data) 4. Close connection 20 HTTP HTTP Request Example Telnet yo-1.ct.ntust.edu.tw 80 Here we use telnet to establish connection (instead of using web browsers) The following is an example of HTTP request sent from browsers to servers. 1. Request 2. URL 3. Protocol GET /index.html HTTP/1.0 These transactions are stateless. The connection is closed Host: yo-1.ct.ntust.edu.tw (Required) 4. Header after each page and re-established: Server can t connect Accept: text/html, text/plain, image/jpeg, */* successive requests from the client Dynamic content is produced in response to HTTP request by a 5. Data server program. 21 22 HTTP Requests (browser to server) GET: Requests specified document (used to post too) HEAD: Requests only header of specified document POST: Requests that server accept data from browser and generate dynamic content OPTIONS: Get server and access options TRACE: Used in debugging PUT: Replace server document with data from browser DELETE: Delete specified document on server GET is the most frequent request from browsers POST used for processing fill-out forms HEAD is used by search engines to check for live pages No security or authentication in HTTP ( Basic sends password in clear). Use Secure Socket Layer (SSL) to encrypt your Web exchanges 23 HTTP Headers (browser to server) Accept: MIME types accepted by client (multiple allowed) Connection: Connection type for client (keep-alive, close) Cookie: Return previous cookie to server (data exchange) From: Email address of user (sent only by crawlers) Host: Original host requested (forward, multiple names) If-Modified-Since : Used to reduce fetching of docs browser already has Referrer: URL of last document client displayed User-Agent: Name and version of client software (browser) 24 4

3: Header 4: Data HTTP Response Example 1: Protocol 2: Status code HTTP/1.1 200 OK Date: Wed, 04 May 2005 14:33:29 GMT Server: Apache Last-Modified: Mon, 31 Jan 2005 09:53:17 GMT ETag: "16ec7-a9-fc4c929b" Accept-Ranges: bytes Content-Length: 169 Content-Type: text/html; charset=null <HTML>... </HTML> HTTP Response Status Code 100-101: Informational response; client should respond with some other action (continue, new protocol) 200-206: Request was successful 300-307: Document has moved; indicate new address 400-417: Client error, such as unauthorized request 500-505: Server error Examples: 200 OK 404 Not found 500 Internal server error 25 26 HTTP Response Header Allow: Requests allowed, such as GET (400s) Content-Length: Length in bytes of data to be returned (used for keep alive connections) Content-Type: MIME type of returned data Expires: Date at which document expires Last-Modified: Date at which document was last modified Location: New document address (with 300 status) Set-Cookie: Gives browser a cookie http://en.wikipedia.org/wiki/http_cookie 27 HTML Good tutorial: http://www.w3schools.com/html/ 28 HTML Example <tag> </tag>: describes structures This page has: <html> <html> </html>: A HTML document <head> </head>: Document header <body> </body>: Document body <head> <meta http-equiv="content-type" content="text/html;charset=big5"> <title>my First WebPage</title> </head> <body> <h1> Hello World! </h1> </body> Link HTML Document Tags (< >) are hints to web browsers and are usually hidden from users, and are often in pairs In XHTML, tags are required to be in pairs. Some tags have attributes E.g. <a href= http://www.abc.com > ABC </a> HTML documents are enclosed by:<html> and </html> Two sections: head and body head has identifying information not displayed. body is displayed, with formatting: <p>: Paragraph <h1> through <h6>: Header level 1 through 6. <br>: line break or carriage return <a>: Anchor, placed around text or images; used for hyperlinks </html> 29 30 5

Tag Examples (1/2) Tag Examples (2/2) Control appearance of page Not as precise as MS Word or other editors Intended for pages that can be viewed on machines with very different graphics capabilities. Tags discourage specific assumptions. Opening tag Closing tag Definition <em> <strong> <var> <cite> <code> </em> </strong> </var> </cite> </code> Emphasis (often italic) Strong emphasis (often bold) Variable Citation (of an article or book) Computer code (tags ignored) 31 Paragraph format: <h2 align= center > text </h2> Preformatted text: <pre> (lines up columns exactly, etc.) </pre> Horizontal lines: <hr width= 80% align= left > Lists: can be multi-level, etc. Ordered (numbered) <ol> Unordered (bulleted) <ul> Definition (indented) <dl> Tables: <table>, <caption>, <tr> (row), etc. Font size and color: <font>, <font color= name > Special characters: > is > Note: The blue text shown are related to the appearance, and these are no longer recommended. Use CSS (Cascading Style Sheet) instead. 32 HTML Forms Used as front ends to server programs Active Server Pages, Java Server Pages, PHP, servlets, Forms are user interface controls to collect data from user and transmit it to the server application program Forms are most common user interface method Forms are placed on Web pages that can also have other elements JavaScript (totally different than Java language!) can be used with HTML forms to enhance their operation Java applets provide a richer user interface, are more complex and have security features. Not used much. All of these run on the browser and are user interface components 33 34 How HTML forms transmit data Forms allow a series of controls to be placed on the page Each control has a name and a value Entire form is associated with the URL of a server side program that will process the input data Form data is sent when user presses Submit button (control) Data is sent to URL as string of form: Name1=Value1&Name2=Value2& NameN=ValueN If data is sent with HTTP GET command, it is appended to end of GET string after a?: GET /Index.html?Name1=Value1 If data is sent with HTTP PUT command, it is sent after the blank line as the original string Server programs (ASP, JSP, servlet, etc.) have methods to extract the data from the string and use it in the program 35 Example: www.google.com 36 6

HTML 4.0 tags for Forms Example (1/2) Tag <form> <input type= <select> <option> <textarea> text password file checkbox radio image hidden submit reset Definition Start a form Single line of text entry Single line password entry File to upload, with Browse button Checkbox Radio button (option box) A graphical submit button Track user, store predefined inputs Submit button for form Button to restore default values List box or combo box Item in scrolling list or popup menu Start multiple-line text entry field 37 <html> <body> <form> text input: password input: file: checkbox: radio: hidden: image: submit: reset: </form> </body> </html> <input type=text> <BR> <input type=password> <BR> <input type=file> <BR> <input type=checkbox> <BR> <input type=radio> <BR> <input type=hidden> <BR> <input type=image src= buy.gif"> <BR> <input type=submit> <BR> <input type=reset> <BR> In this example, a single form with several controls are created. However, these controls are useless until we define an ACTION LINK 38 Example (2/2) <html> <body> <form action="http://somesite.com/prog/adduser" method="post"> First name: <INPUT type="text" name="firstname"> <br> Last name: <INPUT type="text" name="lastname"> <br> Email: <INPUT type="text" name="email"> <br> <input type="radio" name="sex" value="male"> Male <br> <input type="radio" name="sex" value="female"> Female <br> <input type="submit" value="send"> <input type="reset"> </form> </body> </html> LINK Important Attributes <form action= http://someurl.php method="post"> action: defines the processing page to handle the data on the form filled by users method: defines how the data is sent to the processing page <input type="text" name="firstname"> type: defines what kind of control is used to get data name: defines an identifier for the action form to get data http://www.w3.org/tr/rec-html40/interact/forms.html#h-17.3 39 40 What is ASP.NET ASP.Net ASP: Active server pages.net:.net Framework ASP.NET is a server-side programming environment to create and run dynamic, interactive Web server applications and services. Server-side scripting means computer codes (scripts) are executed on the web server. Client-side scripting means computer codes are executed on the web browser. Active Server Pages.Net http://authors.aspalliance.com/aspxtreme/webapps/aspnetarchitecture.aspx http://www.west-wind.com/presentations/howaspnetworks/howaspnetworks.asp 7

ASP.NET (2/2) Disk ASP. Net Web server requirement for ASP.NET Microsoft IIS.NET Framework Runtime installed Windows 2000 + Web browser requirement Since ASP.NET are server-side programs, it has nothing to do with the browser. However, the dynamically generated page still need to conform to W3C specifications. We are going to write very little ASP.NET code here. Most ASP.NET pages are generated automagically by Expression Web. Summary Networking & Internet Web organization Web pages Web resources Web client Web Server HTTP Protocol HTML & HTML Forms Assignment #7 (1/2) Due: 12/28/2011 Assuming everyone has completed assignment #6 (thus we ve completed a 2-tier application) In this assignment, we re going to build a static website (without database connectivity) using Microsoft Expression Web. http://www.microsoft.com/expression/try-it/default.aspx 45 Assignment #7 (2/2) Please use Microsoft Expression Web s template to create a web site for your company. Please assume you re starting up a business and try to make a good corporate image on the web. (in other words, make it pretty!) Please include all web pages for your core function. For now, just leave them as blank or under construction. Note: TRY TO BE CURIOUS Try observe HTML codes generated by Expression Web to familiarize yourself with HTML. If you are already familiar with HTML, try to predict what kind of tags Expression Web will generate for you. Try to be curious about the functions & formats provided by Expression Web. 8