1 © copyright 2000 ethel schuster the web… in 15 minutes ethel schuster [email protected]...

25
1 © Copyright 2000 Ethel Schuster The Web… in 15 minutes Ethel Schuster [email protected] http://www.cs.uml.edu/~schuster Http://www.dov-e-games.com/dov-e-games/

Upload: marjory-hudson

Post on 03-Jan-2016

221 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 © Copyright 2000 Ethel Schuster The Web… in 15 minutes Ethel Schuster schuster@cs.uml.edu schuster Http:

1

© Copyright 2000 Ethel Schuster

The Web… in 15 minutes

Ethel Schuster

[email protected]

http://www.cs.uml.edu/~schuster

Http://www.dov-e-games.com/dov-e-games/

Page 2: 1 © Copyright 2000 Ethel Schuster The Web… in 15 minutes Ethel Schuster schuster@cs.uml.edu schuster Http:

2

© Copyright 2000 Ethel Schuster

Goals of the Web

• Sharing information

• Most successful

• Collaboration

• “Not quite”

Page 3: 1 © Copyright 2000 Ethel Schuster The Web… in 15 minutes Ethel Schuster schuster@cs.uml.edu schuster Http:

3

© Copyright 2000 Ethel Schuster

Overview

• Brief discussion of components …

• Create web pages using HTML …

• Install home page “out there in the world”

Page 4: 1 © Copyright 2000 Ethel Schuster The Web… in 15 minutes Ethel Schuster schuster@cs.uml.edu schuster Http:

4

© Copyright 2000 Ethel Schuster

Understanding the Components

• Web Browser (Client) …

• Server …

• Server Side Processing ...

Page 5: 1 © Copyright 2000 Ethel Schuster The Web… in 15 minutes Ethel Schuster schuster@cs.uml.edu schuster Http:

5

© Copyright 2000 Ethel Schuster

Web Browser ...

• Main two roles:

• Finds web server on Internet & requests page to display at local machine

• Knows how to interpret HTML tags to display page as intended

•Netscape, Internet Explorer, Amaya, Opera

Page 6: 1 © Copyright 2000 Ethel Schuster The Web… in 15 minutes Ethel Schuster schuster@cs.uml.edu schuster Http:

6

© Copyright 2000 Ethel Schuster

Web Server …

• Computer software

• Runs on dedicated machine

• Responds to request from browser and sends page

• NCSA, Apache, CERN

Page 7: 1 © Copyright 2000 Ethel Schuster The Web… in 15 minutes Ethel Schuster schuster@cs.uml.edu schuster Http:

7

© Copyright 2000 Ethel Schuster

Server Side Processing …

• Handles dynamic data

• CGI

• Servelet

Page 8: 1 © Copyright 2000 Ethel Schuster The Web… in 15 minutes Ethel Schuster schuster@cs.uml.edu schuster Http:

8

© Copyright 2000 Ethel Schuster

Web Page ...

• File with text, graphics, hyperlinks, sound, video

• Contains all above along with HTML tags

• Tags tell web browser how to display the page

Page 9: 1 © Copyright 2000 Ethel Schuster The Web… in 15 minutes Ethel Schuster schuster@cs.uml.edu schuster Http:

9

© Copyright 2000 Ethel Schuster

Creating Web Pages

• Create a document with HTML tags

• Using a plain text editor

•NotePad, Word

• Using a Web Page editor

•Homesite, FrontPage

Page 10: 1 © Copyright 2000 Ethel Schuster The Web… in 15 minutes Ethel Schuster schuster@cs.uml.edu schuster Http:

10

© Copyright 2000 Ethel Schuster

Understanding HTML

• Hypertext Markup Language• Tags: Special instructions surrounded

by “<>”• Symmetry (usually): matching • “begin” with “<>” and • “end” with “</>”• E.g. <HTML> and </HTML>

Page 11: 1 © Copyright 2000 Ethel Schuster The Web… in 15 minutes Ethel Schuster schuster@cs.uml.edu schuster Http:

11

© Copyright 2000 Ethel Schuster

Basic HTML Document

• <HTML> to mark the page as an HTML document

• <!--> to specify comments

• <HEAD> to mark begin and end of header for page

• <TITLE> to mark the title of the page

• <BODY> to mark the body of the page

Page 12: 1 © Copyright 2000 Ethel Schuster The Web… in 15 minutes Ethel Schuster schuster@cs.uml.edu schuster Http:

12

© Copyright 2000 Ethel Schuster

Example Template

• http://www.cs.uml.edu/~schuster/books1.html

Page 13: 1 © Copyright 2000 Ethel Schuster The Web… in 15 minutes Ethel Schuster schuster@cs.uml.edu schuster Http:

13

© Copyright 2000 Ethel Schuster

HTML commands

