Architecture Overview

Layer model

DAF follows a layered architecture where each module has a corresponding Abstractions companion:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚            Your Application             β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Application  β”‚  Hosting  β”‚  MediatR    β”‚  ← Composition
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Logging β”‚   Config  β”‚   DI    β”‚ NNLog  β”‚  ← Services
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚         Commons Β· Rtti Β· Threading      β”‚  ← Foundation
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Abstractions pattern

Every service module ships as a pair:

Package Role
Daf.X.Abstractions Interfaces only β€” no implementation
Daf.X Concrete implementation + registration helpers

Your app code depends only on Abstractions. Implementations are swappable at composition root.

Dependency flow

Application
  └── Hosting
        β”œβ”€β”€ DependencyInjection
        β”œβ”€β”€ Configuration
        └── Logging
              └── NNLog (provider)

Testing with MiniSpec

MiniSpec is independent of the rest of the stack. It can test any Delphi code using Gherkin-style specs:

Feature('Calculator')
  .Scenario('Add two numbers')
  .Given('a calculator')
  .When('I add 2 and 3')
  .Then('the result is 5');

See the MiniSpec module for the full guide.