Web Technologies — Part II

Web-Based Services (INFOSYS 290-3)

Erik Wilde, UC Berkeley iSchool
Monday, September 11, 2006
Creative Commons License

This work is licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike 2.5 License.

Abstract

The Hypertext Markup Language (HTML) and its ability to present forms has driven the first wave of Web-based services, which mostly provided Web forms for submitting data to some process being driven by such a Web-based front-end. The Extensible Markup Language (XML) then introduced the ability to represent application-defined data structures. XML is the most important foundation of almost all technologies in the Web and Web Service technology areas.

Services need Interfaces

Outline (Hypertext Markup Language (HTML))

  1. Hypertext Markup Language (HTML) [21]
    1. HTML Basics [2]
    2. HTML Forms [18]
  2. Extensible Markup Language (XML) [5]
    1. Pre-XML Problems [2]
    2. XML on the Web [2]
  3. Conclusions [2]

The Web's Document Format

Outline (HTML Basics)

  1. Hypertext Markup Language (HTML) [21]
    1. HTML Basics [2]
    2. HTML Forms [18]
  2. Extensible Markup Language (XML) [5]
    1. Pre-XML Problems [2]
    2. XML on the Web [2]
  3. Conclusions [2]

Document Layout

Hypermedia Features

Outline (HTML Forms)

  1. Hypertext Markup Language (HTML) [21]
    1. HTML Basics [2]
    2. HTML Forms [18]
  2. Extensible Markup Language (XML) [5]
    1. Pre-XML Problems [2]
    2. XML on the Web [2]
  3. Conclusions [2]

HTTP Web Services

Forms Mechanics

Forms Markup

Forms Elements (User View)


Text:
Password:
Checkbox:
Radio Button:
Submit:
File Upload:
Text Areas:
Selection:
Multiple Selection:

Forms Elements (Source View)

<form action="http://stevex.net/dump.php" method="POST" enctype="multipart/form-data"><table>

 <tr><td>Text:</td><td><input type="text" name="text" value="text input"/></td></tr>

 <tr><td>Password:</td><td><input type="password" name="password" value="hidden text"/></td></tr>

 <tr><td>Checkbox:</td><td><input type="checkbox" name="check" value="1"/> <input type="checkbox" name="check" value="2"/> <input type="checkbox" name="check" value="3"/></td></tr>

 <tr><td>Radio Button:</td><td><input type="radio" name="radio" value="1"/> <input type="radio" name="radio" value="2"/> <input type="radio" name="radio" value="3"/></td></tr>

 <tr><td>Submit:</td><td><input name="submit" type="submit"/></td></tr>

 <tr><td>File Upload:</td><td><input name="file" type="file"/></td></tr>

 <tr><td>Text Areas:</td><td><textarea name="textarea" rows="2" cols="20"/></td></tr>

 <tr><td>Selection:</td><td><select name="select"><option selected="selected">XML</option><option>SGML</option></select></td></tr>

 <tr><td>Multiple Selection:</td><td><select name="mselect" multiple="multiple"><option>242</option><option>290-3</option><option>290-13</option></select>

</table></form>

Forms and GET

HTTP POST

Forms and POST

Processing of Form Data

Query Parameter Test:
<?php
import_request_variables("gP", "form_");
echo $form_test;
?> 

Structuring Forms

Labels

<tr><td>Text:</td><td><input type="text" name="text"/></td></tr>
<tr><td>Password:</td><td><input type="password" name="password"/></td></tr>
<tr>
 <td><label for="textctrl">Text:</label></td>
 <td><input type="text" name="text" id="textctrl"/></td>
</tr>
<tr>
 <td><label for="pwdctrl">Password:</label></td>
 <td><input type="password" name="password" id="pwdctrl"/></td>
</tr>

Fieldsets

<fieldset><legend>Billing</legend>billing form controls…</fieldset>
<fieldset><legend>Shipping</legend> shipping form controls … </fieldset>
Billingbilling form controls …
Shippingshipping form controls …

Tabbing in Forms

Disabled and Readonly Controls

Disabled and Readonly Controls Display

Normal Control Disabled Control Readonly Control
Text:
Password:
Checkbox: !
Radio Button: !
File Upload: !
Text Areas:
Selection:[ not supported ]
Multiple Selection:

HTML Forms and XForms

XForms Model

Server-Side XForms

Outline (Extensible Markup Language (XML))

  1. Hypertext Markup Language (HTML) [21]
    1. HTML Basics [2]
    2. HTML Forms [18]
  2. Extensible Markup Language (XML) [5]
    1. Pre-XML Problems [2]
    2. XML on the Web [2]
  3. Conclusions [2]

Interactions on the Web

Outline (Pre-XML Problems)

  1. Hypertext Markup Language (HTML) [21]
    1. HTML Basics [2]
    2. HTML Forms [18]
  2. Extensible Markup Language (XML) [5]
    1. Pre-XML Problems [2]
    2. XML on the Web [2]
  3. Conclusions [2]

HTML is for Humans

A Machine-Friendly Web

Outline (XML on the Web)

  1. Hypertext Markup Language (HTML) [21]
    1. HTML Basics [2]
    2. HTML Forms [18]
  2. Extensible Markup Language (XML) [5]
    1. Pre-XML Problems [2]
    2. XML on the Web [2]
  3. Conclusions [2]

XML Documents on the Web

SGML/HTML/XML/XHTML

Outline (Conclusions)

  1. Hypertext Markup Language (HTML) [21]
    1. HTML Basics [2]
    2. HTML Forms [18]
  2. Extensible Markup Language (XML) [5]
    1. Pre-XML Problems [2]
    2. XML on the Web [2]
  3. Conclusions [2]

HTML Form Interfaces

Form Design