Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(knowledgebase): starting a knowledgebase #83

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

neolytian
Copy link
Contributor

@neolytian neolytian commented Oct 11, 2024

Summary of the Pull Request

This Pull Request adds a comprehensive knowledge base article titled "Domain-Driven Design (DDD) Concepts: A Comprehensive Overview." The article aims to provide a detailed understanding of key DDD concepts, organized into strategic and tactical categories. It serves as a valuable resource for developers, architects, and stakeholders who are interested in applying DDD principles to create software that closely aligns with business domains.


Key Additions:

  • Strategic Design Concepts:

    • Ubiquitous Language:

      • Establishes a common, shared language between developers and domain experts.
      • Ensures clear communication and consistency across the domain model.
    • Bounded Context:

      • Defines clear boundaries within which a specific domain model is applicable.
      • Prevents ambiguity by ensuring terms and concepts have consistent meanings within the context.
    • Context Mapping:

      • Visual representation of how different bounded contexts interact.

      • Identifies integration patterns and relationships between contexts.

      • Team Relationships:

        • Mutually Dependent: Teams rely on each other for success, requiring close coordination.
        • Upstream/Downstream: Actions of the upstream team affect the downstream team.
        • Free: Teams operate independently without affecting each other's success.
      • Context Map Patterns:

        • Anti-Corruption Layer (ACL): Acts as a barrier between contexts to prevent model corruption.
        • Shared Kernel: A shared subset of the domain model used by multiple contexts.
        • Open Host Service: Provides a public interface for interaction with other contexts.
        • Published Language: A common language or protocol for inter-context communication.
        • Conformist: Downstream team adopts the upstream team's model without modification.
        • Partnership: Teams are interdependent, requiring joint planning and coordination.
        • Customer/Supplier: Downstream (customer) depends on upstream (supplier) for services.
        • Separate Ways: Contexts operate independently with no significant relationship.
        • Big Ball of Mud: Represents a chaotic, poorly structured system to be isolated.
    • Subdomains:

      • Core Subdomain: Primary area providing competitive advantage.
      • Supporting Subdomain: Assists the core but is not unique to the business.
      • Generic Subdomain: Common functionalities that can be outsourced.
  • Tactical Design Concepts:

    • Entities: Objects with a distinct identity that persists over time.
    • Value Objects: Immutable objects defined solely by their attributes.
    • Aggregates and Aggregate Roots: Clusters of related entities treated as a single unit.
    • Repositories: Abstractions for persisting and retrieving aggregates.
    • Factories: Responsible for creating complex aggregates while maintaining invariants.
    • Domain Services: Encapsulate domain logic that doesn't fit within entities.
    • Application Services: Coordinate tasks and handle cross-cutting concerns.
    • Domain Events: Represent significant occurrences within the domain.
    • Modules: Logical groupings for better maintainability.
  • Design Principles and Patterns:

    • Encapsulation: Hides internal state through well-defined interfaces.
    • Separation of Concerns: Divides the system into distinct sections.
    • Single Responsibility Principle: Each component has one reason to change.
    • Command-Query Separation (CQRS): Separates operations that modify state from those that retrieve state.
    • Hexagonal Architecture (Ports and Adapters): Isolates core domain logic from external systems.
    • Specification Pattern: Encapsulates business rules for object criteria.
  • Architectural Patterns and Practices:

    • Microservices Architecture: Each bounded context as an independent microservice.
    • Modular Monolith: Organizes bounded contexts into modules within a single application.
    • Event-Driven Architecture: Uses asynchronous events for communication.
    • CQRS: Separates read and write operations into different models.
    • Event Sourcing: Stores domain state as a sequence of events.
  • Integration Patterns:

    • Customer/Supplier: One context provides services to another.
    • Conformist: Dependent context conforms to the model of another.
    • Separate Ways: Contexts operate independently.
    • Shared Kernel: Shared subset of the domain model.
    • Open Host Service: Provides a public interface for interaction.
  • Additional Concepts:

    • Anti-Patterns: Practices to avoid, such as Anemic Domain Model.
    • Bounded Context Diagrams: Visual representations of contexts and interactions.
    • Collaborative Modeling: Engaging experts in the modeling process.
    • Continuous Integration and Deployment (CI/CD): Supports continuous evolution and deployment.
  • Best Practices:

    • Align bounded contexts with business boundaries.
    • Keep contexts small and focused.
    • Maintain clear interfaces between contexts.
    • Avoid overlapping responsibilities.
    • Encourage independent evolution of contexts.
    • Invest in robust documentation.
    • Foster cross-functional teams for collaboration.
  • References and Resources:

    • Recommended books by Eric Evans and Vaughn Vernon.
    • Links to official DDD resources and community sites.

Purpose of the Knowledge Base:

The knowledge base serves as a centralized, comprehensive guide to Domain-Driven Design concepts. It is intended to:

  • Educate: Provide detailed explanations of both strategic and tactical DDD concepts.
  • Facilitate Implementation: Help teams apply DDD principles effectively in their projects.
  • Promote Best Practices: Encourage adherence to proven patterns and practices.
  • Support Collaboration: Enhance understanding between developers, domain experts, and stakeholders.

Impact on the Project:

  • Enhanced Documentation: Offers a valuable resource for team members to reference and learn from.
  • Improved Design Quality: Aids in designing software that closely aligns with business needs.
  • Consistent Terminology: Establishes a common language across the team, reducing misunderstandings.

Next Steps:

  • Review: Team members are encouraged to review the knowledge base for accuracy and completeness.
  • Feedback: Suggestions for improvements or additions are welcome.
  • Integration: Incorporate these concepts into ongoing and future development efforts.

Additional Notes:

  • The knowledge base aligns with the latest best practices in DDD.
  • It avoids code examples to focus on conceptual understanding.
  • All references are verified to ensure they exist and are relevant.

This Pull Request significantly enriches our project's documentation and provides a strong foundation for applying Domain-Driven Design principles effectively.

@neolytian neolytian self-assigned this Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant