
Legacy Mimic
When incrementally changing legacy methods with new ones, it is not going to be
potential to cleanly isolate the brand new world from the previous.
A Transitional Architecture requires that the brand new world gives knowledge (or
another interplay) with a view to “maintain the lights on”.
When that is the case the brand new system should meet some present (typically
implicit) contract, and so the brand new system should change into a Legacy Mimic.
How It Works
By means of exploring the legacy system’s technical structure and goal
structure imaginative and prescient, and understanding the present and to-be
enterprise processes, seams could be found and exploited permitting the
drawback to be damaged up into components.
The Legacy Mimic sample is an enabler for these seams, and creates choices
for, and is an implication of, totally different sequencing approaches.
A Legacy Mimic typically realises the Anti-Corruption Layer sample from Eric
Evans’s Area Pushed Design ebook.
There are related forces at play because the Anti-Corruption Layer‘s intent is to:
Create an
isolating layer to offer purchasers with performance by way of their very own
area mannequin. The layer talks to the opposite system by way of its present
interface, requiring little or no modification to the opposite system.
Internally the layer interprets in each instructions as vital between the
two fashions.
Much like an Anti-Corruption Layer a Legacy Mimic’s implementation will usually use
Providers, Adapters, Translators and Facades.
There are no less than 2 kinds of mimics that we generally see, and are most
simply defined by way of offering or consuming companies.
A Service Offering Mimic will encapsulate a brand new implementation behind a
legacy interface. Legacy elements will have the ability to work together with it
utilizing the legacy interface and never know that they’re collaborating with
that new implementation.
A Service Consuming Mimic will collaborate with the legacy methods that
haven’t but been changed utilizing their present legacy interfaces. Once more
this interplay will likely be clear to the previous system.
When to Use It
To additional illustrate these various kinds of mimics this determine exhibits
a monolythic legacy system that helps 3 enterprise processes – Gross sales,
Logistics and Enterprise Efficiency.
An choice being thought of is to make use of the Extract Value Streams for
the Logistics functionality. Doing so might end in a transitional
structure like:

To ensure that the brand new logistics system to course of the success of
gross sales, Event Interception is proposed. On this instance the Occasion Interceptor
is an instance of a Service Offering Mimic – it’s conforming to the
legacy interface (consumption of legacy occasions).
To ensure that the Enterprise Efficiency course of to proceed to operate, once more
the usage of the Legacy Mimic sample is proposed, however this time as a Service
Consuming Mimic. It can replicate the required logistics metrics into the
legacy reporting database (conforming to the legacy database’s schema and
semantics).
Each of those elements is not going to endure in inside the goal structure
of the system – they’re transitional.
The present Logistics Associate System should nonetheless be built-in with, so
an Anti-Corruption Layer is utilized by the brand new Logistics system. As it will
endure it’s not thought of a mimic (or transitional), however the creation
of the Anti-Corruption Layer is used so that the area mannequin of the brand new
Logistics System is just not compromised by the mannequin utilized by that exterior
system.
