Java Module Descriptions

Java Modules Descriptions

Modules PRI through FUN form a basic introduction to object-oriented technology using the Java language, sufficient for acquiring object-oriented concepts, and seeing how they are expressed in Java. It assumes a procedural programming background, and no experience with objects.

Modules OVR through JVM provide production programming skills, sufficient for writing effective software in Java. This sequence makes a reasonable Intermediate Java course for people with an O-O programming background.

PRI: Java Primitives

This module serves as an entry point for programmers with procedural programming experience in C or other languages. Along with the next seven modules it makes an effective introduction to object-oriented programming using Java course.

If the audience is all C programmers, then this module and the next one (PRO) can be condensed into one half-day, as most of the primitive syntax is based on C.

We start with some background material to set the stage for Java's entry into the computing world. We'll look at where it came from, what are the key features that have made it so popular and successful, how it fits into the world wide web and internet worlds, downloading it, and its current status. Then we'll begin in-depth coverage of the language primitives.

  • Java Background and History
  • Setting up Java development environment
    • Downloading and Installing Java
    • Current version and status
  • Where Java fits into the WWW and computing
    • Compilation to Bytecodes; Interpreting
    • Applications vs. Applets
    • Dynamic Loading
  • Hello, World
  • Java Language Primitives
    • Keywords
    • Primitive Types
    • Operators and Expressions
    • Statements
  • Examples
PRO: Procedural Programming

This module continues with the language basics. Here we cover output, arrays, methods, parameter passing, scope, and records.

If the audience is all C programmers, then this module and the previous one (PRI) can be condensed into one half-day, as most of the primitive syntax is based on C.

  • Java Language Basics
    • Output
    • Arrays
    • Methods
    • Parameter Passing
    • Scope
    • Records
  • Examples
OOP: Object-Oriented Programming

In this module we introduce the first key component of object-oriented programming, data abstraction, and show how it is supported in Java. We'll take one of our procedural examples from the last module and re-work it step-by-step into an O-O structure.

The way you look at programming is going to shift fundamentally. We're going to change the relationship between executable code and data in a program. In a classical procedural view of programming you write code to manipulate passive data. In an object-oriented model the data will dominate the code. The view will become data-centric and the code will exist only to support the data.

  • Data Abstraction
    • Complexity
    • Abstraction
    • State
    • Instantiation
    • Behavior
    • Encapsulation
  • Object Oriented Programming
    • Classes and Objects
    • Object-Oriented Computation
    • Advantages of O-O Technology
  • Transformation from Procedural to Object Oriented
    • The class Keyword
    • Methods
    • The this Pointer
    • Access Control: public and private
WWO: Working with Objects

Objects permeate Java. Everything you do in Java will be in the context of objects, so you need "object-thinking" to become so common and comfortable that it's just second nature. The way to get to that point is to work work work with objects. So we'll see objects being manipulated in lots of contexts in this section.

Secondly, we need to introduce a variety of language details that will crop up in later examples. We'll tour them here in the context of getting more familiar with working with objects.

  • Constructors
  • Garbage Collection
  • Chain of Objects
  • Method Overloading
  • Arrays and Arrays of Objects
  • Strings and Arrays of Strings
  • Copying Objects
  • Reading Standard Input
  • Exceptions
  • Wrapper Classes
  • Packages
  • Import
  • Reading a File
  • final Fields
EXT: Extending Classes

This module explains the two remaining key components of object-oriented programming, inheritance and polymorphism. We'll show how to extend the type system and build class hierarchies. The power of using polymorphism to override methods will be shown in several examples.

  • Inheritance
    • Specialization
    • Superclasses and Subclasses
    • Method Inheritance
    • Reference Conversions
    • Constructors
    • Superclass Constructor Parameters
    • Aggregation vs. Inheritance
  • Polymorphism
    • Overriding Methods
    • Examples
  • Abstract Classes
COL: Collections - Managing collections of objects

In this module we cover the concept of a collection of objects, as distinct from a typed collection. We also separate the container mechanism from the data being stored. We distinguish between the information structure and the data structure used to implement it. We'll look at iterating over a collection of data and introduce Java's interface feature. Finally we'll look at java.util's Iterator interface and in particular the idea of having a separate iterator object.

  • Collecting Generic Data
  • Separating Container Mechanism from Data
  • Separating Interface and Implementation
  • java.util Collection Framework
    • Core Collection Interfaces
    • Abstract Implementations
    • List, Set and Map Implementations
  • Iteration over Collections
  • Interface
  • java.util Iterator Interface
EXM: O-O Examples

