Fall Semester 2002
Class Overview: Topics and Organization
- The Way We Were
A situation, an impasse, or the poetic of the absurd.
Welcome to A348.
- The Carpenter Kushakov
A slight variation on the same theme.
See Problems and Pain, below.
- Some Random Thoughts
We believe that whatever we learn we learn by doing.
This is a class about Open Source technologies for the WWW.
- Class Overview
This document with annotations.
- Lecture One: HTML, Apache, HTTP, Unix
A Unix account. Installing Apache.
What is Apache? What can it do?
What is HTML? What is HTTP? How does it all work?
- On solving problems
This is the inevitable
You are not allowed to miss it.
- Problems and Pain
Life poses an endless series of problems, life is always difficult and is
full of pain as well as joy. In more operational terms: something, somewhere,
will go wrong. But your errors will always have these two
fundamental characteristics: hard to find, easy to fix.
- Lab One: Becoming familiar with Unix
An exercise designed to make you understand how Apache was packed for distribution.
Writing a simple Perl program, and a simple Java program. (Apache is also a program).
- Lecture Two: Building the latest Apache server from scratch
Detailed description of the installation process.
Basic directory structure.
- Lecture Three: Unix processes and process id's. File permissions.
Introduction to Perl.
A brief introduction to the essential Perl used in this class.
Variables, expressions, lists and hashtables are covered with a bit of regular expressions.
- Lecture Four: Perl,
GET, more Perl
What is a CGI script? What can it do? Can it do as much as an HTML page?
Can it do more? How can we make the output of the script predictable? Feeding
user data into a CGI script.
- Lab Two: Simple CGI scripting
Turning a CGI script that produces always the same HTML page
into one that produces a random new HTML page with every invocation.
- Semester (Group) Projects
About 8 (eight) advanced projects are discussed in
these notes. You should choose any one of them and
understand it well, and implement it and post it on
your web site. Then at the end of the semester you
need to take an exam on the chosen project. Alternatively,
you can come up with a project of your own, combining your
interests with what you learn in this class.
- Homework One: A Home Page
Setting up the web server, creating an HTML page, including a scanned picture.
- Lecture Five: Circular Scripts (Part One)
The process of writing programs on the web being significantly different from
the traditional way of writing programs, this set of notes is trying to offer a
set of template steps, to get us started. This is the first in a series of two
- Lab Three: Password protected directories
All assignments being turned in on-line, we need to have a way to keep them private.
You will be shown how in this lab. Thus we can go in and check your assignments by typing
a password that only we know (and should know. You can also create your own users).
- Lecture Six: Circular Scripts (Part II)
We conclude the previous set of notes and come to the issue of
- Homework Two: A Lindley Portfolio and The Simple Calculator
You are to write two simple CGI scripts that interact with the user. In the first one
the simplest way to pass data from the user to the program is explored. The second program
makes uses of HTML forms and illustrates the fundamental
difference between HTTP methods GET and POST.
- Lecture Seven: Pattern matching in Perl. Building a CGI processor.
We investigate what it would take to build a general CGI processor. Once we do that
we can safely say we understand CGI, what it is and how it works.
- Lecture Eight: Introduction to Java
Most people taking this class already know some Java. This lecture
is a good test to see how much we know and what we intend to do with
Java in this class. A simple web server and a simple web browser are
developed and they will set a standard for the rest of the course.
- Appendix Eight 1: Java Networking
(Basic is essential in this class.)
- Appendix Eight 2: Java I/O
A prerequisite for Appendix Eight 1.
(Included here for the sake of completeness.)
- Appendix Eight 3: Java Threads
Required reading for all programmers.
- Lab Four: HTTP Experiments
In which we build our own
telnet and use it to speak HTTP with the server.
(Matching Netscape or IE with our server is another interesting experiment.)
- Lincoln Stein: Is CGI Dead?
Reflections on simplicity and portability from a leading authority.
- Lecture Nine: Object-oriented
We look at those object oriented features of Perl that will enable us
later to use important packages such as:
CGI.pm (for generic
CGI processing) and
DBI.pm (for database access).
- Lab Five: Using
Details on setting up a database for use in this class.
- A114 Notes: Introduction to Databases
Useful notes on principles of database design and on the structured query language (SQL).
- Lecture Ten: Maintaining State
An overview of the available techniques. Client-side vs. server-side.
- Lecture Eleven: Storing State Information in SQL Databases
A comprehensive description on using
DBI.pm with MySQL to implement a simple but interesting
game. Our treatment of CGI ends here but we used the opportunity to survey
most, in fact essentially all elements of core web programming.
- Lecture Twelve: Installing
What started originally as a CGI script is now a programming platform.
Installation and overview of PHP.
- Lab Six: CGI Session IDs
A closer look at the techniques used in Lecture Eleven to identify users.
(Also used as an opportunity to introduce the notion of sessions, as present in
PHP, servlets and JSP).
- Homework Assignment Three: PHP Scripts
Practicing PHP on the familiar problems of Lindley Portfolio and The Simple Calculator.
- Lectures Thirteen-Fourteen: Introduction to PHP (Part One and Two)
The basic elements of PHP: variables, functions, arrays, hashtables,
sessions. Basic conversion of a CGI script into a PHP script. Basic PHP
database access. Examples.
- Lecture Fifteen: More Examples
Tentatively we are getting ready for the Midterm Exam and we practice by
looking at some of the more CGI scripts we wrote and trying to determine how
we could write them in PHP.
- Lab Seven: Exam Problems
With hints, questions, and some solutions.
- Past Exams: Useful Review Material
Written exams need not be total surprizes.
Typically with a Midterm Exam a Practical Exam is associated, for good measure.
- Lecture Sixteen: A PHP Shopping Cart
A more involved project, using PHP.
- Lab Eight: State Machines in PHP
In which we clarify how much should be known if you don't make this
your semester project.
- Lecture Seventeen: Client-side scripting
(An introduction to this browser programming language, and the document object model).
- Homework Four: DHTML Scripts for The Lindley
Portfolio and The Simple Calculator
The goal of this assignment is to facilitate focusing on DHTML
in a familiar context.
A similar application as the one developed in PHP. A different interface, and a somewhat
- Appendix Seventeen 1: DHTML: Sketch of a simple example
- Lecture Nineteen: Web Programming Then and Now. The Apache Project.
Used to position server-side Java in the broader picture of web programming
technologies this set of notes is a perfect review of web programming history.
- Lab Nine: Help with Homework Four
Traditionally students are a bit tired of the constant change of scenery by now.
However, few lose their initial excitment, if any. In this lab we try to review the
newly introduced document object model to both simplify Homework Four and
ease the introduction of XML, shortly.
- Lecture Twenty: Server-side Java
By now any necessary review of Java should be finished.
We briefly review the class extension mechanism and focus
on overriding and dynamic method lookup
We show how applets and servlets behave
essentially in the same way, using the same basic paradigm.
- Lecture Twenty-One: Applets,
A brief account of the relationship between servlets and CGI scripts.
- Lab Ten: Java Applets. Installing Tomcat.
Using Java on the server side requires a special server. We install Tomcat.
- Homework Assignment Five: The Lindley Portfolio and The Simple
Calculator Using Java Servlets
See assignment below.
- Homework Assignment Six: The Lindley Portfolio and The Simple
Calculator Using JSP
In both assignment five and six we first focus on servlets, then we
automatically translate the servlets into JSP as shown in lecture notes twenty.
The goal of these two assignments is to review familiar concepts from CGI and PHP
scripting in the new context of Java server-side programming. The very specific features
of Java programming fully justify this conservative approach.
- Lecture Twenty-Two: Building A Web Chat Application in Java
Applet to servlet communication in real-time using HTTP.
- Lecture Twenty-Three: Four building blocks of your web chat application
Customizing your servlet entry point.
- Appendix Twenty-Two 1: The innards of the web chat application, step by step;
Step by step discussion of a somewhat involved software project.
Basic multiple-choice or fill in the answer items for your practice.
(I need to develop some more)
- Lab Eleven: Servlets and JSP for the last two homework assignments.
Review of the most important elements, including the automatic conversion servlet-JSP.
- Lecture Twenty-Four: Java RMI
A very elegant (but tightly coupled) way of doing networking in Java.
- Lecture Twenty-Five: XML: An eXtensible Markup Language
Between HTML and SGML, and having an own agenda.
Definition, namespaces (composition), schemas (validation), parsing and transforming XML.
- Lecture Twenty-Six: Content Syndication
The first steps towards B2B, interoperability, and a bit of XSLT.
- Lab Twelve: JDBC
Database access in Java. Review of the content syndication project.
- Lecture Twenty-Seven: Discussion Forum with Java, XSLT, and JDBC.
Definition and purpose (as well as benefits) of XSLT. A significantly involved project using
servlets, JDBC, XML and XSLT to implement discussion forums (or web newsgroups).
- Lecture Twenty-Eight: Web services with Apache Axis
What is Axis and why does it matter? What are web services?
- Lab Thirteen: Taking a deep breath.
We're almost finished. In this lab we will distribute the
- Appendix A: XML-RPC and True Interoperability
A simplified example of true interoperability. Compare this to RMI.
- Epilogue: A Young Man Who Astonished a Watchman
"The watchman sniffed the air. The air smelled of burned feathers."
Last updated: Dec 1, 2002 by Adrian German for A348/A548