• Change color of background and font• Can use hexadecimal values

• Introduce different headers with <H1>, <H2> and <H3>

• Center the text with <center>• Paragraphs in HTML using <p>• http://www.cs.uml.edu/~schuster/

books2.html

Page 14: 1 © Copyright 2000 Ethel Schuster The Web… in 15 minutes Ethel Schuster schuster@cs.uml.edu schuster Http:

14

© Copyright 2000 Ethel Schuster

Hyperlinks in HTML

• One of the most important capability of HTML:

• To create hyperlinks to documents elsewhere

• How? Use anchors

• <a href = “http://www.yahoo.com”>http://www.yahoo.com</a>

Page 15: 1 © Copyright 2000 Ethel Schuster The Web… in 15 minutes Ethel Schuster schuster@cs.uml.edu schuster Http:

15

© Copyright 2000 Ethel Schuster

Lists in HTML

• Items marked with <li>• Ordered lists• <ol> … </ol>

• Unordered lists• <ul> … </ul>

• http://www.cs.uml.edu/~schuster/books4.html

Page 16: 1 © Copyright 2000 Ethel Schuster The Web… in 15 minutes Ethel Schuster schuster@cs.uml.edu schuster Http:

16

© Copyright 2000 Ethel Schuster

Tables in HTML

• Tables specified with <table> tag• Rows use <tr> tag• Cells use <td> tag, <th> for header

• Optional: modify width, alignment, bgcolor, height

• http://www.cs.uml.edu/~schuster/books_table.html

Page 17: 1 © Copyright 2000 Ethel Schuster The Web… in 15 minutes Ethel Schuster schuster@cs.uml.edu schuster Http:

17

© Copyright 2000 Ethel Schuster

Graphics

• Most images are GIF or JPG files• Can be scanned, downloaded or

generated with• Editor• E. g. Paint Shop Pro, PhotoShop

• http://www.dov-e-games.com/dov-e-games

Page 18: 1 © Copyright 2000 Ethel Schuster The Web… in 15 minutes Ethel Schuster schuster@cs.uml.edu schuster Http:

18

© Copyright 2000 Ethel Schuster

Putting the Page up for the World

• Internet service provider (ISP)• College allocates space• Specify the directory to place files•Unix: public_html (convention used

but not everywhere)•Make files accessible• “Home Page” file is index.html

Page 19: 1 © Copyright 2000 Ethel Schuster The Web… in 15 minutes Ethel Schuster schuster@cs.uml.edu schuster Http:

19

© Copyright 2000 Ethel Schuster

The URL Concept

• Each hyperlink, 2 components:

• Anchor text/graphics

• Trigger hyperlink when clicked

• Universal Resource Locator ...

Page 20: 1 © Copyright 2000 Ethel Schuster The Web… in 15 minutes Ethel Schuster schuster@cs.uml.edu schuster Http:

20

© Copyright 2000 Ethel Schuster

Universal Resource Locator (URL)• What happens when hyperlink is activated• Protocol to reach• Target server• Host system (server name) where doc is • Directory path• Filename

Page 21: 1 © Copyright 2000 Ethel Schuster The Web… in 15 minutes Ethel Schuster schuster@cs.uml.edu schuster Http:

21

© Copyright 2000 Ethel Schuster

Examples

• http://www.magicpen.com

• Http://www.donbarnett.com/art/art_DB.htm

• My web page

• http://www.cs.uml.edu/~schuster

Page 22: 1 © Copyright 2000 Ethel Schuster The Web… in 15 minutes Ethel Schuster schuster@cs.uml.edu schuster Http:

22

© Copyright 2000 Ethel Schuster

Common Gateway Interface: CGI

• Used to create dynamic content• Output can change, e.g.,• Search for an author in an online

bookstore• Have partial name • Dynamically create a list of books by

that author

Page 23: 1 © Copyright 2000 Ethel Schuster The Web… in 15 minutes Ethel Schuster schuster@cs.uml.edu schuster Http:

23

© Copyright 2000 Ethel Schuster

How CGI scripts work

• Instead of displaying a page

• => execute a program

• Output of execution is a web page

• sent to browser requesting the page

• Output is executable code

• E.g. C or PERL script

Page 24: 1 © Copyright 2000 Ethel Schuster The Web… in 15 minutes Ethel Schuster schuster@cs.uml.edu schuster Http:

24

© Copyright 2000 Ethel Schuster

PERL

• Widely used

• Highly portable

• Powerful string manipulation

Page 25: 1 © Copyright 2000 Ethel Schuster The Web… in 15 minutes Ethel Schuster schuster@cs.uml.edu schuster Http:

25

© Copyright 2000 Ethel Schuster

Summary

• Discussed

• Components of the web

• HTML commands to create web page

• Handle Dynamic information