Arbitrary Definition of TCP/IP

Basic Web Protocol Suite

  1. Scheme:
    identify particular sources of information that server hosts
  2. The way browser present information
    the content itself contains the formatting information(raw information)
    HTML(Hypertext Markup Language) enables information creators to describe the format of the information to be rendered at browser side
  3. How to interpret the text stream ?
    server is responsible to look at the file name extension and map it to something called MIME(Multipurpose Internet Mail Extensions)
  4. How should a browser ask a server to deliver some information ?
    HTTP request browser tell the server more in addition to the file name
    HTTP response server tell the browser something like content type and when the file was last modified
  5. CGI(common gateway interface)
    allow a browser (user at browser side) to invoke some procedure at the server side, passing data to the procedure and getting processed result back, not just asking for pre-stored information

Productivity and Quality-oriented Technologies

Java

  • Java language
  • Java frameworks
  • Java Virtual Machine
    Best for dynamic web pages

JavaScript

a language as it's core

Best for interactive but plain webpages

public class HelloWorld {
    public static void main(String []args) {
        System.out.println("Hello World");
    }
}
function compute(form) {
    form.result.value=eval(form.expr.value)
}

Distributed Object Technology

contenttype
serverHTML CGI servlets
browserplugins ActiveX
flowApplet ActiveX JavaScript

Three most important distributed object technologies

  • CORBA
    central idea: BUS
  • ActiveX/DCOM
    based on COM technology
    DCOM is best suited in Windows environment
  • JavaBean
    light weight component technology based on Java
    for effective creation of GUIs for controlling various activities
    more straightforward

Web Browsers and Wed Servers


Basic Web Protocol

Cascading Style Sheets

  • to make the writing of HTML pages more efficient
  • separate the content of a document from the presentation of a document

CGI

Common Gateway Interface
  • process input from HTML forms
  • to invoke a program to run on the server side

CGI Script

  • either a compiled program or a script residing on a web server which runs on demand
  • be able to collect the data, analyze the data, generate a webpage

Purpose of the CGI scripts

  • access information from a non-web sources such as databases
  • allow interaction between server and user
  • construct customized documents dynamically at the time they requested

Forms

special element of HTML document

<FORM attributes>input fields</FORM>
#!/usr/bin/env perl
print "Hello world!\n";
#! /usr/bin/perl
print "Content-type:text/html\n\n";
print "<html><head><title>Hello, World !</title></head>";
print "<body><h2>Hello, World !</h2></body></html>";
  • .pl suffix shows that it is a perl script
  • CGI script must have proper access control set, in order for the server to execute it