{: [[s/\bZZModule\b/\1<\/code>]] Applitude Writer's Guide #include '../wmlinc/article.wml'

Applitude Writer's Guide

$Id: appw.wml,v 1.1 2000/08/17 12:56:45 tjl Exp $
Tuomas Lukka
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
		}
	};
}
:}