SoftWoehr QCDemo Programmer
Manual
Version 1.1
Copyright 2000, Jack J. Woehr
P.O. Box 51, Golden, Colorado 80402-0051
Table of Contents
The QCDemo classes in the package com.SoftWoehr.JTOpenContrib.QCDemo implement
the tabbed notebook described the QCDemo User Manual.
All source is present alongside the classes in the softwoehr.jar
file; unpack the jar file to see the source.
Also present in the jar are the NetBeans
forms which were produced by the design tool. They are included for the
convenience of NetBeans/Sun Forte users, but are not necessary to compile,
modify or run the application.
Source code documentation in Javadoc form
is also provided, though in some cases it is perfunctory.
Well, it wasn't so much designed as it grew. The author was experimenting
with NetBeans and JTOpen
at the same time. One aspect of the current age of interactive development
environments is that in the MVC Model-View-Controller paradigm, the controller
tends to get shoved aside, chopped up and parcelled out between graphic
components.
To some extent, we have tried to avoid this, but much more could be
and should have been done. Therefore, we do not present the application
architecture we have adopted in the course of this two-week programming
lark as representative of our thoughts on application architecture. There
is a QCMgr class which manages shared connections; it is simplistic but
correct as far as it goes. Contrarily, references to the JTOpen ErrorDialogAdapter
shared by all the QCDemo classes that use that facility are manually passed
from component to component at initialization rather than being mantained
by a manager class.
We are more convinced than ever that
-
Shared facilities should reside in a central manager.
-
References to the manager should be provided to the components.
-
A simple way to do this is via static methods of the manager class which
maintain a vector of manager instances identified by some URL which the
clients can pass to obtain the original reference.
-
Components should call public functions of the manager for services.
Even in an IDE there is no problem in doing this, witness the QCMgr class
and supporting classes of QCDemo. However, IDE's tend to make it appear
simpler to skip this factoring out of the controller. We wish to assure
you that the savings only go as far as trivial applications the size of
QCDemo. Were this application to grow any larger, it would be necessary
to complete the postponed factoring.
Fairmount, Colorado July, 2000