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. Please check the agenda for further details:
    https:/
    /events.codemotion.com/conferences/online/2020/codemotion-online-tech-conference/agenda

    View full-size slide

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

    View full-size slide

  3. 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 full-size slide

  4. 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 full-size slide

  5. 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 full-size slide

  6. 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 full-size slide

  7. 10
    @kenny_baas @joaoasrosa

    View full-size slide

  8. 11
    Business
    @kenny_baas @joaoasrosa

    View full-size slide

  9. 12
    Business
    Architects
    @kenny_baas @joaoasrosa

    View full-size slide

  10. 13
    Business
    Architects
    Developers
    @kenny_baas @joaoasrosa

    View full-size slide

  11. 14
    Business
    Architects
    Developers
    @kenny_baas @joaoasrosa

    View full-size slide

  12. 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 full-size slide

  13. 16
    @kenny_baas @joaoasrosa

    View full-size slide

  14. 17
    @kenny_baas @joaoasrosa

    View full-size slide

  15. 18
    @kenny_baas @joaoasrosa

    View full-size slide

  16. 19
    @kenny_baas @joaoasrosa

    View full-size slide

  17. 21
    @kenny_baas @joaoasrosa

    View full-size slide

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

    View full-size slide

  19. 23
    @kenny_baas @joaoasrosa

    View full-size slide

  20. 24
    @kenny_baas @joaoasrosa

    View full-size slide

  21. 25
    @kenny_baas @joaoasrosa

    View full-size slide

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

    View full-size slide