I believe
the solution lies in moderating or marshalling the boarder between an
application’s concerns. This increases the visibility of data changes made
across concerns by reducing the means by which data changes can occur.
This in turn increases the encapsulation of the concern making it easier
to make changes without having to retest others.
Complete
encapsulation of a concern is not possible as no two concerns are ever
really orthogonal. There is always a need for interaction between them.
However providing too much control to the programmer implies the
maintenance and encapsulation issues mentioned above. Also most notably
there seems little good argument for one concern to be able to affect
another.
Dynamic
proxies partially address this problem as they allow decoration of
objects with code from another concern. However they provide only limited
join points (i.e. only those exposed through public interfaces) and are
this not suitable for complex multi concern implementations.
What is
required is:-
* A
method for specifying join points within an application
* A
method for adding functionality at join points
* A
marshalling methodology that prevents one concern from altering another
without that concern specifically knowing about it.
I take the
view that one concern is considered dominant and tertiary concerns bolt
into it. Tertiary code is coded into a set of classes as if the coding
was being performed in that class itself except that all interactions are
passed by value. HyperJ comes closest currently to this aim.
|