Refactoring legacy code to Domain Driven Design

Code: DDD-refaktoring
Category: Domain Driven Design
Format: 40% lecture / 60% workshop
Duration: 3 days
Target audience: architects
developers
analysts
Enrollment: Groups, companies
Venue: Client's office.

During the training, participants will learn the techniques that allow for refactoring of existing systems in order to decrease the workload related to their maintenance. A parallel goal of refactoring is the reverse engineering of a model that has not been maintained and has become diffuse. An additional goal will be to learn the behaviour and structure in order to fix bugs, introduce new functionalities and refactor the design. During the practical workshops, participants will refactor existing code and write regression tests.

The participants will refactor the existing system, with the aim of introducing new functionalities.

The training should be preceded by trainings in the areas: Domain Driven Design - complex business model and DDD Implementation Technician.

Training Program

The content of our program can be customised during pre-training analysis.

  1. Reading the code
    1. Collection and interpretation of metrics
    2. Discovering the critical points of the system
    3. Code review and identification of “smells”
  2. The fundamentals of refactoring
    1. Basic refactoring techniques
    2. Support from the IDE
    3. Identifying seams and dividing dependencies
    4. Advanced refactoring in multiple steps
    5. Creating a refactoring plan
    6. Refactoring the design
    7. Refactoring to a pattern
  3. Use of modelling techniques in the refactoring process
    1. Event Storming
    2. Changing the approach in order to reduce the number of rules to be considered
      1. An approach “from the domain” instead of “from the process”
    3. Linguistic techniques
      1. Extraction of the Domain Story
      2. Full sentence techniques instead of noun collection
      3. Exploring the domain using sentences in the form subject.verb(object, modifier)
      4. Gibberish Game - removing ambiguity and discovering new domain concepts
      5. Word-Meaning(Context)-Rules
      6. Reversing the order so as to discover hidden domain concepts
    4. Visualisation techniques
      1. Grouping the operation around invariants
      2. The visual metaphors of real Aggregates
      3. Levels of the model
      4. Separation of the model according to susceptibility to change and instability
  4. Logic stratification as the main refactoring strategy
    1. Extraction of the Use Case/User Story in the application layer
      1. Designing the system API
      2. Encapsulation of WHAT the system should do into application services
    2. Extraction of the business model from the building blocks of the domain layer
      1. Encapsulation of HOW and WHY the system behaves in this way in the Building Blocks of DDD
      2. The beginning of work - extraction of Value Objects
        1. Work on the domain vocabulary
        2. It is easier to manage a value than an entity
      3. Extraction of Aggregates
        1. Grouping attributes according to coherent change in the Use Case
        2. Grouping attributes according to the protection of invariants
      4. Domain Services - extraction of business sub-procedures
      5. Policies - encapsulation of changeability beyond the stable interface
      6. Factories - encapsulation of object creation in one place
      7. Four levels of the model according to susceptibility to change
        1. Capability
        2. Operations
        3. Policy
        4. Decision Support
      8. The search for stability
        1. The open-close principle in practice
        2. The stable model - Aggregates and Domain Services
        3. Closures of the model - policies
  5. Regression testing
    1. Ways to test the system
    2. Types of tests and examples of their use
    3. Automation of the testing process
    4. Choosing the testing strategy in the project
    5. Writing automatic tests in a project that does not have them


Download PDF

Trainers

Meet the experts who will conduct your training.

Contact us for a free consultation.

Firstname and lastname:
Company:
E-mail:
Phone:
Subject:
Message:

If you prefer direct contact then you can always call.

Iwona Sobótka

Training coordinator


I agree to the processing of my personal data in accordance with the Law on the Protection of Personal Data in connection with sending a request via the contact form.

Providing the data is voluntary but necessary to process the query. I have been informed that I have the right to access my data, the possibility of correcting them, demanding stopping their processing.

The administrator of personal data is Bottega IT Minds, ul. Jana Sawy 2, 20-632 Lublin, Poland.


The information clausule