|
HARBOR POJO Application Server |
||||||||
|
WIRE BOX The sculpture of a Harbor application. |
||||||||
|
A Harbor Java application is a stock
standard application, with a Wiring Box, called the CD_Unit. What we going to do here, is create a standard
visual representation of a "normal" java application, and
then show you how that changes when one applies a Wiring Box (CD_Unit)
to it.
Lets now build a typical simple application.
Imagine that we want the UI to run on a remote
machine, and the FACT to run on the server.
Notice that the UI and FACT classes have been given
Interfaces, also notice that there are now no direct connections
between the UI and FACT. In the 'typical' application the UI class
instantiated and called the Factory class directly.
Notice that all the control is now done in the
Wiring Box, each class is instantiated, and the CD_Unit gives
the factory class to the UI. One might be tempted to ignore this model and
just apply the RMI (Harbors API) directly to the UI.
Where would you do
the manual RMI (wiring calls) now? If we build a wiring box into one
of the operating UI components, which also controls other
components, it immediately starts becoming complex.
The code in the wiring box or CD Unit takes this form...
Now that UI, because it has a callback reference to the
CD_Unit, can get at any factory method, in any factory. When you make your SHIP... you will now find its almost identical to this Wiring Box. This is because the Wiring Box has a ONE to ONE relationship with the required RMI calls. That's really all there is to it. The great thing about this, is that its what terrific programmers do anyway. Good programmers naturally separate VIEW and MODEL,
and the leverage of the MVC model is amplified in Harbor.
Applying Coherent Diffusion may seem like a little extra work, but after several applications, one needs to write very little code to get something done. One simply plugs into utilities and modules in other applications. In some ways, Harbor is not new technology at all,
its really just allowing us to apply old tried and trusted
techniques to networked applications. The incredible power of Harbor comes from being able to use Java, as it should be used. ============================== |