In this module we tie up a variety of loose ends in some more in-depth examples to illustrate the object-oriented concepts we have studied. We see larger examples that involve several objects interacting. First, we present a program which has some design flaws. We look at it critically and then transform it in several steps into a better design. Along the way we derive some general guidelines for appropriate use of inheritance and polymorphism. Then we present a highly polymorphic string pattern matching example. It is dense, but if you understand it, you've got a good understanding of polymorphism. Finally, we look at a solution to the TicTacToe program we've been designing so far.

  • In-depth O-O Examples
    • Getting the Right Abstractions
    • Object-Oriented Pattern Matching
    • TicTacToe Solution
  • Property Lists
FUN: Fun Stuff

For fun, we'll lightly introduce graphical interfaces and applets, just enough to let you see some of the stuff Java can do that's gaining it a lot of popularity on the world wide web. Students will gain an appreciation for what's involved in GUI programming, and get a taste of programming GUIs in Java.

  • Graphical User Interfaces
    • GUI Programming Introduction
    • GUIs in Java
    • Java GUI Models
    • Putting GUIs on some of our examples
  • Applets
    • Writing Applets in Java
    • Differences Between Applets and Application
    • AWT and Applet Class Hierarchies
    • Applet Examples
OVR: Overview for Object Oriented Programmers

This module serves as an entry point for object-oriented programmers. If you have O-O experience, then this module replaces the WIJ through EPI series as background for the Intermediate Java topics in the next series of modules. It provides a brief tour of the Java language features for people who already understand O-O programming.

  • Hello, World
  • Executive Summary
  • Java History
  • Java Language
    • Class
    • Constructor
    • The this Keyword
    • Specialization and Polymorphism
    • Threads
    • Interface
    • Exceptions
    • Dynamic Class Loading
  • Downloading and Installing Sun's JDK
  • Status
BAS: Basics

This section covers details of the language you need to know before you can write programs. It is the 'nuts and bolts' section.

  • Keywords
  • Primitive Types
  • Expressions
  • Statements
  • Arrays
  • Access Control
  • Initialization
  • Constructors
  • String classes
SPE: Specialization

This module covers the mechanics of inheritance and polymorphism in Java. Since it is assumed attendees have an O-O background, and therefore know the concepts already, this is a quick but in-depth look at the following Java features:

  • Single inheritance
  • Super and sub-class
  • Dynamic method binding
  • super Keyword
  • Constructors
  • Example: Expression evaluation
  • Arrays
  • abstract methods and classes
  • final methods and classes
  • Example: Command pattern
  • Class Object
IFX: Interfaces

This module explores Java's interface feature. An interface identifies a set of method signatures that can be implemented by arbitrary classes. As such, they provide multiple inheritance benefits without the complexities of multiple implementation inheritance.

  • Class, Abstract Class, Interface
  • interface and implements
  • Example: Enumeration client
  • Example: Implementing Enumeration
  • Example: Observer Pattern
  • instanceof and Casting
  • Implementing Multiple Interfaces
  • Interface Extension
PKG: Packages

This section looks closely at Java's compilation model and Java's package feature for programming in-the-large. Packages provide global namespace partitioning and access control. Java source code is compiled into portable byte codes, which are then executed by the Java Virtual Machine (JVM). Java has neither header files nor a linker.

  • Motivation
  • Packages
    • package
    • import
  • Access Control
  • Package Naming
  • Placement in File System
  • Compilation Model
    • Compilation Algorithm
    • CLASSPATH Variable
    • Other Tools
LIB: Libraries

In this section we take a tour of Java's language, utilities, GUI, networking and I/O libraries. Then we use a NewsReader application to motivate looking at the libraries. We'll work through the program and show the library documentation in real-time from the hypertext. You will learn how to chase down the answers to library questions that will arise as you write production code in Java.

  • java.lang
  • NewsReader example using:
    • java.util
    • java.io
    • java.net
    • java.awt
EXC: Exceptions

When an undesirable situation occurs in a Java program, an exception is thrown and the normal control flow is interrupted. In Java you cannot just ignore this phenomenon. A method must either propagate the exception via a throws clause, or it must handle it. This module explores exception handling in detail.

  • Motivation
  • throw Statement
  • class Exception
  • throws Clause
  • Exception Specialization
  • try-catch-finally
  • Checked versus Unchecked Exceptions
  • Examples
JVM: Java Virtual Machine

This section will cover Java's execution model and dynamic loading - the ability to load classes on the fly. We will touch on security - the byte code verification that is done in the JVM, garbage collection - how dynamic storage is automatically reclaimed, and native methods - the ability to load C routines into a Java program.

  • Basics
  • The .class File Format
  • Dynamic Instruction Set
  • Garbage Collection
  • Dynamic Loading
    • Demand Loading
    • ClassLoader
  • Security
    • Sandbox Model
    • Digital Signatures
  • Native Methods
  • JIT Compilation
THR: Threads

Java threads provide the ability to run independent executions of code in a Java Virtual Machine (JVM). This module looks in-depth at the Java threading model. Synchronization of threads will be covered in the SYN:Synchronization module.

  • Introduction and Motivation
  • Thread Creation
  • Class Thread
  • Lifecycle
  • Priorities
    • yield
  • Thread Groups
  • Daemon Thread
