There is another choice: build your DomainObjects directly from the XML
Event stream. This is what MONDO/mindo supports doing and could also be
done in several other ways.
With that change in focus you then have (at least) three choices: (1)
Provide the DOM interfaces onto existing Domain classes. This would work
if your Domain Model is easily represented as a simple containment
hierarchy and you only have one such view. (2) Generate a DOM specific
view when it is asked for and link the generated objects to the original
domain objects. This allows multiple DOM perspectives on the same
DomainModel and enables some transformation between the classes
(collapsing of associations into simple attributes). (3) Provide one or
more DOM Adapters onto the Domain classes, which provide similar
functionality as (2) but do not maintain a seperate "cache" of DOM
specific state. This is basically the same approach as Tim Howard's
DomainAdapter except using document terminology instead of general GUI
terms.
You can also combine these approaches in various ways. Effectively (3)
is the most general since it simply says: you can functionaly transform
the Domain into a DOM model. (2) Caches that result [and allows
intermediate transitions]. (1) Says the transform is trivial: 1-1. So
these are just gradations in function and state transforms.
--Mark
mark.fussell@chimu.com