Getting Started

Requirements

  • Delphi 12+ (Alexandria) — required for inline variables, generics improvements and managed records
  • Windows — primary target; Linux via FMX/FireMonkey is experimental

Installation

DAF is distributed as a set of Delphi packages (.dpk). Clone the repo and open the group project:

git clone https://github.com/Delphi-DAF/dafce.git

Then open src/DAFGroup.groupproj in Delphi IDE and build all packages.

Alternatively, add the src/[Module]/ paths you need directly to your project’s search path — every module is self-contained.

Your first DAF application

The minimal entry point uses the Hosting + DependencyInjection modules:

program MyApp;

uses
  Daf.Application.Builder;

begin
  TDafApplicationBuilder
    .Create
    .ConfigureServices(procedure(Services: IServiceCollection)
    begin
      Services.AddSingleton<IMyService, TMyServiceImpl>;
    end)
    .Build
    .Run;
end.

Module map

If you need… Use module
DI container DependencyInjection
App lifecycle Hosting
Config files / env vars Configuration
Structured logging Logging
Commands / queries MediatR
BDD specs / tests MiniSpec
NLog-style logging NNLog
Smart pointers / RTTI Commons
HTTP server / routing Web

Next steps