Skip to content

Base

Class Diagrams

Classes

Key Components

  1. DynamicEntity

  2. Defines a dynamic, attribute-driven entity capable of holding runtime-configurable key-value pairs.

  3. Useful for extending predefined entities with flexible, non-static attributes to address unique business requirements.

  4. EntityId

  5. Provides a universal mechanism for uniquely identifying entities using UUID or custom string-based keys.

  6. Forms the foundation for consistent and reusable entity identification across the MachC ecosystem.

  7. IdentifiedObject

  8. Introduces an interface that standardizes unique identification for domain objects.

  9. Ensures that all identifiable entities implement coherent getters for UUIDs and secondary keys.

  10. Dynamic Attributes Management

  11. Enables support for customizable runtime attributes through a consistent attribute-container design pattern.

  12. Allows entities like products or orders to store additional key-value properties beyond static attributes.

  13. Utilities for Entity Abstraction

  14. Additional utilities are provided to simplify common functionalities like serialization, mapping identifiers, and handling dynamic characteristics.

  15. Fosters reusability, eliminating duplication in domain-specific entities.

Clean Architecture Alignment

The MachC Base Domain Library adheres to Clean Architecture principles by providing:

  • Core Abstractions: Ensuring that essential entities and interfaces remain independent of business-specific layers.
  • Reusability: These base entities are designed to be reused across various domains, minimizing redundancy.
  • Extensibility: Offers a robust framework for extending the foundational elements into higher-level domain-specific entities, such as products, orders, and users.

Why Use the MachC Base Domain Library?

  1. Scalability:

Built to serve as the core for large-scale applications, enabling seamless integration and extension as business demands grow.

  1. Consistency Across Domains:

The use of shared identifiers and standardized entity structures ensures uniformity, reducing complexity in multi-domain systems.

  1. Flexibility:

With DynamicEntity and related abstractions, developers have the freedom to enhance entities at runtime without modifying core logic.

  1. Foundation for Domain-Specific Libraries:

Acts as the groundwork upon which all other domain libraries (e.g., User, Product, Order) are built, ensuring a cohesive architecture.

Use Cases

  • Universal Identifiers: Use EntityId and IdentifiedObject to standardize unique identification across various domains.
  • Runtime Flexibility: Use DynamicEntity to add key-value pairs dynamically for entities like products, users, or orders.
  • Interoperability: Ensures integration between multiple domain libraries while maintaining independence and modularity.
https://www.free-Counters.org