This model is the result of a demonstration of Basic OOAD at a JSL meeting. Obviously it's not done. The improvement note was added later by Jack as an example.

Model Discussion

Note how the model is already well structured. Mediator has two classes, neither of which know about the other. Mediator is the only class in the GUI partition talking to another partition. This is all pretty reasonable.

A growing problem in the design is we have to keep adding methods to the window classes to transfer objects from WindowCreator to WindowState. This indicates the design is nonscalable. The improvement note indicates a possible solution.

Lets discuss this problem abstractly. A has B and C. A passes data from C to B. Some of the data is complex, causing an "assumption dependency" of B on C. This is a total of 3 dependencies.

Now suppose the design is changed to A has B and B has C. Anything B needs it gets from C itself. There is now only a total of 2 dependencies.

An additional advantage is when other windows are added, the Mediator's complexity does not grow as fast.


Window Design

The GUI Design group came up with this mockup. Here's an explanation of the non-obvious:

1. As each test is completed the progress bar advances. It's green if no exceptions yet, red if any exceptions were encountered. Thus when the suite is complete the bar is red or green.

2. "Seconds" is the total seconds (to 0.00) elapsed so far.

3. "Exceptions" is the total number of exceptions encountered.

4. "Failures" is the total number of AssertFailureExceptions, and is always less than or equal to "Exceptions."

5. The "Exceptions" list box has one line per exception.

6. When the user selects an exception its stack trace is shown in the lower list box.

See org.ajug.jsl.jester.ui.WindowCreator for the implementation.