Adaptive systems.
Today I was called to join design review for one of the
enterprise systems. The management decides to change one
of the enterprise working procedure and the development
team need to reflect those changes in the system. Our CIO
start the session by explaining that changing user’s way
of work should influence the system heavily and this
assumption should be reflect inside the system. Great!
I wait to hear about set of architecture and design
pattern and practice that should make the system more
adaptive, how they help to make the system more adaptive
and where in the system those pattern and practice
include. But NOT! I didn’t hear it. I just saw tightly
coupled components without any thoughts about
adaptively.
So I mention several design and architecture pattern and
practice that should help them to create adaptive
system:
1)
Use interfaces as a way to
communicate between components (instead of direct
calls). Interfaces set the communication contract
between components, therefore reducing the coupling
level between them/
2)
Use Kernel and Reflection architecture patterns. Those
pattern assress adaptive system domains.
3)
Use factories and proxies to create instance of
components. Factories that return proxy or real objects
reduce the coupling level as well. You might even
consider adding external XML file to set which instance
of class will be returned from given friendly name. This
technique together with interfaces (declare variable as
interface and use factory to return class instance). Let
you change system aspects without changing code in the
calling system.
4)
Stack interceptors let you control by external
configuration actions and their execution order.
Moreover Stack Interceptor let you add new tasks to the
stack without changing existing system code.
5)
The Broker pattern also helps with components
decoupling especially for distributed systems (which is
the case in that system).
6)
Abstract oriented programming and inversion of control
might also contribute significantly for more adaptive
systems but they much more complicate to implement.