181K1, Summer 1997

Programming and Interactivity on the WWW

Course Leader: Patrick Doherty, IDA




Latest News



Course Description

The primary goal of this course is to introduce you to the Java Programming language and its use in developing executable content on the WWW. The course is project oriented in the sense that we expect you to learn the language by implementing one of two relatively sophisticated applet/applications. We tried to choose two projects that force you to use most of the important features of the language and left the specification sufficiently vague in order to give you as much artistic and creative freedom as possible. The course also includes a series of seminars of an introductory nature which cover most of the Java language and its libraries. In addition, if we have time, we will also discuss recent trends, alternatives, and developments in the area. There is a problem as regards what version to teach, 1.02 or the new version 1.1. Applets implemented in version 1.1 are not yet runnable on standard browsers, so we will have to compromise somewhat. I plan on teaching version 1.02 and discussing new and important changes included in version 1.1. We can discuss what version you might want to use for your projects. The book arriving in July is updated completely for version 1.1. The Core Java book is updated, but not completely.



Course Schedule

During the first four weeks of the course, 10-12 hours of seminars will be given per week. The basic strategy is to provide you with a static crash course in the Java language via the seminars which will be given in a traditional manner and then to let you loose to experiment with the language, do the labs and browse on the WWW for Java related information.

Below is a brief schedule and outline of the topics we expect to cover. The schedule should be viewed as preliminary since we are not yet sure exactly how much time will be needed to cover each of the topics. We are also trying to set up a dedicated server so we can do experiments with relational database interfaces. If this is possibly, we will discuss it towards the end of the course.


Week 23

Thursday, 10-11, Estraden

Upprop. -- Course Registration and General Information


Week 24

Monday, 10-12, Belöningen

Getting started with Java: A Guided Tour. -- Course Introduction, Internet, WWW, Java, Applets/Applications, API.

Monday, 13-15, Estraden

Gstart cont'd, Object-Oriented Programming with Java (I). -- Abstraction and Encapsulation: Java classes and data, objects, constructors, Static classes, this, super.

Tuesday, 10-12, Estraden

OOP1 cont'd, Object-Oriented Programming with Java (II). -- Inheritance and Polymorphism: accessing variables and methods, overrriding, variable shadowing.

Tuesday, 13-15, Estraden

OOP2 cont'd, Object-Oriented Programming with Java (III) . -- Inheritance Revisited: Abstract classes, class modifiers, Interfaces, callback methods. Encapsulation Revisited: Packages, how the compiler works, data hiding, class and variable visibility, access modifiers, Inner classes.

Wednesday, 10-12, Estraden

OOP3 cont'd. -- Dynamic runtime facilities, run-time typing, run-time extensibility, Instanceof, casting, object wrappers, Class class, class loaders. New features in version 1.1

Wednesday, 13-15, Estraden

Java Statements and Utilities. -- Control statements, basic data types, arrays, vectors, enumerations, stacks.


Week 25

Monday, 10-12, Belöningen

The Abstract Window Toolkit (I). -- Introduction to the AWT package. GUI, Components, Containers, Panels, Event Handling, Layout Managers.

Monday, 13-15, Belöningen

The Abstract Window Toolkit (II). -- Graphics, Image handling, ImageObserver, MediaTracker, ...

Tuesday, 10-12, Belöningen

The Abstract Window Toolkit (III). -- New Event Handling model in version 1.1. Other additions.

Tuesday, 13-15, Belöningen

Exceptions and Error Handling.

Wednesday, 10-12, Belöningen

Threads. -- Creating threads, thread states, scheduling threads, Runnable Interface.

Wednesday, 13-15, Belöningen

Threads cont'd. -- Some applications and problems.

Week 26

Monday, 10-12, Belöningen

Applets.

Applets, Applet states, relation to browsers, JAR, restrictions,

Monday, 13-15, Belöningen

Network Programming -- Internet Protocols, TCP/IP, Sockets, Client/Server,

