Conway’s Law Any organization that designs a system will inevitably produce a design whose structure is a copy of the organization’s structure (Melvin Conway-1968). E-COMMERCE BACKEND TEAM INFRA / DB TEAM FRONTEND TEAM javujavichi
Tech Debt Hard to deploy Legacy systems Can’t escalate BIG BALL OF MUD CI/CD process not implemented No boundaries in the services Hard to monitor No tests What do we have javujavichi
1. Align Business model and user needs 2. Discover The domain visually & collaboratively 3. Decompose The domain into sub-domains 4. Connect Sub-domains to form a loosely coupled architecture 5. Strategize Business differentiating core-domains 6. Organize Teams around bounded contexts 7. Define Roles & responsibilities for bounded contexts 8. Code Your bounded context with tactical patterns DDD is continuous, and iterative Source: https://virtualddd.com/learning-ddd/ddd-crew-starter-modelling#the-process Domain driven design process javujavichi
1. Align Business model and user needs 2. Discover The domain visually & collaboratively 3. Decompose The domain into sub-domains 4. Connect Sub-domains to form a loosely coupled architecture 5. Strategize Business differentiating core-domains 6. Organize Teams around bounded contexts 7. Define Roles & responsibilities for bounded contexts 8. Code Your bounded context with tactical patterns DDD is continuous, and iterative Source: https://virtualddd.com/learning-ddd/ddd-crew-starter-modelling#the-process Domain driven design process javujavichi
1. Align Business model and user needs 2. Discover The domain visually & collaboratively 3. Decompose The domain into sub-domains 4. Connect Sub-domains to form a loosely coupled architecture 5. Strategize Business differentiating core-domains 6. Organize Teams around bounded contexts 7. Define Roles & responsibilities for bounded contexts 8. Code Your bounded context with tactical patterns DDD is continuous, and iterative Source: https://virtualddd.com/learning-ddd/ddd-crew-starter-modelling#the-process Domain driven design process javujavichi
1. Align Business model and user needs 2. Discover The domain visually & collaboratively 3. Decompose The domain into sub-domains 4. Connect Sub-domains to form a loosely coupled architecture 5. Strategize Business differentiating core-domains 6. Organize Teams around bounded contexts 7. Define Roles & responsibilities for bounded contexts 8. Code Your bounded context with tactical patterns DDD is continuous, and iterative Source: https://virtualddd.com/learning-ddd/ddd-crew-starter-modelling#the-process Domain driven design process javujavichi
1. Align Business model and user needs 2. Discover The domain visually & collaboratively 3. Decompose The domain into sub-domains 4. Connect Sub-domains to form a loosely coupled architecture 5. Strategize Business differentiating core-domains 6. Organize Teams around bounded contexts 7. Define Roles & responsibilities for bounded contexts 8. Code Your bounded context with tactical patterns DDD is continuous, and iterative Source: https://virtualddd.com/learning-ddd/ddd-crew-starter-modelling#the-process Domain driven design process javujavichi
13 SHOPPING CART PRODUCT CATALOG SHIPPING INVENTORY ORDERS INVOICE PAYMENT E-COMMERCE Bounded Context A Bounded Context is a delimited space where a business element has a perfectly defined meaning. javujavichi
Payments gateway Provider/ Processor Gateway & messages SMTP service In dutch, please? Do not focus on technical details… Product payment The payment was processed correctly? Send the voucher to the customer’s email Now is clear to me ! Developers Domain experts …speak in business terms yes Payment order Domain Experts Common language between business and developers Developers javujavichi
16 The flow of events in the organization is discussed and that flow is modeled in an easy-to-understand way. It provides structure to the business flows that arise, but the real value is the conversations involved. You can build a software system from the models or simply use the knowledge gained from the discussions to better understand and refine business processes. Event Storming Credit card data entry Sent the credit card data Payment processing Payment gateway javujavichi
Migration patterns cheat sheet no Can you change your existing solution? Do you have a big ball of mud? In-place refactor Is the solution well structured? Modular Monolith Is business on board? Is domain functionality well understood? Are key personnel trained? Do you have strong intrapreneurs? Strangler Fig yes yes yes yes no no no no yes no yes Don’t change yes
Migration patterns cheat sheet no Can you change your existing solution? Do you have a big ball of mud? In-place refactor Is the solution well structured? Modular Monolith Is business on board? Is domain functionality well understood? Are key personnel trained? Do you have strong intrapreneurs? Strangler Fig yes yes yes yes no no no no yes no yes Don’t change yes
Migration patterns cheat sheet no Can you change your existing solution? Do you have a big ball of mud? In-place refactor Is the solution well structured? Modular Monolith Is business on board? Is domain functionality well understood? Are key personnel trained? Do you have strong intrapreneurs? Strangler Fig yes yes yes yes no no no no yes no yes Don’t change yes
Building Evolutionary Architecture Neal Ford, Rebecca Parsons & Patrick Kua Refactoring Martin Fowler & Ken Beck Monolith to Microservices Sam Newman Refactoring resources javujavichi
28 javujavichi 28 C4 architecture diagrams are models that help explain applications and their systems from the general to the particular. This means that we can explain a system in 5 minutes, in 1 hour or in 5 hours. The 4 phases of the model are: system context, container diagram, component diagram, and code. https://c4model.com/ https://structurizr.com/ Molecular structure of natural rubber Visualize your Architecture (C4 diagrams)
Architecture Decision Record (ADR) ● Avoid dependency at cycle level. ● Prevent the architecture definition from drifting over time. ● Set architecture guidelines in the team ● Automated tests with technical agreements at team level Goals
Software Domain model Domain Codes Is part of represents Developers Domain experts (Business) Validates and help Source: https://fraktalio.com/ddd Talks and understand What is DDD? javujavichi
33 PAYMENTS TEAM INVENTORY TEAM SHIPPING TEAM ORDERS TEAM E-COMMERCE Build your teams in a way that reflects the architecture you want. Inverse Conway Manoeuvre javujavichi
39 DB E-Commerce Inventory Event bus Shipping Payment class class Inventory class class Catalog class class Shipping class class Orders event Modular monolith javujavichi