π Documentation Cross-ReferencesΒΆ
This document provides cross-references between all the persistence-related documentation in the Neuroglia framework.
ποΈ Persistence Documentation HierarchyΒΆ
Primary GuidesΒΆ
-
ποΈ Persistence Patterns - Start Here
-
Purpose: Complete overview and decision framework for choosing persistence approaches
- Contains: Pattern comparison, complexity levels, decision matrix, implementation examples
-
When to Read: When starting a new feature or project and need to choose persistence approach
-
π Unit of Work Pattern - Core Infrastructure
- Purpose: Deep dive into the coordination layer that works with all persistence patterns
- Contains: UnitOfWork implementation, event collection, pipeline integration
- When to Read: When implementing command handlers or need to understand event coordination
Feature-Specific GuidesΒΆ
-
ποΈ State-Based Persistence - Simple Approach
-
Purpose: Detailed implementation guide for Entity + State persistence pattern
- Contains: Entity design, repositories, command handlers, event integration
-
When to Read: When implementing the simple persistence pattern
-
π― Simple CQRS - Command/Query Handling
-
Purpose: CQRS implementation that works with both persistence patterns
- Contains: Command/Query handlers, mediator usage, pipeline behaviors
-
When to Read: When implementing application layer handlers
-
π§ Pipeline Behaviors - Cross-Cutting Concerns
- Purpose: Middleware patterns for validation, transactions, event dispatching
- Contains: Pipeline behavior implementation, ordering, integration patterns
- When to Read: When implementing cross-cutting concerns like validation or logging
Pattern DocumentationΒΆ
- ποΈ Domain Driven Design - Foundation Patterns
- Purpose: Core DDD patterns and abstractions used by all approaches
- Contains: Entity vs AggregateRoot patterns, domain events, DDD principles
- When to Read: When learning DDD concepts or designing domain models
πΊοΈ Reading Path by Use CaseΒΆ
New to Neuroglia FrameworkΒΆ
- Start with Persistence Patterns for overview
- Read Domain Driven Design for foundation concepts
- Choose specific pattern guide based on your needs:
- Simple: Persistence Patterns - Simple Entity
- Complex: Domain Driven Design Event Sourcing sections
- Learn coordination with Unit of Work
- Implement handlers with Simple CQRS
Implementing Simple CRUD ApplicationΒΆ
- Persistence Patterns β Choose Entity + State Persistence
- Persistence Patterns - Simple Entity β Implementation guide
- Unit of Work β Event coordination
- Simple CQRS β Command/Query handlers
Building Complex Domain with Event SourcingΒΆ
- Persistence Patterns β Choose AggregateRoot + Event Sourcing
- Domain Driven Design β Full DDD patterns
- Unit of Work β Event coordination
- Simple CQRS β Command/Query handlers
- Pipeline Behaviors β Cross-cutting concerns
Migrating Between PatternsΒΆ
- Persistence Patterns β Hybrid approach section
- Unit of Work β Same infrastructure for both patterns
- Specific implementation guides based on source and target patterns
Understanding Event CoordinationΒΆ
- Unit of Work β Core coordination patterns
- Pipeline Behaviors β Event dispatching middleware
- Domain Driven Design β Domain event patterns
Implementing Cross-Cutting ConcernsΒΆ
- Pipeline Behaviors β Core patterns
- Unit of Work β Integration with event coordination
- 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.