[[s/\bZZModule\b/\1<\/code>]] Applitude Writer's Guide

Applitude Writer's Guide

$Id: appw.wml,v 1.1 2000/08/17 12:56:45 tjl Exp $
Tuomas Lukka
  1. Applitude Writer's Guide
    1. Abstract
    2. Introduction
    3. ZZModule

Note that this document contains some formatting that is best rendered using a true CSS1 standard-compliant browser such as Mozilla; however, it should work reasonably well with any browser that can at least ignore CSS that it doesn't understand. Unfortunately, Netscape Navigator 4.7, for example, doesn't. Well, that's life...

A non-CSS version exists: you can try by compiling this document from its WML version with some switches.. (if you came here through the WWW, there should be an alternate link on the referring page. However, I like the pretty rendering by Mozilla so much that that's still the default.

Abstract

Applitudes are the preferred way of including more functionality into GZigZag. This document explains how they are written.

Introduction

An applitude is basically a view and related actions.

ZZModule

The ZZModule abstract class provides the basic mechanism for including Java code into GZigZag without having to modify and/or recompile GZigZag. GZigZag uses the Java reflection API to connect to new modules.

The ZZModule architecture is slightly different than one might expect: instead of directly inheriting from the class, modules use a static member which is a ZZModule: for example,

public class TextCloud implements ... {
	...
	static public ZZModule module = new ZZModule() {
		public void action(String id, ...) {
			... execute action id
		}
		public ZOb newZOb(String id) {
			... return a new ZOb instance with the given
			    name
		}
	};
}