you'd like to apply domain driven to your old code ? you don't know how ? this talk is for you. i'll introduce few techniques and heuristics based on my experience dealing with legacy code and applying domain driven design concepts on it.
Gather the right people in the same room (those who ask the questions and those who have the answer) Provide unlimited modeling space Explore the domain starting from Domain Events 9
"The Dungeon Master is the author of the original software, that used to support the business in the early days... in facts he knows the software better than anyone else. Even if he’s not any more a software developer, he’s still at close distance from its creation." -- Alberto Brandolino (Inventor of Event Storming) 11
System Expert? Thinks that he master the Domain but actually he is an expert of the existing legacy system Can be a QA Engineer, a User and even the Product Owner 13
a global demo of the system How they test the application (maybe you can have an nice surprise as an end to end automated tests already implemented) 14
get the history of the system. Identify deprecated features. Figure out the "hidden features" (if there is). Check if there is a shift of the core domain (usually there is). 15
our legacy system/code as a service (as an api for example). Use the Open Host Service (OHS) pattern to publish legacy features on a simpler way that it is. Create bubble context as new feature is needed. 17
context as new feature is needed. Every bubble context has its own way to ask information from legacy using Anti Corruption Layer (ACL) pattern on the use case service level. 19
context as new feature is asked or bug fixed is asked. If it is a bug fix refactor and extract the feature on new bubble context. Every bubble context has is own way to ask information from legacy using ACL's calling low level services. 21
opportunity. Try to understand how the Legacy system works using event storming and Mob/Pair programing. Work wisely with the Dungeon Master and the Existing System Expert(They can be harmful to the legacy system). Sometimes your level of confidence can be different in every slice of the system: combine all the patterns used before (Legacy as Service, OHS, ACL, ...) 23