This section contains tutorials that (should) guid the user through various use cases of Haver’s module system.

Exporting and Importing a Class

In this tutorial we will define two classes in two different modules:

  1. Define the two classes and implicitly both modules.

  2. Export one class in its modules application programming interface and import it in the module.

  3. Use the one class in a method of the other class.


Using the Export/Import Wizard

In this tutorial we will define two classes in two different modules and let the wizard export and import one of the classes into the other module.


A Complete Application

Finally I implement a complete application in Haver to givew you an impression of why and how I arrived a the current design of Haver. I even will change Haver were it seems to be necessary.

Topic: A TODO-List

I will implement a simple TODO-list, because:

  • The topic needs not much explanation

  • It gives us a nice tour through Haver’s features

  • It shows how to extend Haver

  • I need to consolidate my own various TODO-lists


It must be available in every Haver image, showing the same state.

These features are nice to have:

  1. Comments, e.g. progress reporting.

  2. Due dates

  3. Formatted text

  4. Dependencies

  5. Links to Smalltalk code

  6. Searching

  7. Multi process use, e.g. use the list from more than one image

Design Principle

  1. Do the simplest thing that may possibly work.

  2. Use test driven development, when ever feasible.

Let’s Do It

Part 1

Obviously we will start by defining

  • a TODO-List package

  • a TODO-List class

  • a TODO-List module

  • a TODO-List-TestCase

more or less simultaneously.


The test case just made sure, that we can retrieve the TODO-List singleton.

Part 2

We will add the following features:

  • a hierarchy of TODO-Items: - A SimpleItem, with name, title and description. - A CommentedItem with additional commenting items. - A Item with an additional due time.

For the time being, we make no decision about the relationship of an itme to a list, maybe the can be part of more than one list or none at all.

We test the creation of instances all such item classes.

The following quite long video contains my way to implement this classes. I cut out a lengthy search for a way to compute the first line of a string. I am not satisfied with that video, it lacks a lot of explaining text. I will try to find a better way to show demos.