_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN
Let's talk

DDD Bounded Contexts — hranice domény

03. 01. 2024 1 min read intermediate

Architecture Expert

DDD Bounded Contexts — hranice domény

DDDBounded ContextDomain 3 min read

Jak definovat bounded contexts v Domain-Driven Design. Context mapping a ubiquitous language.

Co je Bounded Context?

Explicitní hranice, ve které má doménový model jasný význam. Stejný pojem může znamenat něco jiného v různých contextech.

  • Sales: Customer = kupující, košík, preference
  • Shipping: Customer = adresa doručení, telefon
  • Billing: Customer = fakturační údaje, DIČ

Ubiquitous Language

V každém BC existuje jednotný jazyk — vývojáři i doménoví experti mluví stejně.

// Sales Context
class Order {
    items: OrderItem[];
    applyDiscount(code: string): void;
    calculateTotal(): Money;
}
// Shipping Context — jiný jazyk
class Shipment {
    recipient: Recipient;
    packages: Package[];
    estimateDelivery(): Date;
}

Context Mapping

  • Partnership — spolupráce dvou týmů
  • Customer-Supplier — upstream dodává API
  • Anti-Corruption Layer — překlad cizího modelu
  • Open Host Service — standardizované API

Summary

Bounded Contexts jsou nejdůležitější koncept DDD. Správné hranice vedou k čistší architektuře a menšímu couplingu. Začněte Event Storming workshopem.

Need Help with Implementation?

Our team has experience designing and implementing modern architectures. We’re happy to help.

Free Consultation

Share:

CORE SYSTEMS tým

Stavíme core systémy a AI agenty, které drží provoz. 15 let zkušeností s enterprise IT.