Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Implementing Domain-Driven Design Bounded Context with Ports and Adapters architecture @ Codemotion Online 2020

João Rosa
October 20, 2020

Implementing Domain-Driven Design Bounded Context with Ports and Adapters architecture @ Codemotion Online 2020

Congratulations, you just designed your first potential bounded context for a complex domain, a Domain-Driven Design pattern that can increase your teams' autonomy for gaining faster feedback. But now what? How do we start modelling? How do we implement that model? How can we keep the model and language consistent with the business? How do we protect our domain model? And how do microservices fit in? In this workshop, you will hands-on learn how to implement a bounded context with ports and adapter architecture in Java or .NET Core.

João Rosa

October 20, 2020
Tweet

More Decks by João Rosa

Other Decks in Programming

Transcript

  1. View Slide

  2. Please check the agenda for further details:
    https:/
    /events.codemotion.com/conferences/online/2020/codemotion-online-tech-conference/agenda

    View Slide

  3. View Slide

  4. View Slide

  5. Implementing Domain-Driven
    Design bounded context
    with ports and adapters architecture
    5

    View Slide

  6. 6
    Agenda
    ➔ 10:00 - 10:02 - Introduction + explanation
    ➔ 10:02 - 10:15 - Explanation of the day
    ➔ 10:15 - 10:20 - Introduction to Lab 3
    ➔ 10:20 - 11:00 - Lab 3
    ➔ 11:00 - 11:10 - Discuss Lab 3 results
    ➔ 11:10 - 11:15 - Introduction to Lab 4
    ➔ 11:15 - 11:45 - Lab 4
    ➔ 11:45 - 11:55 - Discuss Lab 4 results
    ➔ 11:55 - 12:00 - Check-out
    @kenny_baas @joaoasrosa

    View Slide

  7. 7
    Essence of Domain-Driven Design
    ➔ Using models for creating software
    ➔ Focus on part of the software handling complex business requirements
    ➔ Focus on a language where we really crisply concisely describe the
    situation in the domain
    ➔ Shared language created through conversations between business
    people (specialists) and software people which becomes the ubiquitous
    language
    ➔ Instead of one canonical language, create multiple bounded languages
    @kenny_baas @joaoasrosa

    View Slide

  8. 8
    It is not the domain experts knowledge
    that goes to production, it is the
    assumption of the developers
    that goes to production
    - Alberto Brandolini
    @kenny_baas @joaoasrosa

    View Slide

  9. 9
    Solution Space
    Our world as we designed it
    Bounded Context
    Software Architecture
    Linked to the business
    Problem Space
    Our world as we perceive it
    (Sub)Domains
    Business Architecture
    Independent of Software
    @kenny_baas @joaoasrosa

    View Slide

  10. 10
    @kenny_baas @joaoasrosa

    View Slide

  11. 11
    Business
    @kenny_baas @joaoasrosa

    View Slide

  12. 12
    Business
    Architects
    @kenny_baas @joaoasrosa

    View Slide

  13. 13
    Business
    Architects
    Developers
    @kenny_baas @joaoasrosa

    View Slide

  14. 14
    Business
    Architects
    Developers
    @kenny_baas @joaoasrosa

    View Slide

  15. 15
    To communicate effectively, the code must be based on the
    same language used to write the requirements
    - the same language that the developers speak
    with each other and with domain experts
    - Eric Evans
    @kenny_baas @joaoasrosa

    View Slide

  16. 16
    @kenny_baas @joaoasrosa

    View Slide

  17. 17
    @kenny_baas @joaoasrosa

    View Slide

  18. 18
    @kenny_baas @joaoasrosa

    View Slide

  19. 19
    @kenny_baas @joaoasrosa

    View Slide

  20. 20

    View Slide

  21. 21
    @kenny_baas @joaoasrosa

    View Slide

  22. 22
    @kenny_baas @joaoasrosa
    Responsibility mapping (CRC cards)

    View Slide

  23. 23
    @kenny_baas @joaoasrosa

    View Slide

  24. 24
    @kenny_baas @joaoasrosa

    View Slide

  25. 25
    @kenny_baas @joaoasrosa

    View Slide

  26. 26
    @kenny_baas @joaoasrosa
    Code (C# and Java) can be found at:
    https://github.com/xebia/CoDDDing-labs

    View Slide