1
|
- Week 3
- LBSC 690
- Information Technology
|
2
|
- Questions
- Finishing networks
- Building the Web
- Building a better Web
|
3
|
|
4
|
- Used to move files between machines
- Upload (put) moves from client to server
- Download (get) moves files from server to client
- Available using GUI and command line interfaces
- Normally requires an account on the server
- But userid “anonymous” provides public access
- Web browsers incorporate anonymous FTP (ftp://)
- May automatically convert end-of-line conventions
|
5
|
|
6
|
|
7
|
- HTML
- How to write and interpret the information
- URL
- HTTP
|
8
|
- Send request
- GET /path/file.html HTTP/1.0
- From: someuser@jmarshall.com
- User-Agent: HTTPTool/1.0
- Server response
- HTTP/1.0 200 OK
- Date: Fri, 31 Dec 1999 23:59:59 GMT
- Content-Type: text/html
- Content-Length: 1354
- <html><body> <h1>Happy New Millennium!</h1>
… </body> </html>
|
9
|
- Uniquely identify Web pages
- Domain name
- Directory path
- File name
|
10
|
- Simple document structure language for Web
- Advantages
- Adapts easily to different display capabilities
- Widely available display software (browsers)
- Disadvantages
- Does not directly control layout
|
11
|
- Different devices have different capabilities
- Rendering maps logical tags to physical layout
- Controls line wrap, size, font…
- Place the title in the page border
- Render <h1> as 24pt Times
- Render <strong> as bold
- Somewhat browser-dependent
- Internet Explorer and Netscape make different choices
|
12
|
|
13
|
- Edit files on your local machine
- Upload when you’re happy with it
- Connect to “wam.umd.edu”
- Change directory to “/pub/USERID”
- View it at http://wam.umd.edu/~USERID
- Refresh browser to see revised content
|
14
|
- Use Internet Explorer to find a page you like
- http://www.glue.umd.edu/~oard
- On the “Page” menu select “View Source” (in =
IE7)
- Opens a notepad window with the source
- Compare HTML source with the Web page
- Observe how each effe=
ct is
achieved
|
15
|
- Modify the HTML source using notepad
- For example, change the page to yours
- Save the HTML source on your “M:” drive
- In the “File” menu, select “Save As”
- Select “All Files” and name it “test.html”<=
/li>
- FTP it to your ~/pub directory on WAM
- sftp wam.umd.edu
- cd ../pub/
- put test.html
- View it
- http://www.wam.umd.edu/~(yourlogin)/test.html
|
16
|
- “Tags” mark structure
- <html>a document</html>
- <ol>an ordered list</ol>
- <i>something in italics</i>
- Tag name in angle brackets <>
- Open/Close pairs
- Close tag is sometimes optional (if unambiguous)
|
17
|
- Head
- Body
- Headers: <h1> <h2> <h3> <h4> <h5>
- Lists: <ol>, <ul> (can be nested)
- Paragraphs:<p>
- Definitions: <dt><dd>
- Tables: <table> <tr> <td> </td> </tr>
</table>
- Role: <cite>, <address>, <strong>, …
|
18
|
- Font
- Typeface: <font face=3D“Arial”></font>
- Size: <font size=3D“+1”></font>
- Color: <font color=3D“990000”></font>
- http://webmonkey.wired.com/webmonkey/reference/color_codes/Emphasi=
s
- Bold: <b></b>
- Italics: <i></i>
|
19
|
|
20
|
- Internal anchors: somewhere on the same page
- <a href=3D“#students”> Students</a>
- Links to: <a name=3D“students”>Student
Information</a>
- External anchors: to another page
- <a href=3D“http://www.clis.umd.edu”>CLIS</a>=
;
- <a href=3D“http://www.clis.umd.edu#students”>CLIS
students</a>
- URL may be complete, or relative to current page
- <a href=3D“video/week2.rm”>2</a>
- File name part of URL is case sensitive (on Unix servers)
- Protocol and domain name are not case sensitive
|
21
|
- <img src=3D“URL”> or <img src=3D“path/fil=
e”>
- <img src=3D“http://www.clis.umd.edu/IMAGES/head.gif”=
>
- SRC: can be url or path/file
- ALT: a text string
- ALIGN: position of the image
- WIDTH and HEIGHT: size of the image
- Can use as anchor:
- <a href=3DURL>&=
lt;img
src=3DURL2></a>
- Example:
- http://www.umiacs.umd.edu/~daqingd/Image-Alignment.html
|
22
|
|
23
|
- <table align=3D“center”>
- <caption align=3D“right”>The caption</caption&g=
t;
- < tr align=3D“LEFT”>
- <th> Header1 </th>
- <th> Header2</th>
- </tr>
- <tr><td>first row, first item </td>
-  =
;
<td>first row, second item</td></tr>
- < tr><td>second row, first item</td>
-  =
;
<td>second row, second item</td></tr>
- </table>
- See also: http://www.umiacs.umd.edu/~daqingd/Simple-Table.html
|
24
|
- Divide browser pages into separate sections
- Useful when you want to scroll separately
- Each section can display an HTML page
- Example 1: menu frame on the left side of a page
- <frameset cols=3D“10%,90%" >
- <frame src=3D“template.html">
- <frame src=3D“images.html">
- </frameset>
- Example 2:
- http://www.hq.nasa.gov/alsj/frame.html
|
25
|
- Specify appearance, based on structure
- Style rules “cascade” from broad to narrow:
- Browser’s default behavior
- External style sheet
- Internal style sheet
- Inline style
|
26
|
- Inline style:
- Causes only the tag to have desired properties
- Internal stylesheet:
- Causes all tags to have the desired properties
|
27
|
- Define a custom style for standard HTML tag
|
28
|
- Store formatting metadata in a separate file
|
29
|
- Basic syntax:
- Example:
- Causes
- Font to be center-aligned
- Font to be Arial and black
|
30
|
- Key design issues:
- Content: What do you want to publish?
- Style: How do you want to present it?
- Syntax: How can you achieve that presentation?
- Sources of information
- Online tutorials (there are lots of these)
- Technical materials (e.g., the W3C HTML spec)
|
31
|
- Design for generic browsers
- And test on every version you wish to support
- Provide appropriate “access points”
- User needs and navigation strategies differ
- Design useful navigational aids
- A Web search may lead to the middle of a site
- Include some indication of currency
- Date of last update, “new” icons, etc.
- Indicate who is responsible for the content
- Helps readers assess authority
|
32
|
- Design for device independence
- Maintain compatibility with earlier browsers
- Provide alternative pages if necessary
- Provide alternatives to aural and visual content
- Alt tags for images, transcripts for audio
- Make is easy for assistive devices to work
- Use structural (rather than layout-oriented) markup
- Give a title to each frame
- Only use HTML tables for table data (not content layout)
- Use markup to indicate language switching
|
33
|
- A text equivalent for every non-text element shall be provided.
- Equivalent alternatives for any multimedia presentation shall be
synchronized with the presentation.
- Web pages shall be designed so that all information conveyed with co=
lor
is also available without color.
- Documents shall be organized so they are readable without requiring =
an
associated style sheet.
- Redundant text links shall be provided for each active region of a
server-side image map.
- Client-side image maps shall be provided instead of server-side image
maps except where the regions cannot be defined with an available
geometric shape.
- Row and column headers shall be identified for data tables.
- Markup shall be used to associate data cells and header cells for da=
ta
tables that have two or more logical levels of row or column headers=
.
- Frames shall be titled with text that facilitates frame identificati=
on
and navigation.
- Pages shall be designed to avoid causing the screen to flicker with a
frequency >2 Hz and <55 Hz.
- A text-only page, with equivalent information or functionality, shal=
l be
provided when compliance cannot be accomplished in any other way. The
content shall be updated when the primary page changes
- When pages use scripting languages to display content or to create
interface elements, the information provided by the script shall be
identified with functional text that can be read by assistive
technology.
- When a web page requires that an applet, plug-in or other applicatio=
n be
present on the client system to interpret page content, the page must
provide a link to a plug-in or applet that complies with the above.<=
/li>
- When electronic forms are designed to be completed on-line, the form
shall allow people using assistive technology to access the informat=
ion,
field elements, and functionality required.
- A method shall be provided that permits users to skip repetitive
navigation links.
- When a timed response is required, the user shall be alerted and giv=
en
sufficient time to indicate more time is required.
|
34
|
- Goal is to create Web pages, not learn HTML!
- Several are available
- Macromedia Dreamweaver available commercially
- Microsoft Word (Page->Edit with Word in IE 7
- Many more options available on www.tucows.com
- Tend to use physical layout tags extensively
- Detailed control can make hand-editing difficult
- You may still need to edit the HTML file
- Some editors use browser-specific features
- Some HTML features may be unavailable
- File names may be butchered when you upload
|
35
|
- Syntax checking: cross-browser compatibility
- http://validator.w3.org
- Try it on http://www.umd.edu L
- Style checking: Section 508 complianc=
e
- http://www.cynthiasays.com/
- Try it on http://www.umd.edu L
|
36
|
- HTML
- Confounds structure and appearance (XML)
- HTTP
- Can’t recognize related transactions (Cookies)
- URL
- Links breaks when you move a file (PURL)
|
37
|
- Content
- Structure
- Appearance
- Behavior
|
38
|
- Early standards were “typesetting languages”
- HTML was developed for the Web
- Too specialized for other uses
- Specialized standards met other needs
- Change tracking in Word, annotating manuscripts, …
- XML seeks to unify these threads
- One standard format for printing, viewing, processing
|
39
|
- SGML was too complex
- HTML was too simple
- Goals for XML
- Easily adapted to specific tasks
- Rendering Web pages
- Encoding metadata
- “Semantic Web”
- Easily created
- Easily processed
- Easily read
- Concise
|
40
|
- Definition: DTD
- Names known types of entities with “labels”
- Defines part-whole and is-a relationships
- Markup: XML
- “Tags” regions of text with labels
- Markup: XLink
- Defines “hypertext” (and other) link relationships
- Presentation: XSL
- Specifies how each type of entity should be “rendered”<=
/li>
|
41
|
|
42
|
- View “The Song of the Wandering Aengus”
- http://www.umiacs.umd.edu/~oard/teaching/690/spring08/notes/3/xml.h=
tm
- Built from three files
- yeats01.xml
- poem01.dtd
- poem01.xsl
|
43
|
|
44
|
|
45
|
|
46
|
|
47
|
- XML is case sensitive
- XML declaration is the first statement
- An XML document is a “tree”
- Must contain one root element
- Other elements must be properly nested
- All start tags must have end tags
- Attribute values must have quotation marks
- Certain characters are “reserved”
- For example: < is used to represent <
|
48
|
|
49
|
- XML format for distributing news headlines
|
50
|
- Text Encoding Initiative
- For adding annotation to historical manuscripts
- http://www.tei-c.org/
- Encoded Archival Description
- To enhance automated processing of finding aids
- http://www.loc.gov/ead/
- Metadata Encoding and Transmission Standard
- Bundles descriptive and administrative metadata
- http://www.loc.gov/standards/mets/
|
51
|
- CML – Chemical Markup Language
- CellML – biological models
- BSML – bioinformatic sequences
- MAGE-ML – MicroArray Gene Expression
- XSTAR – for archaeological research
- MARCXML – MARC in XML
- AML – astronomy markup language
- SportsML – for sharing sports data
|
52
|
- HTML
- Confounds structure and appearance (XML)
- HTTP
- Can’t recognize related transactions (Cookies)
- URL
- Links breaks when you move a file (URN)
|
53
|
- Servers know users by IP address and port
- Because that’s where they send the Web pages
- Cookies preserve “state”
- Server sends data to the browser
- Browser later responds with the same data
- A unique code (server-side state)
- Information about the user (client-side state)
- Take a look:
- Tools->Internet Options->Browsing history->Settings
|
54
|
|
55
|
- Learning to build simple Web pages is easy
- Which is good news for the homework!
- All documents are structured documents
- But some expose the structure better than others
- XML is a flexible markup language
- Complete separation of structure and appearance
|
56
|
- On a sheet of paper (no names), answer the following question:
- What was the muddiest point in today’s class?
|