[[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

You are reading an ugly version of this document that doesn't use CSS to place floats nicely. Figures are shown in a very crude way. Get Mozilla and see the other version - it's MUCH better.

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
		}
	};
}