Skip to content

πŸ“š Documentation Cross-ReferencesΒΆ

This document provides cross-references between all the persistence-related documentation in the Neuroglia framework.

πŸ›οΈ Persistence Documentation HierarchyΒΆ

Primary GuidesΒΆ

  1. πŸ›οΈ Persistence Patterns - Start Here

  2. Purpose: Complete overview and decision framework for choosing persistence approaches

  3. Contains: Pattern comparison, complexity levels, decision matrix, implementation examples
  4. When to Read: When starting a new feature or project and need to choose persistence approach

  5. πŸ”„ Unit of Work Pattern - Core Infrastructure

  6. Purpose: Deep dive into the coordination layer that works with all persistence patterns
  7. Contains: UnitOfWork implementation, event collection, pipeline integration
  8. When to Read: When implementing command handlers or need to understand event coordination

Feature-Specific GuidesΒΆ

  1. πŸ›οΈ State-Based Persistence - Simple Approach

  2. Purpose: Detailed implementation guide for Entity + State persistence pattern

  3. Contains: Entity design, repositories, command handlers, event integration
  4. When to Read: When implementing the simple persistence pattern

  5. 🎯 Simple CQRS - Command/Query Handling

  6. Purpose: CQRS implementation that works with both persistence patterns

  7. Contains: Command/Query handlers, mediator usage, pipeline behaviors
  8. When to Read: When implementing application layer handlers

  9. πŸ”§ Pipeline Behaviors - Cross-Cutting Concerns

  10. Purpose: Middleware patterns for validation, transactions, event dispatching
  11. Contains: Pipeline behavior implementation, ordering, integration patterns
  12. When to Read: When implementing cross-cutting concerns like validation or logging

Pattern DocumentationΒΆ

  1. πŸ›οΈ Domain Driven Design - Foundation Patterns
  2. Purpose: Core DDD patterns and abstractions used by all approaches
  3. Contains: Entity vs AggregateRoot patterns, domain events, DDD principles
  4. When to Read: When learning DDD concepts or designing domain models

πŸ—ΊοΈ Reading Path by Use CaseΒΆ

New to Neuroglia FrameworkΒΆ

  1. Start with Persistence Patterns for overview
  2. Read Domain Driven Design for foundation concepts
  3. Choose specific pattern guide based on your needs:
  4. Simple: Persistence Patterns - Simple Entity
  5. Complex: Domain Driven Design Event Sourcing sections
  6. Learn coordination with Unit of Work
  7. Implement handlers with Simple CQRS

Implementing Simple CRUD ApplicationΒΆ

  1. Persistence Patterns β†’ Choose Entity + State Persistence
  2. Persistence Patterns - Simple Entity β†’ Implementation guide
  3. Unit of Work β†’ Event coordination
  4. Simple CQRS β†’ Command/Query handlers

Building Complex Domain with Event SourcingΒΆ

  1. Persistence Patterns β†’ Choose AggregateRoot + Event Sourcing
  2. Domain Driven Design β†’ Full DDD patterns
  3. Unit of Work β†’ Event coordination
  4. Simple CQRS β†’ Command/Query handlers
  5. Pipeline Behaviors β†’ Cross-cutting concerns

Migrating Between PatternsΒΆ

  1. Persistence Patterns β†’ Hybrid approach section
  2. Unit of Work β†’ Same infrastructure for both patterns
  3. Specific implementation guides based on source and target patterns

Understanding Event CoordinationΒΆ

  1. Unit of Work β†’ Core coordination patterns
  2. Pipeline Behaviors β†’ Event dispatching middleware
  3. Domain Driven Design β†’ Domain event patterns

Implementing Cross-Cutting ConcernsΒΆ

  1. Pipeline Behaviors β†’ Core patterns
  2. Unit of Work β†’ Integration with event coordination
  3. Simple CQRS β†’ Handler integration

πŸ”— Key RelationshipsΒΆ

All Patterns Use Same InfrastructureΒΆ

  • Unit of Work coordinates events for both Entity and AggregateRoot patterns
  • Pipeline Behaviors provide cross-cutting concerns for both approaches
  • CQRS/Mediator handles commands/queries regardless of persistence pattern
  • Domain Events work the same way in both simple and complex patterns

Complexity ProgressionΒΆ

Entity + State Persistence (β­β­β˜†β˜†β˜†)
    ↓ (add business complexity)
AggregateRoot + Event Sourcing (⭐⭐⭐⭐⭐)
    ↓ (mix both approaches)
Hybrid Approach (β­β­β­β˜†β˜†)

Framework Integration PointsΒΆ

  • Unit of Work ← All persistence patterns use this for event coordination
  • Pipeline Behaviors ← All handlers use this for cross-cutting concerns
  • Mediator ← All commands/queries route through this
  • Domain Events ← All patterns raise events, same dispatching mechanism

πŸ“– Quick ReferenceΒΆ

I Need To... Read This First Then Read
Choose persistence approach Persistence Patterns Pattern-specific guide
Implement simple CRUD Persistence Patterns - Simple Entity Unit of Work
Build complex domain Domain Driven Design Unit of Work
Coordinate events Unit of Work Pipeline Behaviors
Implement handlers Simple CQRS Pipeline Behaviors
Add validation/logging Pipeline Behaviors Unit of Work
Understand DDD concepts Domain Driven Design Persistence Patterns

This documentation structure ensures you can find the right information for your specific use case while understanding how all the pieces work together in the Neuroglia framework.