Interactive Internet Technology
Introduction to Web Protocols
Michael L. Curry
1999
Web Protocols
Historically, the web was defined by five related standards
URL: the location of a document
HTTP: protocol for distributing information
HTML: simple document rendering language
CGI: standardized interface between a web document, a server and a program
SQL: Standardized Database Query Language
Summary of Protocols
Outline
Web Protocols
URL
HTTP
HTML
CGI
SQL
Conclusion
URL
A valid URL consists of a protocol, an address, and optionally, a port number (default is port 80).
http://www.my_company.com
ftp://ftp.my_company.com:8080
mailto:mcurry@continue.edu
URL
A browser is directed to a URL by code behind a hypertext link.
<a href="http://www.tek.com">
Check out the Tektronix home page
</a>
Outline
Web Protocols
URL
HTTP
HTML
CGI
SQL
Conclusion
HTTP
Hypertext transfer protocol is used to transport objects over the web
Goals of the HTTP protocol:
A distributed information system
A unified interface to multiple protocols
Includes hypermedia support
Extensible to support all data formats
An HTTP transaction consists of 4 parts:
An HTTP transaction consists of 4 parts:
An HTTP transaction consists of 4 parts:
An HTTP transaction consists of 4 parts:
HTTP
Key attributes of HTTP:
Simple
Flexible
Stateless
Connectionless
Based on client-server model
supports meta-information
HTTP
HTTP is simple
The only info a client needs to send is the request method and the URL
Only 3 request methods are fully implemented (GET, POST & HEAD) making the server code easy to implement
HTTP
HTTP is flexible with content-typing
As new data types are defined (example: MPEG3 streamed video) they are added into the protocol
HTTP is a stateless protocol
Server has no memory of previous requests
Strength: server can run faster
Weakness: More information must be sent with each transaction to encode state information outside the protocol
HTTP is a connectionless protocol
A client connects, makes a request, gets a result, and the transaction ends.
No document verification performed
The server never waits for a client
As a result, HTTP is very fast (compared to other client-server models)
HTTP is based on the client-server model
Client handles the interface and has freedom to display the information as best it can.
Browser client has become ubiquitous
Server responds to the client with a stream of text information
HTTP uses Meta-information
To indicate file-type, size, language, etc
HTTP (conclusion)
HTTP was designed to be a light and fast protocol for collaborative hypermedia IS.
Because it is simple, stateless & connectionless, it is fast!
The protocol is only partially implemented by web servers and browsers
Outline
Web Protocols
URL
HTTP
HTML
CGI
SQL
Conclusion
HTML
from C|net Builder.com
Instructions that surround material such as text, images, and links and tell the viewer's Web browser how to display them
Example of a simple page:
<HTML><BODY><H1>My Simple Page </H1></BODY></HTML>
HTML Grows
HTML is a constantly changing language, and older browsers often don't support the new tags
Synchronized Multimedia Integration Language (SMIL) is an emerging standard that may supercede HTML
HTML: Interpreted by the Browser
When a browser sees an HTML tag it doesn't understand, it tends to ignore both the tag and the material the tag affects
Test your pages on several browsers (on both PC and Mac platforms, if possible), because not every browser handles HTML in exactly the same way
HTML (Conclusion)
HTML is a text code that describes how to display web content
It is separated from the web content by "tags’
For more information, visit http://builder.com
Outline
Web Protocols
URL
HTTP
HTML
CGI
SQL
Conclusion
Common Gateway Interface
If you want your site to do something dynamic or interactive, like handling information in an HTML form, you have to run a separate program outside your Web server
CGI is the interface between these applications and the Web server
CGI (cont’d)
CGI programs can do just about anything: handle incoming forms, grab records from a database, save data to a file, and so on
Perl is a popular choice, but Java or C/C++ and other languages can also be used
CGI (Conclusion)
Formerly CGI programs were individually written by hand, now many common tasks have been cataloged in libraries so that anyone can add a CGI to their web site
CGI is being superceded by better server interfaces like Microsoft's Active Server Pages and Sun’s Scriplets
Outline
Web Protocols
URL
HTTP
HTML
CGI
SQL
Conclusion
Standard Query Language
SQL allows access to data in relational database management systems, by allowing users to describe the data they wish to see, and manipulate the data.
SQL is a standardized database interface, making it possible to connect nearly any database to the Web
SQL Example
List of everyone making $50K(+):
SELECT EMPLOY_NAME
FROM EMPLOYEE_PAY_TABLE
WHERE SALARY >= 50000;Insert a new record in an existing table
INSERT INTO ANTIQUES(BUYERID, SELLERID, ITEM)
VALUES (01, 21, 'Ottoman');
Summary of Protocols
Conclusion
The universal acceptance of these five protocols have played a role in the rapid growth of the Web
The protocols are changing, and new ones are being added
But the basic Web model is still the same