Tuesday, 10-12, Belöningen

Networking Con't, Security -- Java Security Model, Security Handlers, past, current and future problems.

Tuesday, 13-15, Belöningen

Security -- Java Security Model, Security Handlers, past, current and future problems.

Wednesday, 10-12, Belöningen

JDBC, RMI, Future Developments -- Java Database Connectivity API, 2- and 3-tiered approaches, middleware. RMI. Future Developments: Servlets, Castanet.

Wednesday, 13-15, Belöningen

No Seminar!! --



Course Labs

For labs 1 and 2, use JDK 1.0.2 and restrict yourselves to the standard Java API. For the project, you can use JDK 1.0.2 or JDK 1.1.2 in addition to any libraries developed by third parties.

July 4th is the hard deadline for handing in labs 1 and 2.

Hard copies of lab's 1 and 2 must be handed in to your assistant and the lab's must be demonstrated to the assistents.

You can work in groups of two maximum. Those that want to can work by themselves.

The course will consist of a series of 3 labs. For completion of the course you need only complete labs 1 and 2 and either lab 3 or 4. Since this is a five point course, you will be expected to put a great deal of effort into the final lab (3 or 4) you choose to do. You can consider the final lab an open-ended intermediate-sized project. You are expected to do as much as possible!

The first two labs are relatively well specified. The latter two are loosely specified and should be considered moderately sized projects. The goal is to do as much as possible, not the minimum necessary to pass the course!

Lab assistants will be physically present several hours each week during the scheduled lab periods to answer questions and help out. They may also be reached by email. Remember that you are expected to do a lot of reading in the course books in advance, so questions should be of a non-trivial nature! Hopefully we can answer them!

The Lab Environment

The locations for doing the labs are SU06-10, building E, bv. You will each receive your own account and have more or less unlimited access to a sparc machine during the course.

In order to get the proper path accesses to our WWW related software at IDA, you simply need to add a module to your .login file. Currently, there is a line in the file which looks like this:

module add default

For access to IDA's default browser and JDK 1.0.2, Modify it so it looks like this:

module add default misc/www

For access to JDK 1.1.2, Modify it so it looks like this:

module add default misc/www prog/jdk/1.1.2

For access to JDK 1.1.1 with the JIT compiler, Modify it so it looks like this: (Note that the JIT version may not be accessible until the end of week25)

module add default misc/www prog/jdk/jit-1.1.1

For access to Sun's HotJava Browser and JDK 1.1.2 add:

aste3% module add default misc/www prog/jdk/1.1.2 win/hotjava

Suppose you have set up your .login file to contain:

module add default misc/www prog/jdk/1.1.2

To revert back to JDK 1.0.2 from a shell window, type in (boldface characters):

aste3% module rm prog/jdk/1.1.2

