At this point we have extracted the core of our legacy codebase, the domain logic that sits at the center our application, to its own separate and testable layer. This has been the most demanding of the steps in our modernization process, but it has been very much worth our time. We have not made many modifications or improvements to the domain logic itself. Any changes we have made have been just enough to get data into our new Transactions
classes and then out again for later use.
In a lot of ways, all we have done is shuffle the logic around so that it is independently addressable. Although the domain logic itself may still have many problems, those problems are now testable problems. We can continue adding tests as needed to explore edge cases in our domain logic. If we need to add new domain logic, we can create or modify our Transactions
classes and methods to encapsulate and test that logic.
The process of extracting domain logic to its own layer leaves us with...