Website Models  «Prev  Next»

Lesson 1

Web Interaction Model

Any communication can be separated into the message (the content of the communication) and the medium (plural of media, including such items as a newspaper, a compact disc, word of mouth, or a Web site). In the previous module, you were introduced to the message elements of a Web site, the first three layers of the Web Interaction Model:
  1. Signs and Metaphors, where the user interprets the message of a Web site;
  2. Information Architecture, the architecture that structures the navigation through the message; and
  3. Software, applications that enable the design and support the storage of files necessary to the site.

This module discusses the Web Interaction Model as a framework for understanding the two remaining layers of the model: Networks and the Internet, and Hardware. These layers are the media over which the message is sent and the physical components required to send and store the message and associated data.
You will also learn about some of the protocols by which networks communicate, as well as how businesses are using the Internet to leverage the power of Web-based applications.

Module Objectives

By the end of this module, you will be able to:
  1. Explain the setup and purpose of the Internet, intranet, and extranet.
  2. Explain TCP, IP, HTTP, and FTP protocols
  3. Explain how Web resources are transmitted across the Internet
  4. Describe components of the hardware layer
  5. Use the Web Interaction Model to explain how resources are requested and received via the Web
  6. Explain how the Web-based business applications are supported by the Web Interaction Model
In the next lesson, you will learn the distinctions between the Internet, intranets, and extranets.

A Web interaction starts with a client program establishing a network connection to some server. At the low level this is done via sockets with the TCP/IP protocol. Perl does support socket programming directly (see below), and the module Net contains functions to allow a program to follow TCP/IP (as well as many others Internet protocols, such as FTP, DNS, and SMTP). On top of sockets and TCP/IP for basic data transfer, the HTTP protocol dictates the structure and content of messages exchanged between client and server. Rather than deal with all these technologies individually, the LWP::UserAgent module allows the programmer to manage all client-side activities through a single interface. A simple client script would look like this:

Perl LWP::UserAgent module

use LWP::UserAgent; # imports other
modules too
$client = new LWP::UserAgent();
$acmeReps = new URI::URL('
$outHead =
new HTTP::Headers(User-Agent=>'MyBot
v2.0', Accept=>'text/html');
$outMsg = new HTTP::Request(GET, $acmeReps,
$inMSg = $client->request($outMsg);
$inMsg->is_success ? {print $inMsg->
content;} : {print $inMsg->message;}

The network connections and message formatting to HTTP protocol requirements is handled transparently by the LWP functions. Here, the client causes a request like this to be sent to the Web server at
GET/reports/index.html HTTP/1.0
User-Agent: MyBot v2.0
Accept: text/html
If the requested file is not there, the response from the server will be an error message. If it is there, the response will contain the HTML file for the bot to process in some fashion.
Web Network Data Science