JIO: The java.io Package

This module tames the java.io library package. This is a large and complex package. We concentrate on three underlying principles, which significantly reduce the complexity: Input-Output Symmetry, byte-char Symmetry, and The Decorator pattern.

  • Taming java.io
  • OutputStream
  • OutputStream Specialization
    • FileOutputStream
    • ByteArrayOutputStream
    • PipedOutputStream
    • FilterOutputStream
  • The Decorator Pattern
  • Input-Output Symmetry
  • byte-char Symmetry
  • Class File
SYN: Synchronization

This module deals with issues involving the synchronization of multiple threads executing concurrently. We will explore how to maintain safety and liveness of the threads.

  • Motivation
  • Mutual Exclusion
    • synchronized statement
  • Bounded Buffer Example
  • Guarded Access
    • wait and notify
  • Broadcast Notification
    • notifyAll
  • Deadlock
  • Shared Memory Model
NET: The java.net Package

This module covers client-server communications with Java.

  • Internet Basics
  • Connection-oriented Communication
    • Client Side - Class Socket
    • Server Side - Class ServerSocket
  • Connectionless Communication
    • Class DatagramSocket
  • Hybrid Example
    • Online Weather Service
INR: Inner Classes

Inner classes in Java add new contexts in which a class can be declared. An inner class declaration is nested within another class declaration. This nesting of classes explicitly acknowledges the tighter coupling and reduces the housekeeping traditionally associated with closely coupled classes.

  • Caveats and Motivation
  • Coupling
  • Inner Class Semantics
  • Binding
  • Ambiguity
  • Anonymous Classes
  • Examples
REF: Reflection

Reflection lets Java code 'observe itself'. Java programs can ask about their classes, objects, fields, methods and relationships. This can lead to some very interesting programs, as you will discover in this module.

  • Motivation
  • Classes and Interfaces
    • Discovery
  • Fields
    • Discovery
    • Getting and Setting Values
  • Methods
    • Discovery
    • Invocation
  • Constructors
    • Discovery
    • Invocation
SER: Serialization

Object serialization converts objects to and from a canonical representation as streams of bytes. The byte streams may be stored for later use or transmitted to a remote machine, providing Java's basic mechanism for persistent and/or distributed objects. It is important to understand the object closure and versioning mechanisms.

  • Motivation
  • Basic Principles
  • Serializable interface
  • Referential Closure
  • The Serialization Protocol
  • Details
    • Constructors
    • Initializers
    • transient Fields
    • Inheritance
    • Access Control
  • Versioning
  • Topics

Prerequisites: The JIO module or working knowledge of the java.io package. The NET module or working knowledge of java.net is recommended, but not required.

RMI: Remote Method Invocation

Remote method invocation (RMI) let's you access software services from other address spaces. In this module you will explore RMI via proxies.

  • Motivation
  • Classical RPC and Java's RMI
  • Proxies
  • Transport
  • Registration
  • The java.rmi Framework
  • Example
  • Parameter and Result Transmission
  • Topics
BPG: Best Practice Guidelines

This module presents a set of "Do's and Dont's" for Java programmers. The rationale behind these guidelines is explained. A set of "Java Gotchas" are also presented. It is intended for people about to begin production Java programming projects.

  • Introduction
  • Language Details
  • Techniques
  • Tools
  • Gotchas

Prerequisites: This module assumes comfort with most of the advanced Java topics.

JDB: The java.sql Package

The java.sql package contains several key abstractions, based on ODBC, which enable the easy access to data from Java applications/applets. This module will give an explanation of the historical basis for JDBC, the JDBC classes, and their application.

ORB: Java and CORBA

CORBA allows programs written in different programming languages and running on different host machines to cooperate with each other. This module introduces CORBA and its Interface Definition Language, and presents CORBA's Java mapping - CORBA's interface to programs written in Java.

  • Architecture
  • OMG Standards versus Vendor Products
  • Client Example
  • Server Example
  • CORBA Interface Definition Language (IDL)
JNI: Java Native Interface

This module addresses how to interface Java code with native (ANSI C bindings) code.

  • Motivation & Basics
  • Arguments, Types, Returns
  • Arrays
  • Other Objects
  • Constructors, Exceptions, Method Calls
  • Garbage Collection, Finalization
  • Other Issues
I18N: Internationalization

Java Internationalization is a day long course.

BNS: Java Beans:

Java Beans is a day long course.

SEC: Security

Outline to be supplied when module is completed.

APP: Applets

Outline to be supplied when module is completed.

MED: Media

Outline to be supplied when module is completed.

GOT: Gotchas

The BPG: Best Practice Guidelines module covers Java Gotchas.

Back to .profile Consulting Inc. Home Page
Last Updated: February 2008.
Questions? Contact cjm@profcon.com
This page printed from www.profcon.com