SDSU Emerging Technologies
Fall Semester, 2005
Web App Intro
Previous     Lecture Notes Index     Next     
© 2005 All Rights Reserved, SDSU & Roger Whitney
San Diego State University -- This page last updated 15 Sep 2005

Doc 5 Web App Intro


Reading Assignment    

About Web Applications    

Basic HTTP (Web)    

HTTP is Stateless    

CGI, Server Pages & Servlets    

Multipage Transactions    

Hidden Fields    



Copyright ©, All rights reserved. 2005 SDSU & Roger Whitney, 5500 Campanile Drive, San Diego, CA 92182-7700 USA. OpenContent ( ) license defines the copyright on this document.




Past CS683 lecture notes


Reading Assignment




Sept 20

2, 3, 4

Sept 22

5, 6, 7

Sept 27

8, 9, 10

Sept 29

11, 12, 13

Oct 3

14, 15, 16

Oct 6

17, 18, 19

The chapter numbers above refer to chapters in the book Web Component Development with Zope 3, von Weitershausen, Springer-Verlag, 2005



About Web Applications






Persistent storage of data

Files, Relational database, Object database




Data - Datastore

Find all data relevant to a request

Convert data from/to Datastore format to usable form

Handle concurrency

Transactions - rollback of a transaction


Business logic

Handle users request

Validate data

Handle concurrent requests

Handle transactions



Make users request accessible to program

Convert response in to html, CSS, Javascript etc



Intermediary between client and Web app




Basic HTTP (Web)

HTTP is Stateless


Web browser connects to Web server with request

Web Server handles request

Web Server connects (starts) to program (cgi, etc)

Program gets request

Program frequently connects to database

Program handles requests

Program returns response

Web Server returns response

All connections closed



All requests from Web Browser repeat this process




CGI, Server Pages & Servlets


Common ways to dynamically generate web pages

CGI & Servlets

Web request is passed to a program

VeryBasicServlet>>doGet: aRequest response: aResponse


    aResponse write: '<HTML><BODY>

            Hello world</BODY></HTML>'.


Server Pages

Code is embedded in html pages


        " ">

<html xmlns=" " xml:lang="en">


    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />




<% response write: 'Hello World'. %>






Multipage Transactions


Information (state) from one page must be saved for next page


Information can be stored in


  1. Hidden Fields

  1. Sessions

  1. Database




Hidden Fields


Data is stored by client

Server can forget about client


<form action="fooBar" method="post" name="Sample">

    <input type="hidden"  name="name" value="Whitney">

    <input type="hidden" name="cart" value="world peace">

    <input type="text" name="Credit Card Number" size="40">

    <input type="submit" name="submit">



<a href="bar/foo/index.html" title="Help information">Help</a>






Must insure all paths retain data

Pages are coupled

Code depends on order of pages

Reduces code reuse

Name clashes

Field names must be different all other pages in transaction

Security Issues

Server can not track user

Presentation & domain logic mixed


<form action="fooBar" method="post" name="Sample">

    <% response

                write: 'input type="hidden"  name="name" value="'.

            userName ifNotNil: [ response write: userName printString].


                write: '">';

                write: '<input type="hidden" name="cart" value="';


                do: [:each | response write: each printString]

                separatedBy: [response write: ', '].


                write: '">'.




Previous     visitors since 15 Sep 2005     Next