To revert back to JDK 1.1.2 from a shell window, type in(boldface characters:

aste3% module add prog/jdk/1.1.2

The last two commands from a shell window do not change your .login file. For more info on our module system, type in:

aste3% module help



Many of the experiments we will be doing involve applets opening sockets and sending information back to the server on the machine from which they were loaded. For security reasons, many browsers make it difficult, if not impossible, to open certain paths of communication between applets, applications, browsers, etc. To simplify the experimentation, we have set up a simple script which starts your own www server on the workstation you are using. Click here for details!

Old Notes from 1996 which still apply in 1997



Lab Schedule

The course contains two lab groups, each run by one of the assistents.

You are free to use the sun sparc lab rooms S06-10, E-Hus mondays to fridays.

Lab Assistants

Group A : Jonas Kvanström -- Available thursday and friday 10-12, weeks 24-27.

Group B : John Olsson -- Available thursday and friday 13-15, weeks 24-27.

The assistents may also be reached by email.



Course Exam

In order to pass the course, successful completion of the (three) labs is necessary. There is a possibility that an oral exam regarding the contents of the first three labs may be necessary. This will be dependent on the quality and creativeness of these labs.

Deadline for labs 1 and 2: July 4th

Deadline for lab 3: August 4th

Grades of (G)odkänd and (V)äl(G)odkänd will be given which will be translated to 3 and 5, respectively. For VG, all deadlines must be met and the project must be especially good!



Course Slides

These slides are being updated for the Summer 1997 course

New Versions

Slides are currently being updated!

Course Books

You are expected to read the course books from front to back covers one or more times. These are arguably two of the better books out for the moment, although new books are being published every week!

Java in a Nutshell: A Desktop Reference for Java Programmers
David Flanagan
O'Reilly & Associates, Inc., 1997
2nd edition
ISBN ???
More Info!

An excellent desktop reference with a complete description of the Java API 1.1. It includes a number of compact but excellent introductory chapters on Java essentials. Part II contains the Java API description with excellent cross references and indexes for finding different methods, classes, who calls what, etc.

Core Java
Gary Cornell and Cay S. Horstmann
Sunsoft Press, A Prentice Hall Title, 1997
2nd edition
ISBN ???
More Info!

In my opinion, this is currently the best book for solid examples of intermediate level program code and describes a lot of the problems and solutions for those problems that arise when doing serious Java programming. The book assumes some familiarity with programming in general and is classified as a book for advanced programmers, although I'd place it at the intermediate level. In addition, it contains the SunSoft CD provided with all books in this series which includes the JDK for different platforms and a number of useful auxiliary applications.

This section needs to be updated!!!. It is not advisable to purchase any books not updated for version 1.1. Although not course books, I'd also highly recommend:

Just Java
Peter van der Linden
Sunsoft Press, A Prentice Hall Title, 1996
2nd Edition
ISBN 0-13-565839-X
More Info!

Java for C/C++ Programmers
Michael C. Daconta
John Wiley & Sons, Inc., 1996.
ISBN 0 471-15324-9



>Winners of the 1996 IDA JAVA CUP!!

During the summer course in 1996, we had a friendly competition to see who could construct the best game applets. All of them were very good, but here are the winners, chosen by an anonymous unprofessional panel of game-loving referees! Note that some of these links may have died since the summer of 96.

Winners of the 1996 IDA Java Cup!

These examples should give you an idea of the quality and depth we are looking for in the Lab3 projects you hand in. Unfortunately, we do not have any T-Shirts for this course!



Some Useful Links

JavaSoft: The Java Division of Sun Microsystems
Gamelan: An excellent Applet Archive.
Digital Expresso: Summaries of the Java Newsgroups.
Java World: An online Java Magazine.
The Java Applet Rating Service.
A Java Page provided by our Lysator friends.
The New AWT Tutorial be Nelson Wu.
The JavaSoft Tutorial (Stored locally on our IDA server).
The Java API 1.0 (Stored locally on our IDA server).
Core Java Book Source Code



Registered Student Lists



Faculty

Patrick Doherty (Course Leader)
Department of Computer and Information Science
University of Linköping
S-581 83 Linköping, SWEDEN
Phone: +46 13 28 24 26
Telefax: +46 13 28 44 99 06
Room: FOA A1.291

email: patdo@ida.liu.se


Lise-Lotte Svensson (Course Administrator)
Department of Computer and Information Science
University of Linköping
S-581 83 Linköping, SWEDEN
Phone: +46 13 28 23 60
Telefax:
Room: E Bv G 474

email: lissv@ida.liu.se


Jonas Kvarnström (Course Assistant)
Department of Computer and Information Science
University of Linköping
S-581 83 Linköping, SWEDEN
Phone: +46 13 28 23 05
Telefax: +46 13 28 44 99
Room: FOA A1.285

email: jonkv@ida.liu.se


John Olsson (Course Assistant)
Department of Computer and Information Science
University of Linköping
S-581 83 Linköping, SWEDEN
Phone:
Telefax:
Room:

email: johol@ida.liu.se