- the Internet

client - server
services:
terminal | remotely control another computer |
ftp | get/send files |
talk, irc | immediate text transmission |
mail, news | message sent to private/public box |
WWW | [=> WWW] |
the WWW:
- HTTP protocol, browser = client
- developed at Swiss CERN
- first browser Mosaic
- HTML [SGML] = text with embedded control tags
- images, video, sound, ...
- very successful, for the masses
- send-back with forms
- ftp client
- many extensions [Netscape, Microsoft: "embrace and extend"]
-> still not general purpose
Java and its history:
- around 1990 James Gosling frustrated with C++-> Oak
- 04/1991 Sun's Green Project -> consumer electronics -> First Person Inc.
- early 1993 -> settop boxes (Time-Warner)
- had to be: embedded, secure, real-time, reliable, compact
- early 1994 -> flop, lost bid
- idea: Web -> WebRunner -> [HotJava]
- name Java -> brainstorming, island [Java]
- introduced 1995, mascot [=> Duke]
- MS: app -> OS -> CPU
- runs anywhere on anything
- dynamically extensible, open protocols
- free SDK for programmers
- commercial use of Java source must be paid for
- database access, content handlers client side
- user interaction, fast online games & chat
- Programming languages and styles

programming languages:
machine code | very fast, low memory consumption, the language of the machine |
Assembler | source compiled to ML, simpler because of labels, trivial names for mnemonics |
Interpreter | executed line by line, each command is translated into ML during execution |
Compiler | source is compiled into ML and then bound, most-used, statically bound API produces fatware |
Java | compiled into bytecode, very small, ML of a virtual machine, not bound, classes rely on std. API |
Interpreter languages can often also be compiled, most common example
is BASIC.
coding styles:
common terms and special features:
spaghetti code | procedural programming | object oriented programming |
memory is automatically allocated | program: collection of functions and methods that manipulate data | easily maintainable and reusable code |
| procedure: function not returning value | data & functions are grouped |
| data kept seperately from functions | can exclusively manipulate the data |
| changes may have side effects | methods: member functions |
| functions share data | instance vars: private variables
[getX] |
| | object: generic ADT & its methods |
| | encapsulation: access data only through methods [list] |
| | class: code reused to create objects |
| | instance: individual object [car] |
| | subclass: derived, spec., inherits [colRect] |
| | composite obj.: subsystems [4 seats] |
| | message: request receiver to perfrom a selected method
[Obj-C] |
| | polymorphism: [tv & lamp] |
| | abstraction, hierarchy |
| | imagine system as a collection of classes that knows how to perform tasks |
an example for each one (write sth. onto the screen):
spaghetti code | procedural programming | object oriented programming |
code | code for clear_Screen; | class screen { |
for | code for writeToScreen(argument); | method clear; |
clear screen; | | method write(argument); |
code | main program { | } |
for | call the clear_Screen function | |
write | call the writeToScreen function | main program { |
on screen; | ... | tell the screen to clear itself |
... | } | tell the screen to write text |
| | ... |
| | } |
- What is Java all about?

Sun: "
Java is a simple, object-oriented, distributed, interpreted,
robust, secure [=> C++], architectural neutral, portable,
high-performance, multithreaded, and dynamic language."
Fusion of four kinds of programming:
Object oriented | like Smalltalk |
Numeric | like FORTRAN |
Systems | like C |
Distributed | like nothing else |
Development tools:
Unicode, huge API [=> API]
free SDK contains javac, java, applet viewer, jdb, API docs and other tools
the Java API packages:
- java.lang: essential Java classes
- java.io: manage input and output streams
- java.util: miscellaneous utility classes
- java.net: network support
- java.awt: manage user interface components (AWT)
- java.awt.image: classes for managing image data
- java.awt.peer: platform-specific implementations
- java.applet: enables the creation of applets
- sun.tools.debug: debug interfaces and classes
Java in contrast to C++:
- no operator overloading
- no typedefs or structs
- no multiple inheritance (exception: interfaces)
- everything is specified, nothing platform dependant
- no memory release needed (garbage collection)
- no preprocessor
- no global variables
- no pointers
- portable without recompiling
- exception handling and security checks
Applets and applications:
the differences:
Applications | Applets |
stand-alone | Web browser needed |
main() like C++ | embedded into HTML |
local IO possible | no main() |
general-purpose | no local IO |
| security checks |
a small sample application:
1: /**
2: * this application writes silly text to the console
3: */
4: public class test {
5: public static void main(String argv[]) {
5: System.out.println("this is a test");
6: }
7: }
- Marketing

general issues:
- author = publisher [slides]
- [shareware, freeware, public domain, full version]
- collides with Internet philosophy: no free source, easy learning, new form of shareware
hardware platforms:
| before Java | with Java |
cost and effiency | less important [Risc-PC] |
most important |
available proprietary software | most important |
Java runs anywhere [settop boxes] |
the future:
- Microsoft's Active-X [Win, VB]
- encryption & security -> financial transactions
- Java-OS
- direct integration into major OSes
- public interest
- certification test suite
- API extensions
- development tools
- platform independant development
- chance for best authors to win [Linux]
- Java CPUs (pico, micro, Ultra) $25 - $100 [features]
- Java based electronic devices [which]
- Intranet
- [NC],
0 admin client the network is the computer]
- Sources of information

additional information:
- Discussion

some questions:
- Does anyone have additional questions?
- Do you think Java will cause a rapid change in today's computer industry?
- Could Java help to break MS' monopoly on the computer market?
- Do you think efforts to create bugfree software will succeed?
- Do OO's advantages justify its need for more computing power or should one still use Assembler instead?