Prokon is a simple planning tool; its user interface is shown in the below screen dump.
An activity represents a task that needs to be done. It has a certain duration; it cannot start before all its predecessor activities are completed; and it must end before its successor activities can start. An activity dependency graph is shown in pane 1. Front- and backloading compute the earliest and latest start and finishing times given the project start and finishing times. The results are shown in pane 2; the yellow, top bars show earliest and the bottom, green bars show the latest times. Pane 3 shows how the activities have been allocated to the resource, two programmers named Ava and Joe. Activity properties can be edited in pane 5. Pane 4 identifies the program version.
The program architecture rests on two powerful principles for separation of concerns: MVC first and DCI second.
The Model is a representation of the user's information model. The magic in the above figure is that the user experiences the computer as an extension of his or her mind. This is achieved by faithfully reflecting the user's mental model in the Model code. The User is in the driver's seat and a View bridges the gap between his or her mind and the Model. Different Views show different aspects of the Model in a way that can be readily intuited by the human. The human intuition makes it clear how to give input to the Model through a View. A Controller sets up one or more Views and coordinates them, e.g., by making a selection show itself in all Views simultaneously.
The Model is again separated into two projections according to DCI; The Data-Model projection implements the static part of the user's mental model, while a Context-Model projection implements the operations on the Model. (Frontloading, backloading, etc.) The Model code is fairly generic and should be readable to a person with rudimentary knowledge of the Squeak syntax.
The user interface (UI) bridges the gap between the human mind and the computerized Model. Usually this is done by a Controller class and one class for each View. (Here 5).In Squeak, this means classes building on its Morphic framework and the code will only be readable to a person who is familiar with this framework.
As an experiment, we have separated the static display classes from the algorithms for operating upon them such as refreshing their contents. (Data-UI and Context-UI respectively). This is separation i progress and it should be possible to find a simpler and more readable form.
The program can be inspected, modified and run in BabyIDE.
The Prokon code listing is generated from this image. The code is created to read as a narrative that starts with the implementation of the user's mental model ends with low level utilities. (The prefix BB9 has been removed from the class names to enhance readability.)
Listing table of contents:
|Data-Model||MVC Model classes:
|Context-Model||Operations on the Model itself:
MVC Controller with the classes that define the Views:
Display operations that create what the user sees:
|Data-DB||Support class for persistent objects:
There is a toggle for choosing between the two versions at the top of the documents.