Wizard Architecture

The wizard architecture is divided between the server and the client. Any confusion about which classes are executed in the server and which classes are executed in the client could lead to creating a wizard that does not work remotely. This section discusses the wizard architecture to prevent such confusion.

The following diagram illustrates the architecture of the wizard runtime classes. The classes on the left are classes that are executed only on the server. The classes on the right are executed only on the client.

Wizard Architecture

Server Classes:

The server classes include the WizardState, the Sequence, the Task, the ArchiveReader, and the ArchiveClassLoader.

The WizardState is the main object defining the server. The WizardState holds the data required to perform the action (which is the purpose of the wizard). WizardState is also the object responsible for managing Sequences of Tasks. This management includes storage, serialization, deserialization, and execution of the Sequences. A WizardState object can have child WizardState objects. This will be discussed in detail in the Wizard Hierarchy section.

The Sequence is a container object for tasks. Tasks within the Sequence can be performed when the Sequence is performed. The Sequence is stored in theWizardState.

The Task is an object that actually performs an action. This is the mechanism through which a wizard fulfills it purpose. A task is performed within the server, and has permission to create, modify, and remove files; execute processes, use the network, connect to already running processes, and so on. The Task object can be written for a specific operating system or can be platform independent, depending on the requirements of the Task. Each Task to be performed during execution of the wizard is placed into a Sequence. When the Sequence is performed (a responsibility of the WizardState), each task is given the opportunity to perform its action.

The ArchiveReader is responsible for reading the resources out of the wizard archive. These resources can be read as an input stream or as a byte array. For some resources (for example, images), an element within the resource section can be read rather than reading the entire resource section. This enables the client to request a single image rather than being required to cache all of the images found within the image resource section in the archive. The client can have access to the ArchiveReader through the WizardState object.

The ArchiveClassLoader is responsible for resolving class files from within the wizard archive. This object has a limited ability to read the wizard archive file. The complete responsibility for reading the archive lies with the ArchiveReader.

The ArchiveReader and the ArchiveClassLoader coordinate their responsibilities. The ArchiveClassLoader instantiates the ArchiveReader. The ArchiveReader submits classes from within the archive (in bytecode form) to the ArchiveClassLoader. The ArchiveClassLoader is then able to resolve classes that originated in the wizard archive for the Java Virtual Machine. The ArchiveReader is responsible for reading the class bytes from the wizard archive in order to facilitate a wizard hierarchy.

Client Classes:

The client classes include the wizard panels that are subclassed from WizardComponent, the WizardTreeManager, and the WizardConsole. The wizard panels are the objects that provide the user experience of the wizard. These panels may include information the user should know and default settings that the user can change, and provide the order in which information should be entered. The panels guide the execution of the wizard.

The WizardTreeManager provides a container in which the wizard panels can operate. It is the main object on the client side of the wizard architecture. The WizardTreeManager manages the wizard panels, creates the navigation buttons, and provides the image panel that is displayed within the wizard.

The WizardConsole is the interface into the system environment. The WizardConsole has code that can exit the application, disconnect from the server (if running remotely), and catch top level window events.



Last modified: Fri Nov 25 16:48 PDT