Lê em português? O índice completo em português — a mesma cobertura, organizada do mesmo jeito — está em Features_Implemented_Index.pt-br.md. Se o português for mais confortável, clique e leia o documento inteiro por lá.
Exhaustive master index of implemented features in Dext 1.0. Each item points at the implementation unit under Sources/.
Organized by module — Core, Web, ORM, Networking, Testing, and the rest of the ecosystem — so each capability lives in one canonical chapter.
Important
Source-audited. Unique bullets were kept; copy-paste duplicates were removed. Overlapping write-ups were merged.
Next reads: Dext Book · Compatibility matrix · .NET parity
- Core Foundation — DI, JSON, configuration, types, threading, jobs
- Collections — lists, dictionaries, LINQ, SIMD, channels
- Web Framework — Minimal APIs, Controllers, middleware, DataAPI, HTTP/2, SSR
- ORM & Entity — DbContext, queries, dialects, EntityDataSet
- Networking — REST client, Redis, TLS, sockets, MQTT, gRPC
- Event Bus
- Testing & Quality
- Template Engine
- Validation
- Mapper
- Multi-Tenancy
- Desktop UI & Design-Time
- CLI & Scaffolding
- Observability
- AI Skills
- MCP Server
Dext was designed to leverage modern Object Pascal while keeping a documented compatibility floor. Implementation lives in Sources\Core and Sources\Core\Base.
- Architectural minimum: Delphi 2010 (Extended RTTI, Generics, Attributes).
- Compile floor: Delphi XE2 and higher, with Indy HTTP fallback below XE8 (
TDextIndyHttpEngine). - Tier 1 (full): 10.4 Sydney, 11 Alexandria, 12 Athens — primary development and CI.
- Tier 2 (supported): 10.1 Berlin – 10.3 Rio — no inline variables; backported sync primitives.
- Web Stencils: Delphi 12.2+ (Windows). Gated by
DEXT_ENABLE_WEB_STENCILSinDext.inc.
See the Delphi Compatibility Matrix for feature-by-feature compiler requirements.
- TReflection — High-performance static facade for Delphi's RTTI system. Maintains a globally shared
TRttiContext. - Metadata Cache (
TTypeMetadata) — Global cache of type metadata (properties, fields, attributes) with thread-safe initialization viaTMREWSync(Multiple-Read Exclusive-Write). Hot-paths are lock-free. - Smart Properties (
Prop<T>,Nullable<T>,Lazy<T>) — Automatic detection of generic wrappers viaPTypeInfo.Nameanalysis. The metadata cache storesIsSmartProp,IsNullable,IsLazy,InnerType, and direct pointer to theFValuefield. - Property Path Resolution — Recursive resolution of nested paths (e.g.,
User.Address.Street) viaTReflection.GetPropertyValuewithTRttiPropertycaching per segment. - Custom Attribute Scanning —
GetAttributes<T>andHasAttribute<T>with scanning on fields, properties, and methods. Used by DI, Validation, JSON, and ORM. - Property Handlers —
TPropertyHandlerfor optimized property access with getter/setter caching.
- TDextServices — Fluent facade for service registration. Methods:
AddSingleton<T>,AddTransient<T>,AddScoped<T>,AddSingletonInstance<T>,AddSingletonFactory<T>. - Interface/Implementation Mapping — Complete decoupling between definitions and concrete logic.
- TServiceCollection — Internal repository of
TServiceDescriptorwith reverse search (LIFO) to allow registration overrides. - TDextServiceProvider — IoC container with hybrid storage:
FSingletonInstances(ARC/Interfaces) +FSingletonObjects(Non-ARC/Manual Classes) +FScopedInstances/FScopedObjectsfor scoping. - Lifecycles —
Singleton(global single instance),Transient(new instance per resolution),Scoped(single instance per DI scope viaCreateScope). - Scope Isolation —
IServiceScopewithTDextServiceScopecreating an isolated child provider. Scope destruction releases all scoped objects. - Auto-Collections — Automatic resolution of
IList<T>,IEnumerable<T>,IDictionary<K,V>viaTActivator.IsListType/IsDictionaryType. - DI Attributes —
[Inject]for property/field injection,[ServiceConstructor]for explicit constructor selection, overriding the Greedy strategy.
- TActivator — Central RTTI-based dynamic instantiation engine with 4
CreateInstanceoverloads:- Manual — Explicit positional arguments.
- Pure DI (Greedy Strategy) — Selects the constructor with the MOST resolvable parameters from the container. Prioritizes the most derived class in case of a tie.
- Hybrid — Initial positional arguments + DI resolution for the rest.
- PTypeInfo-based — Instantiation by
PTypeInfo(supports classes and interfaces, including auto-instantiation of collections).
- [ServiceConstructor] Attribute — First-pass priority over the Greedy strategy.
- Constructor Cache — Thread-safe cache (
TMREWSync) ofTConstructorEntry(method +PTypeInfoarray of parameters) to avoid redundant RTTI scanning. - Field/Property Injection —
InjectFieldsprocesses[Inject]on fields and properties after construction, supporting customTargetTypeInfo. - Default Implementation Registry —
RegisterDefault(TBase, TImpl)andRegisterDefault<TService, TImpl>for base→implementation mapping (e.g.,TStrings→TStringList).
- TDextJson — Static facade for serialization/deserialization with
Serialize<T>andDeserialize<T>. - Driver Architecture — Pluggable
IDextJsonProvider(DextJsonDataObjectsdefault,System.JSONalternative). Drivers implementCreateObject,CreateArray,Parse. - TJsonSettings (Fluent Record API) — Immutable configuration via chaining:
.CamelCase,.SnakeCase,.PascalCase,.EnumAsString,.EnumAsNumber,.IgnoreNullValues,.CaseInsensitive,.ISODateFormat,.UnixTimestamp,.CustomDateFormat(fmt),.ServiceProvider(p). - Automatic Casing (
TCaseStyle) — 5 modes:CaseInherit,Unchanged,CamelCase,PascalCase,SnakeCase. Automatically applied during serialization. - Enum Serialization (
TEnumStyle) —AsNumber(ordinal) orAsString(RTTI enum name). - Date Formats (
TDateFormat) —ISO8601,UnixTimestamp,CustomFormat. Default:yyyy-mm-dd"T"hh:nn:ss.zzz. - DOM Abstraction —
IDextJsonNode,IDextJsonObject,IDextJsonArraywith strong typing (6 node types: Null, String, Number, Boolean, Object, Array). - TJsonBuilder — Fluent builder for programmatic JSON construction without strings.
- Attributes —
[JsonName](rename field),[JsonIgnore](exclude field),[JsonCaseStyle](class-level override). - Architectural Profiles:
- Dext DOM (IDextJsonNode) — Optimized for 99% of use cases (REST APIs, Configs). High-speed random access and object manipulation via in-memory tree (DataObjects engine).
- Dext UTF-8 (Low-Level Streaming) — Surgical tool for Big Data. Zero-allocation sequential processing of massive volumes (GBs) with constant memory footprint.
- TUtf8JsonSerializer (
Dext.Json.Utf8.Serializer) — Zero-allocation record serializer. Operates directly onTByteSpan(raw UTF-8) without intermediatestringconversion.TJsonRecordInfocaching perPTypeInfoto eliminate RTTI overhead in hot-paths.ToUtf8JSONin theDextJsonDataObjectsdriver for native UTF-8 output. - S54 Direct Codecs —
Dext.Core.TypeModel,Dext.Core.DirectAccess,Dext.Codecs.Registry,Dext.Serialization.Protobuf,TDextJson, ORM hydration, and the codecs CLI share field plans, enabling direct offset reads/writes, generated protobuf codec registration, static gRPC dispatch by invoker, nested object/list support with explicit ownership, SmartProp/Nullable edge cases,TGUID/TUUID, and.protoexport from code-first DTOs. IDE Expert diagnostics are documented as deferred DX work.
-
TDextConfiguration (Fluent Builder) —
.AddJsonFile(path),.AddYamlFile(path),.AddEnvironmentVariables(prefix),.AddCommandLine(args, mappings),.AddUserSecrets(secretsId),.AddInMemoryCollection. -
TConfigurationRoot — Multi-provider aggregator with LIFO precedence (last registered wins). Implements
IConfiguration. -
5-Layer Standard Precedence Pipeline — (1) Base JSON/YAML
$\rightarrow$ (2) Environment JSON/YAML$\rightarrow$ (3) User Secrets (Development only)$\rightarrow$ (4) OS Environment Variables$\rightarrow$ (5) Command-line Arguments (CLI). -
CommandLine Configuration Provider (
Dext.Configuration.CommandLine) — High-performance argument parsing supporting--Key=Value,/Key=Value, space-delimited--Key Value, double-underscore mapping (--Key__SubKey=Value$\rightarrow$ Key:SubKey), boolean flags, and custom switch aliases dictionary (-p$\rightarrow$ Server:Port). -
User Secrets Configuration Provider (
Dext.Configuration.UserSecrets) — Storage and isolation of development credentials outside git repository (%APPDATA%\Dext\UserSecrets\<Id>\secrets.jsonon Windows,~/.dext/usersecrets/<Id>/secrets.jsonon Linux/macOS). -
Hierarchical Keys — Access via
:separator (e.g.,Database:ConnectionString).GetSection(key)returns sub-tree. -
Options Pattern —
IOptions<T>for typed binding of configuration sections to classes; optional validator callback onConfigure<T>; ValidateOnStart (S68) eagerly resolves and validates duringTWebApplication.BuildServicesbefore the host listens (raisesEConfigurationException). -
Section Validators —
AddSectionValidator(section, validator)for startup configuration validation. -
Change Tracking —
IChangeTokenwithOnReloadcallback for hot-reload configuration.
- TUUID (
Dext.Types.UUID) — RFC 9562 compliant type with Big-Endian storage (Network Byte Order).NewV4(random),NewV7(time-ordered, 48-bit Unix timestamp ms + random). Implicit bidirectional conversion withTGUID(automatic endianness swap) andstring. Operators=and<>viaCompareMem. Compatible with PostgreSQLuuidand Web APIs. - Nullable<T> (
Dext.Types.Nullable) — Generic wrapper for nullable value types.HasValue,Value,GetValueOrDefault,Clear. Implicit operators:T→Nullable<T>,Nullable<T>→T,Variant→Nullable<T>,Nullable<T>→Variant. Comparison viaTEqualityComparer<T>.Default.TNullableHelperfor low-level access via rawPTypeInfowithout generics. - Lazy<T> (
Dext.Types.Lazy) — Thread-safe lazy initialization viaTCriticalSection(double-checked locking).ILazyandILazy<T>interfaces.TLazy<T>(factory-based) andTValueLazy<T>(pre-computed). Implicit operators:T→Lazy<T>,Lazy<T>→T,TFunc<T>→Lazy<T>. Ownership management:AOwnsValueparameter controls if the value is destroyed with the lazy wrapper.
- TEntityType<T> (
Dext.Entity.TypeSystem) — Separate definition classes for queries. Allows separating data from metadata by working with pure POCOs, generating the same expression trees without embeddingProp<T>in the entity itself. Ideal for legacy systems or strict separation. - Prop<T> (
Dext.Core.SmartTypes) — Generic record operating in dual mode: (1) Runtime Mode — stores valueTnormally, (2) Query Mode — generates expression trees (IExpression/ AST) automatically via operator overloading. The central pillar of Dext's LINQ-like fluent DSL. - BooleanExpression — Hybrid record that can contain a literal
BooleanOR anIExpressionnode (AST). Operatorsand,or,not,xorautomatically generateTLogicalExpressionnodes in query mode. - Type Aliases —
StringType,IntType,Int64Type,BoolType,FloatType,CurrencyType,DateTimeType,DateType,TimeType— semantic aliases forProp<T>that make entities self-documenting. - Full Operator Overloading —
=,<>,>,>=,<,<=,+,-,*,/, unary negation — all generateTBinaryExpressionwithboEqual,boGreaterThan, etc., in query mode. - String Methods —
Like,StartsWith,EndsWith,ContainsgenerateTFunctionExpressionwith the corresponding operation. - Collection Methods —
In(values),NotIn(values),Between(lower, upper),IsNull,IsNotNull. - OrderBy —
Prop.Asc/Prop.DescreturnIOrderByfor sorting composition. - IPropInfo — Ported metadata carrying the physical column name, injected by
TPrototype. - TQueryPredicate<T> —
function(Arg: T): BooleanExpressiondelegate used by the ORM as a query predicate. - Expression Tree Nodes (
Dext.Specifications.Types) —TPropertyExpression,TLiteralExpression,TConstantExpression,TBinaryExpression,TLogicalExpression,TUnaryExpression,TFunctionExpression,TFluentExpression. - Nullable<T> Interop — Implicit bidirectional conversion between
Prop<T>andNullable<T>. - Variant Interop — Implicit bidirectional conversion between
Prop<T>andVariant.
- TValueConverterRegistry — Global converter registry with 3-level lookup: (1) Exact Match by
PTypeInfopair, (2) Kind Match byTTypeKindpair, (3) Fallback fortkVariantsource. - TValueConverter — Execution engine orchestrating conversions, with automatic handling of Smart Types (
Prop<T>) andNullable<T>(detected viaTReflection.GetMetadata). - 20+ Built-in Converters —
Variant→Integer/String/Boolean/Float/DateTime/Date/Time/Enum/GUID/Class/TBytes/TUUID,Integer→Enum/String,String→GUID/TBytes/TUUID/Integer/Float/DateTime/Boolean,Float→String,Boolean→String,Class→Class. - TBcd & ftFMTBcd First-Class Support — Bidirectional zero-alloc converters:
TBcd<->Currency,TBcd<->Double,TBcd<->string(invariant),TBcd<->Integer/Int64,Variant<->TBcd,String<->TBcd,Float<->TBcd,Currency<->TBcd. Provides end-to-end precision preservation for high-precisionNUMERIC/DECIMALdatabase columns. - ConvertAndSet / ConvertAndSetField — Conversion + assignment via RTTI in a single call (used by ORM and Model Binding).
- TSpan<T> — Zero-allocation reference to a contiguous memory region.
Slice,ToArray,Clear,GetEnumerator(for-in). Bounds checking on all accesses. - TVector<T> — Efficient, growable stack-allocated vectors for high-speed buffer management.
- TReadOnlySpan<T> — Immutable version of
TSpan<T>. Implicit operatorTSpan<T>→TReadOnlySpan<T>andTArray<T>→TReadOnlySpan<T>. - TByteSpan — Specialized span for bytes.
EqualsviaTDextSimd.EqualsBytes(SIMD-accelerated).EqualsStringcompares with UTF-8 without allocation.IndexOf,ToString(UTF-8→string),ToBytes. Optimized for JSON/REST parsers and network protocols. - ILifetime<T> (
Dext.Core.Memory) — ARC wrapper for Non-ARC object lifecycle management.TLifetime<T>encapsulates an object and automatically releases it when the interface goes out of scope. - IDeferred / TDeferredAction (
Dext.Core.Memory) — Defer pattern (Go-inspired). Action executed automatically in the destructor when the interface goes out of scope. Useful for temporary resource cleanup.
- TAsyncTask — Fluent Async/Await implementation for asynchronous operations.
- Work-Stealing Scheduler — Efficient task distribution across CPU cores for maximum parallel performance.
- ICancellationToken — Cooperative cancellation with
WaitForCancellation(timeout)andIsCancellationRequested. Integrated with Event Bus Lifecycle and Background Services. - Windows Processor Groups — Native support for Windows machines with >64 logical cores. Automatically detects multiple processor groups and binds worker threads using
SetThreadGroupAffinityto scale and balance workloads. - GetSystemLogicalProcessorCount — Helper that queries system-wide processor topology across all groups on Windows (falling back to standard
CPUCounton other platforms) to prevent under-provisioning of server IO workers. - Round-Robin Group Affinity — Auto-allocator that distributes worker threads evenly across available NUMA nodes and processor groups.
- TDextPool<T> — High-performance thread-safe generic object pool with
TSpinLock,ManualResetevent broadcast, atomic waiter tracking, and monotonic deadline timeouts (AcquireTimeoutMs). - Automatic Recycling (
IPoolable) — Automatic execution ofResetStateupon objectReleaseback to the pool. - Drain-Before-Free Protocol — Atomic shutdown with broadcast (
FAvailableEvent.SetEvent) and waiter drain waiting (FActiveWaiters = 0) preventing use-after-free. - MapFast HTTP Fallback 503 — Automatic
HTTP 503 Service Unavailableresponse inApp.MapFast<TDbContext>endpoints upon context pool exhaustion.
- ILoggerFactory — Factory for loggers with multiple provider registration.
CreateLogger(categoryName)returns a compositeILogger. - ILogger — Interface with methods per level:
Trace,Debug,Information,Warning,Error,Critical. Structured template support with placeholders. - Aggregate Logger — Each
ILoggercreated by the factory aggregates all registered providers, dispatching every log entry to all simultaneously. - TBatchingTelemetrySink — Base abstract asynchronous batching sink with queue buffering, thread-safe synchronization, and background thread execution.
- TSeqLogSink — Compact Log Event Format (CLEF) structured logger sink sending batches to Seq servers over HTTP.
- TOTLPTelemetrySink — OpenTelemetry (OTLP/HTTP JSON) telemetry sink for exporting Logs to OTel collectors (SigNoz, Datadog).
- TTelemetrySinkRegistry — Pluggable sink creator registry decoupling circular dependencies between package layers.
- Fluent Logging Builders — Startup extensions supporting
AddSeq()andAddOpenTelemetry()with custom batching and service settings.
- IDextWriter — Thread-safe abstraction for framework output. Implementations:
TConsoleWriter(stdout),TWindowsDebugWriter(OutputDebugString with buffering),TStringsWriter(TStringList/TMemo),TNullWriter(silent). - SafeWrite / SafeWriteLn (
Dext.Utils) — Global functions routing output via the activeIDextWriter. Automatic console detection. Native Unicode writing viaWriteConsoleW(Windows) with UTF-8 fallback for pipes. - SafeAttachConsole — Attach to parent process console (CMD/PowerShell) or
AllocConsolefor F5-executed GUI applications.
- TDextEscaping — Centralized text escaping utilities:
Html,Xml,Json(manual character-by-character with\uXXXXsupport),Url. Used by Reporters, Serializers, and RestClient.
- TryParseISODateTime — Robust ISO 8601 parser (
YYYY-MM-DDTHH:NN:SS.ZZZ) with support for variations (separatorTor space, optional milliseconds). - TryParseCommonDate — Multi-format parser: ISO 8601 →
dd/mm/yyyy→mm/dd/yyyy→yyyy/mm/ddwith automatic format detection.
- IResiliencePipeline / TResiliencePipeline — Fluent record wrapper and interface exposing Polly-style policies. Synchronous and asynchronous generic/non-generic execution support (
Execute<T>andExecute). - Retry Policy (
TRetryPolicy) — Handles transient failures with customizable retry count and backoff strategies (linear, exponential backoff with jitter). - Circuit Breaker Policy (
TCircuitBreakerPolicy) — ImplementsClosed,Open, andHalf-Openstates, failing fast and throwingECircuitBrokenExceptiononce failure thresholds are exceeded. - Fallback Policy (
TFallbackPolicy) — Intercepts exceptions and returns fallback alternative values or executes fallback actions. - Timeout Policy (
TTimeoutPolicy) — ThrowsETimeoutExceptionwhen operations exceed set duration limits using cooperative task cancellation and asynchronous futures. - RestClient Integration —
TRestClientnatively integrates with the resilience engine, enabling backwards-compatible.Retry()and.Timeout()methods, plus custom pipeline configuration.
IJobStorage— Decoupled storage abstraction supporting multiple providers.IJobClient/TDextJobs— Thread-safe enqueueing client and static utility facade (TDextJobs.Enqueue<T>,TDextJobs.Schedule<T>).TInMemoryJobStorage— Memory-only job storage provider designed for rapid local testing.TSqliteJobStorage— SQLite database job persistence provider using FireDAC, supporting automated schema creation and transactional safety.TJobServer/TBackgroundJobsService— Robust multi-threaded background worker engine running as anIHostedService(TBackgroundService), polling, locking, executing, and monitoring jobs.TJobSerializer— RTTI-based method parameter serializer using Dext JSON DOM to serialize and deserialize class method parameters (TValuearrays).
High-performance collections in Sources\Core. Binary Code Folding (TRawList) consolidates generic specializations into a single raw-memory engine (compile times down by up to 60%). CPU-friendly dictionaries (TRawDictionary, open addressing) are up to 6.6× faster than RTL lookups; SIMD scans (Dext.Collections.Simd, AVX2/SSE2) up to 6.8× on native lists.
-
TRawList<T> — Backbone of all collections. Generic list based on dynamic arrays with
Move-based insertion/deletion to minimize overhead.for-insupport via custom enumerator. -
TList<T> / IList<T> — High-performance generic list. Operations:
Add,Insert,Remove,IndexOf,Sort,BinarySearch,Contains,ToArray. -
TDictionary<K,V> / IDictionary<K,V> — Generic hash map supporting
TryGetValue,AddOrSetValue,ContainsKey,Keys,Values. -
TOrderedDictionary<K,V> / IOrderedDictionary<K,V> — Generic insertion-ordered hash map combining
$O(1)$ key lookups with dense insertion-order iteration, positional indexing (KeyAt,ValueAt,PairAt,IndexOf), andOwnsValuesobject lifecycle management. Backed byTRawOrderedDictto prevent code bloat. -
THashSet<T> / IHashSet<T> — Set of unique values with set theory operations:
UnionWith,IntersectWith,ExceptWith. -
TCollections (Factory) — Static factory:
CreateList<T>,CreateDictionary<K,V>,CreateOrderedDictionary<K,V>,CreateHashSet<T>,CreateSortedList<T>, etc. - TSmartEnumerator<T> — Extensible base enumerator for custom iteration in derived collections.
- Fluent Operations —
Where,Select,OrderBy,OrderByDescending,First,FirstOrDefault,Last,Any,All,Count,Sum,Min,Max,Average,Distinct,Take,Skip,GroupBy,SelectMany,Aggregate,Contains,ToList,ToDictionary,ForEach.
- TConcurrentDictionary<K,V> — Thread-safe dictionary with Lock Striping via
TSpinLockarray (multiple independent lock buckets to reduce contention). - TConcurrentQueue<T> / TConcurrentStack<T> — Thread-safe queue and stack for producer/consumer scenarios.
- TFrozenDictionary<K,V> / TFrozenSet<T> — Immutable structures optimized for high-read scenarios (.NET 8
FrozenDictionarystyle). Once constructed, no modifications are allowed, enabling memory layout optimizations.
- TChannel<T> — Go-style async communication primitive for Producer/Consumer pipelines.
- Bounded Channel — Fixed capacity with back-pressure (writer blocks when full).
- Unbounded Channel — Unlimited capacity (writer never blocks).
- ChannelReader / ChannelWriter — Segregated interfaces for reading and writing.
- TDextSimd — Vectorized operations with automatic instruction set detection:
EqualsBytes— Byte array comparison via AVX2 (32 bytes/cycle), SSE2 (16 bytes/cycle), or Pascal fallback.IndexOfByte— Linear search accelerated via vector instructions.FillByte/MoveMem— Optimized memory fill and copy.
- Runtime Detection — CPUID detection at startup. Automatic selection of the best available path.
- TEqualityComparer<T> / TComparer<T> — Standard generic comparers supporting primitives, records, and classes.
- Algorithms —
Sort(IntroSort),BinarySearch,Reverse,Shuffle.
- TWebApplication — Fluent facade for initialization: automatically loads
appsettings.json,appsettings.yaml, Environment Variables, registers services, and builds the pipeline in a single chain. - Minimal API — Direct handler registration via delegates without controllers (
app.MapGet,app.MapPost,app.MapQuery). - FastPath (
app.MapFast) — High-throughput route handler bypassing DI Scope creation and RTTI activation for minimal latency and maximum RPS. - Data API Direct UTF-8 Streaming (
Db.UseSql) — Execution of native SQL queries with direct UTF-8 serialization and socket stream writing (Res.GetOutputStream) without intermediateTJsonObjectheap allocations. - HTTP QUERY Mapping — Safe, idempotent data retrieval endpoints utilizing structured request bodies.
MVC-style, class-based endpoints discovered by RTTI — the counterpart to Minimal APIs when a domain grows past a handful of MapGet lambdas.
[ApiController]/[ApiController('/prefix')]— Marks a class as a controller. Optional prefix on the attribute, or split.NET-style with[Route('/api/users')].- Verb attributes —
[HttpGet],[HttpPost],[HttpPut],[HttpPatch],[HttpDelete],[HttpHead],[HttpOptions],[HttpQuery]. Parameter routes must start with/(e.g.[HttpGet('/{id}')]). AddControllers+MapControllers—TControllerScannerfinds[ApiController]types, registers them in DI, and maps actions before Swagger.- Constructor injection — Services resolved by the DI container (
IUserService,ILogger,TDbContext, …). IResultactions —Results.Ok,Created,Accepted,NoContent,BadRequest,NotFound,ValidationProblem,StatusCode,Json<T>.- Do not name an action
Create— Conflicts with Delphi constructors (E2254). UseCreateUser,CreateOrder, etc.
- Chain of Responsibility — Functional (anonymous delegates) and class-based middlewares with DI constructor injection.
- Built-in Middlewares:
- HTTP Logging (
THttpLoggingMiddleware) — Request/response logging with configurable case-insensitive redaction (RedactHeaders) for sensitive headers (Authorization,Cookie,Set-Cookie,X-API-Key). - Exception Handling (
TExceptionHandlerMiddleware) — Global exception handling adhering to RFC 9457 (Problem Details, obsoleting RFC 7807), UUIDv7TraceIdcorrelation fallback, and environment-drivenE.Messagesanitization on status 500 errors in Production mode. Domain rule violations viaEDomainException/EDomainValidationExceptionmap to HTTP 422 withtypehttps://dext.dev/errors/domain-validation(S68). - DeveloperExceptionPage (
TDeveloperExceptionPageMiddleware) — Rich exception page and stack trace viewer for development mode. - CORS (
TCorsMiddleware) — Strict CORS preflight checking (OPTIONSwithOriginandAccess-Control-Request-Method), allowlist validation for Origin, Method, and Headers returning403 Forbiddenon invalid preflights, startup fail-fast againstAllowAnyOrigin + AllowCredentials, and cleanVary: Originheader merging. - Rate Limiting (
TRateLimitMiddleware) — Traffic control emitting standard RFC 9333 headers (RateLimit-Limit,RateLimit-Remaining,RateLimit-Reset,Retry-After) on both allowed and HTTP 429 rejected requests. - Response Caching (
TResponseCacheMiddleware) — Server-side HTTP response caching with strict protection against caching authenticated requests (Authorization, session/auth cookies), rejection of responses withSet-Cookieorprivate/no-store/no-cachedirectives, and automatic reconstruction ofCache-Control: public, max-age=Nheaders on cache HITs. - Compression (
TCompressionMiddleware) — Response compression via GZip. - Security Headers (
TSecurityHeadersMiddleware) — Injection of HSTS,X-Content-Type-Options,X-Frame-Options, andX-XSS-Protection. - Feature Flags (
Dext.FeatureFlags) —IFeatureManager/TFeatureManagerreadsFeatureManagement:*live from configuration; host enables JSON/YAML ReloadOnChange;TFeatureConfiguration.ReloadforcesIConfigurationRoot.Reload(S68). Boolean flags,TPercentageFilter(deterministic rollout per user/tenant key),TTimeWindowFilter(ISO-8601 window), customIFeatureFilter, and[FeatureGate('FeatureName')]. - Forwarded Headers (
TForwardedHeadersMiddleware) — Zero-Trust processing ofX-Forwarded-For,X-Forwarded-Proto, andX-Forwarded-Hostfrom trusted reverse proxies (NGINX, Caddy, Cloudflare, Traefik), withKnownProxies, CIDR subnets, and hop limits against IP spoofing. - Antiforgery CSRF (
IAntiforgery) — HMAC-SHA256 tokens, constant-time comparison, Origin/Host validation, Double Submit Cookie, andX-CSRF-TOKEN/X-XSRF-TOKEN(SSR forms and HTMX). - Base Path Hosting (
UsePathBase) — Support for serving under path prefixes (app.UsePathBase('/myapp')), engine-agnostic path stripping (TDextPathBaseMiddleware),Request.PathBasepopulation, and app-relative URL builder (Request.ToAppUrl('/route')). Native HTTP.sys kernel prefix registration (http://+:8080/myapp/).
- HTTP Logging (
-
Dynamic Parameters — Routes with
{id},{slug}, and type constraints. -
API Versioning —
THeaderApiVersionReader,TQueryStringApiVersionReader,TPathApiVersionReader,TCompositeApiVersionReader(composite strategy). -
HTTP QUERY Discovery — Automatic
OPTIONSrouting generating standardAllowandAccept-Queryheaders carrying configured query media types (e.g.application/jsonpath). -
Radix Tree (Trie) Routing Matching — Path segment route scanning replaced with an optimized
TRouteNodetree structure, achieving$O(L)$ path matching complexity (where$L$ is path segment depth) and deterministic route resolution. -
Backtracking Segment Traversal — Fully supports literal matching, path parameters (
{param}), and wildcard parameters with segment-by-segment backtracking to resolve overlaps. -
Zero-Allocation Request Metadata Mapping — Bypasses RTTI-heavy dynamic wrapping (eliminating dictionary and
TValueheap allocations) by directly exposing and assigningEndpointMetadataviaIHttpContextproperties on matched routes.
- Hybrid Binding —
[FromBody],[FromQuery],[FromRoute],[FromHeader],[FromServices]attributes. - Zero-Allocation — Direct UTF-8 deserialization to records and classes via
TByteSpan. - Multipart/Form-Data — Upload processing via
IFormFileabstraction. - Object Lifecycle Management — Tracking of objects created by Model Binding with integration to ORM ChangeTracker for automatic ownership transfer.
- Binding Problem Details (S68) — Conversion failures return HTTP 400 with
application/problem+json(Results.BindingProblem/ RFC 9457:type,title,status,detail,instance). - Auto-Validation Problem Details (S68) — Failed attribute/fluent validation in
THandlerInvokeremitsResults.ValidationProblem(application/problem+jsonwitherrorsmap). - Results.Accepted (S68) — Semantic HTTP 202 factory with optional
Locationheader (mirrorsCreated). - Results.UnsupportedMediaType (S68 P2-05 partial) — Semantic HTTP 415 factory for application-level media rejection (e.g. upload extension checks).
- Content Negotiation —
IOutputFormatter/IOutputFormatterSelector/AddContentNegotiation. HonorsAccept(JSON formatter built-in; pluggable formatters for additional media types).
- IWebHost / IWebHostBuilder — Hosting abstractions. Support for Dynamic Ports (Port 0) with automatic OS assignment.
- Server Adapters — Indy (default, OpenSSL/Taurus SSL), WebBroker Adapter (ISAPI/CGI for IIS/Apache), DCS Adapter (Delphi-Cross-Socket, non-blocking), and Native Server Engine (kernel-mode
http.syson Windows and non-blockingepollsockets on Linux). - Zero-Allocation HTTP Parser (
TDextIocpHttpParser) — Incremental parsing of HTTP/1.1 request headers directly from network buffers without intermediate heap allocations. - IHostedService — Background tasks with
StartAsync/StopAsync.TBackgroundServicewithExecute(ICancellationToken). - IHostApplicationLifetime — Tokens for
ApplicationStarted,ApplicationStopping,ApplicationStopped. ServerEngineOptions(Dext.Server.Engine.Types.pas) — Global entry function and fluent helpers (WithHttps,WithSslCertHash,WithIoThreads,WithReceiveBufferSize) for clean, zero-boilerplate HTTPS server setup.TRestClient.IgnoreCertificateErrors / AllowSelfSigned(Dext.Net.RestClient.pas) — Fluent API for explicit SSL/TLS certificate validation control in REST clients, enabling HTTPS connections with self-signed development certificates.
- Thread Core Affinity (CPU Pinning): Auto-binding of I/O worker threads (
TDextEpollWorker) to dedicated CPU cores viapthread_setaffinity_npto avoid scheduler migration overhead and maximize cache locality. - Kernel-level Pre-acceptance Optimization: Implements socket-level
TCP_DEFER_ACCEPTto postpone worker wake-ups until incoming payload arrives, andTCP_FASTOPEN(TFO) to support payload transmission in the initial SYN packet. - Zero-Copy File Transmission (sendfile): Integrated support for direct file streaming using the non-blocking kernel
sendfilesystem call, bypassing user-space copy buffers. - Context Allocation Pooling: Features a lock-free, thread-safe pre-allocated connection context pool (
TDextEpollContext) to completely avoid heap fragmentation during highly concurrent connection spikes. - Active Keep-Alive Sweep: High-efficiency background sweep monitoring connection activity timestamps, automatically terminating idle descriptors (>15 seconds) under descriptor pressure, coupled with
SO_LINGERsocket teardown.
- IClaimsPrincipal — JWT, Basic Auth (RFC 7617), and Cookie authentication.
- Rate Limiting — Fixed Window, Sliding Window, Token Bucket, Concurrency Limiter. Dext features a native, high-performance security and identity engine based on industry standards (JWT, OAuth2, and OpenID Connect) to guarantee enterprise-level compliance and safety.
- TJwtTokenHandler — Full-featured JSON Web Token (JWT) manager with native support for HS256 signatures and RS256 asymmetric validation.
- Windows CNG Integration — High-performance validation and signing dynamically leveraging Windows Native Cryptography APIs (
bcrypt.dll), with a transparent fallback toSystem.Hash(Delphi XE8+) or Indy/OpenSSL for maximum compatibility across versions. - Optimized Parsing — Structured parsing of JWT tokens using fast string indexers (
IndexOf) and memory spans (TByteSpan), avoiding heap allocations. - Claims Handling — Flexible claim records (
TClaim) and a fluent identity builder (TClaimsBuilder).
- TJwtAuthenticationMiddleware — HTTP pipeline middleware that extracts tokens from the
Authorization: Bearerheader, validates signatures, expiration times (exp), issuer (iss), and audience (aud), then injects the claims principal (IClaimsPrincipal) directly into the request context (IHttpContext.User).
- Authorization Attributes —
[Authorize],[AuthorizePolicy], and[AllowAnonymous]for declarative protection of controllers and actions ([Authorize('Admin')]for roles/schemes;[AuthorizePolicy('Name')]for named policies — Delphi has no attribute named arguments). - Role Validation — Role-based access control evaluated dynamically inside the route execution and controller scanning dispatch flow.
- Policy Engine — Runtime registration and evaluation of complex custom policies through the
TAuthorizationPolicyRegistry(e.g., minimum age requirements or custom scope checks).
- Plug-and-Play Methods — Middleware extensions for out-of-the-box configuration of third-party identity providers via OIDC:
UseGoogleAuthentication,UseEntraIdAuthentication(Azure AD), andUseKeycloakAuthentication.
- SSE (Server-Sent Events) — Unidirectional event streaming fallback.
- WebSockets & SignalR Hubs — Native autonomous WebSockets (RFC 6455) and Dext Hubs engine:
- Protocol Engine (
Dext.WebSocket.Protocol.pas): RFC 6455 framing processing (wsText,wsBinary,wsPing,wsPong,wsClose), vectorized masking/unmasking, 64-bit payload, and integrity validation. - Handshake Engine (
Dext.WebSocket.Handshake.pas): HTTP101 Switching Protocolsupgrade validation, SHA-1/Base64Sec-WebSocket-Acceptcomputation. - Permessage-Deflate (
Dext.WebSocket.Compression.pas): Negotiation and RFC 7692 compression via native ZLib (up to 80% payload reduction). - Hubs Transport (
Dext.Web.Hubs.Transport.WebSocket.pas): Full integration withDext.Web.Hubsfor bi-directional real-time messaging, group dispatching (IHubClients), automatic reconnection, and ping/pong heartbeats. - Cross-Platform I/O: Runs over raw sockets with
epollon Linux andWSAPoll/IOCPon Windows.
- Protocol Engine (
- Delphi Hub Client (SignalR-compatible) — Native, high-performance Delphi client library (
Dext.Web.Hubs.Client) supporting WebSocket and SSE transports, automated negotiate/handshake protocols, ping heartbeats, and thread-safe callbacks with optional main UI thread marshaling. - Caching — In-Memory caching engine, and native Redis cache engine (
TRedisCacheStore). Generates unique cache keys for HTTP QUERY requests by computing aTHashSHA1hash of the query request body stream. Support for native response cache registration via.UseRedisCacheinTAppBuilder. Health Checks with probes/health,/health/live(liveness), and/health/ready(readiness) viaTHealthCheckMiddleware/THealthCheckOptions(S68).
- OpenAPI / Swagger — Automatic specification generation.
- Auto-Migrations (S11) — Automatic schema synchronization during startup with table/column rename detection via attributes.
- View Engine & WebStencils (S09) — AST-based template engine (Razor-style), zero-dependency.
One of Dext's most powerful features: automatic generation of full REST APIs from ORM entities — with a single line of code. Not a scaffold that generates code — it's a runtime handler mapping entities to endpoints dynamically.
- Automatic by Attribute —
[DataApi]on the entity +App.MapDataApisat startup.TDataApi.MapAllscans RTTI and registers all decorated entities automatically. - Typed Manual —
TDataApiHandler<TProduct>.Map(App, '/api/products'). - Fluent Manual —
App.Builder.MapDataApi<T>(path, DataApiOptions.AllowRead.RequireAuth).
| Method | Route | Handler |
|---|---|---|
GET |
/api/{entity} |
HandleGetList — List with pagination, sorting, and filters |
GET |
/api/{entity}/{id} |
HandleGet — PK lookup (simple or composite) |
POST |
/api/{entity} |
HandlePost — Creates new record, returns 201 |
PUT |
/api/{entity}/{id} |
HandlePut — Updates existing record |
DELETE |
/api/{entity}/{id} |
HandleDelete — Removes record |
- 11 Operators automatically parsed from URL:
_eq,_neq,_gt,_gte,_lt,_lte,_cont(LIKE %x%),_sw(LIKE x%),_ew(LIKE %x),_in(IN),_null(IS NULL). - Pagination —
?_limit=20&_offset=40with MaxPageSize cap (default 100; fluent.MaxPageSize(N),0disables) — S68. - Sorting —
?_orderby=price desc,name asc. - Name Resolution —
ResolvePropertyNameviaTReflection.GetMetadata().GetHandlerBySnakeCaseto convert URL snake_case to Delphi property PascalCase. - Each filter generates an
IExpressionviaTStringExpressionParser.Parseand is injected into theISpecification— the same AST used by Smart Properties.
- Security —
RequireAuth,RequireRole(roles),RequireReadRole(roles),RequireWriteRole(roles)— Read/write permission separation with integrated JWT validation viaIClaimsPrincipal. - Allowed Methods —
Allow([amGet, amGetList])restricts which endpoints are generated. - Multi-Tenancy —
RequireTenantfor tenant isolation. - Naming Strategy —
UseSnakeCase,UseCamelCasefor serialization casing control. - Enum Style —
EnumsAsStrings,EnumsAsNumbers. - Explicit DbContext —
DbContext<TMyContext>to select which context to use. - Custom SQL —
UseSql('SELECT ...')for custom queries. - Swagger —
UseSwagger,Tag('Products'),Description('...')for automatic documentation.
- Auto-Discovery —
Tprefix automatically removed viaTReflection.NormalizeFieldName. - Pluralization — English:
y→ies,ch/sh/x/s→es, default→s(e.g.,TCategory→/api/category). - Custom Routes —
[DataApi('/my/path')]overrides conventions. - Case Mapping — Delphi property
PascalCase→ URLsnake_casefor filters.
- Automatic PK Type Resolution — Delegates to
IModelBinderfor transparent conversion: Integer, String, TUUID, TGUID. - Composite Keys —
|separator for composite keys (e.g.,/api/entity/1|ABC).
- DI Scope —
GetDbContextresolvesTDbContextfrom the DI container (supports multiple contexts viaContextClass). - Telemetry —
TDiagnosticSource.Write('DataApi.ModelBinding.Start/Complete')emits traceable events. - Logging — All handlers emit logs via
Log.Debug/Log.Errorwith structured templates. - Serialization —
TDextJson.Deserialize+TDextSerializerwith per-endpoint configurable settings. - Swagger — Registered endpoints automatically appear in OpenAPI documentation.
[DataApiIgnore]— Attribute to exclude specific entities from automatic scanning.
- Auto-Detection — The pipeline automatically detects
HX-Requestheaders and suppresses the global layout on compatible endpoints. - Partial Rendering —
Results.View<T>('fragment', Query).WithLayout('')for partial fragment rendering without layout. - HTMX 4 Request Inspection —
Htmx.Request(Context)readsHX-Request-Type(partial/full) plus source, target, current URL, boosted, and history-restore headers. - HTMX 4 Multi-Target Partials —
Htmx.Partials.Target(...).Id(...).AsResultbuilds<hx-partial>responses without manual lifetime management. - Full-Stack SPA Feel — Combines server-side SSR with dynamic HTMX swapping for highly responsive apps without heavy JavaScript.
- O(1) Memory —
TStreamingViewIterator<T>iterates on demand during template@foreach. 10.000 records rendered using memory equivalent to a single object. - No
ToList— PassDb.Customers.QueryAlldirectly toResults.View<T>('customers', Query)and the framework automatically engages streaming. - Smart Properties in Templates —
@(Prop(item.Name))for automaticProp<T>unwrapping inside HTML templates.
- Native Provider —
Services.AddWebStencils(...)with entity whitelisting viaTWebStencilsProcessor.Whitelist.Configure. - Agnostic — Same
IViewEngineinterface for Dext Template Engine and Web Stencils; switch without changing code.
- THpackDecoder & THpackEncoder — HPACK header compressor (RFC 7541). Includes support for the 61-entry static table, dynamic table ring-buffer with FIFO size-bound eviction, and client Huffman decoding via FSM.
-
TDextHttp2FrameCodec — Complete parser and serializer for all 10 HTTP/2 frame types. Zero-allocation parsing via
TByteSpanand direct buffer writers. -
TDextHttp2StreamMap — Sorted active streams map using binary search for
$O(\log n)$ lookup performance. Handles stream-level state machine transitions and flow-control. - TDextHttp2Connection — HTTP/2 connection state machine coordinating preface validation, SETTINGS exchange, and frame demultiplexing.
- gRPC Compatibility Layer — Length-prefixed message unpacking/packing and trailers support to serve as the transport layer for gRPC (S02).
- TDbContext — Unit of Work with automatic Change Tracking (states: Added, Modified, Deleted, Unchanged). Identity Map for instance uniqueness by primary key.
- DbSet<T> — Generic repository. Operations:
Add,Update,Remove,Find,FirstOrDefault,Where,Include,ToList. - SaveChanges — Persists all tracked changes in a transaction.
- Fluent Connection Setup & Pooling Auto-Detection — Connection builders (
UsePostgreSQL,UseFirebird, etc.) support automatic parameter extraction and synchronization with property setters, resolving empty-options/pooling bugs. - ConnectionDefName Support (FireDAC) — Direct support for FireDAC connection definition names (
UseConnectionDef). Automatically queriesFDManager.ConnectionDefsto resolve the database dialect, driver ID, and pooling configuration dynamically. - Shadow Properties Support — Declares columns (like
TenantId,CreatedAt,IsDeleted) in database mappings that are tracked and saved without needing to be exposed as physical fields in class declarations.
- Fluent queries with Projection (Select) (
Select(array of string), typed property projections), preserving server-side specifications, Paging (Skip/Take), and Aggregates (Count,Sum,Max,Min,Average). - SQL Cache — Reuse of generated SQL commands for repeated queries.
- Strongly-Typed Fluent Joins (
JoinInner,JoinLeft,JoinRight,JoinFull,JoinCross) — Compiles directly into optimized database-level joins (INNER, LEFT, RIGHT, FULL, CROSS) using explicit condition expressions, implicit auto-resolution via relations metadata (TModelBuilder), or Cross Join Cartesian product execution. - Pessimistic Locking —
FOR UPDATEfor concurrency control. - Multi-Mapping (Dapper-style) — Recursive hydration via
[Nested]attribute. - Fluent Validation Integration — Integrates with validation engine inside
SaveChangesto run automatic object verification before executing commits.
- Fluent Specification Builder —
Where,OrderBy,Include,Take,Skipfor decoupled and reusable business rules. - TExpressionEvaluator (
Dext.Specifications.Evaluator) — In-memory evaluator for the same AST used by the SQL Compiler. EvaluatesIExpressionagainst objects (TObject) or dictionaries (TDictionary<string, Variant>). Supports: comparisons (=,<>,>,>=,<,<=),LIKE(case-insensitive with%),IN/NOT IN,IS NULL/IS NOT NULL, bitwise operations (AND/OR/XOR), arithmetic (+,-,*,/,mod,div), andAND/ORshort-circuiting. Automatically unwrapsProp<T>(Smart Types) via RTTI. - TStringExpressionParser (
Dext.Specifications.Parser) — Parser converting"Field Operator Value"strings intoIExpressionnodes. Automatic type conversion: Boolean, Float (invariant), Integer, String. Used internally by Database as API to transform QueryString filters into expression trees. - IExpressionVisitor — Visitor pattern for traversing the expression tree, used by both the SQL Compiler (generating SQL) and the Evaluator (in-memory filtering).
- One-to-One, One-to-Many, Many-to-Many.
- Lazy Loading via Proxy Objects (transparent interception).
- Eager Loading —
Include/ThenIncludefor graph pre-loading. - Split Queries Loading — Collection navigation properties loaded via dedicated SQL queries using
INbounds parameters to avoid cartesian join explosion.
- Automated Code-First evolution with chronological database model snapshots.
- PostgreSQL, SQL Server, MySQL, SQLite, Oracle, Firebird, InterBase.
-
Legacy Paging — Automatic wrapping for
ROWNUMin older Oracle/SQL Server versions. -
Oracle Driver (
TOracleDialect) — Native support for Oracle OCI via FireDAC:- Identity column definitions (
GENERATED BY DEFAULT AS IDENTITY). - Native
RETURNING "ID" INTO :RET_VALsyntax for high-performance auto-generated PK retrieval. - Automatic
ROWNUMmulti-level wrapper paging for legacy and modern Oracle versions. - Precise type mapping:
NUMBER(1,0)$\rightarrow$ Boolean/BoolType,NUMBER(4,0)$\rightarrow$ SmallInt/Int16Type,NUMBER(9,0)$\rightarrow$ Integer/IntType,NUMBER(18,0)$\rightarrow$ Int64/Int64Type,NUMBER(p, s)$\rightarrow$ Currency/Double,DATE$\rightarrow$ TDateTime(protects time component),RAW(16)$\rightarrow$ TGUID/GuidType, andJSONcolumn mapping.
- Identity column definitions (
- Declarative Attribute —
[SoftDelete('IsDeleted')]transformsRemove()into an automaticUPDATE. - Custom Values —
[SoftDelete('Status', 99, 0)]for integers/enums. - HardDelete —
Db.Tasks.HardDelete(Task)for physical deletion. - Restore —
Db.Tasks.Restore(Task)to restore soft-deleted records. - Automatic Query Filters — Deleted records are invisible by default.
IgnoreQueryFiltersto see everything,OnlyDeletedfor the trash bin. - Timestamp Soft Delete (
[DeletedAt]) — Automatically convertsRemove()into an update setting the current timestamp, and generatesIS NULLfilters for active records (Issue #121). - IdentityMap Cleanup — Soft-deleted entities are removed from the memory cache after
SaveChanges.
[JsonColumn]Attribute — Marks string properties as JSON columns.[JsonColumn(True)]for JSONB in PostgreSQL.- Fluent Query —
.Json('path')to query properties inside JSON columns:Prop('Settings').Json('role') = 'admin'. - Nested Properties —
Prop('Settings').Json('profile.details.level') = 5using dot notation. - IS NULL —
Prop('Settings').Json('nonexistent').IsNullfor missing keys. - Cross-Database — PostgreSQL (
#>>/ indexed JSONB), MySQL (JSON_EXTRACT/JSON_UNQUOTE), SQLite (json_extract+ JSON1), SQL Server (JSON_VALUE). - INSERT with Cast — Automatic
::jsonbin PostgreSQL for[JsonColumn(True)].
- TDextBatchStrategyFactory — Dynamic selection of batch
UPDATEandDELETEstrategies based onTDatabaseDialect. - PostgreSQL Strategy (
TDextPostgresBatchStrategy) — Rewrites batchUPDATEinto a single-statementUPDATE table AS t SET ... FROM (VALUES (...), (...)) AS v(...) WHERE t.pk = v.pkand batch deletes intoWHERE (pk1, pk2) IN (...). - MySQL / MariaDB Strategy (
TDextMySqlBatchStrategy) — Rewrites batchUPDATEinto a single-statementUPDATE table SET col = CASE WHEN pk = x THEN y END WHERE pk IN (...). - Native Array DML Strategy (
TDextNativeArrayDmlStrategy) — Preserves native protocol array binding for Oracle OCI (OCIStmtExecutedelivering 17x bulk performance gain) and Firebird 4+. - Performance — Eliminates FireDAC sequential Array DML emulation bottleneck on PostgreSQL and MySQL, reducing per-record latency from ~650 µs to ~118 µs, while unlocking true native vector execution on Oracle.
- ORM ↔ VCL/FMX Bridge — Connects components (DBGrid, FastReport) to
TList<T>POCO collections while preserving a clean architecture. - Zero-Allocation Memory — Access via
TEntityMapmapped memory offsets eliminates RTTI or string copying on every record read. LoadFromUtf8Json— Direct loading from JSON streams/buffers viaTByteSpanwithout prior encoding conversion.- Automatic Setup (AST Parsing) — In design-time, "Sync Fields" and "Refresh Entity" Verbs directly parse
.pasunits and createTFieldsdynamically without needing to compile the project. - Live Data Preview (Hybrid) — IDE magic: by providing a
TFDConnectionand aDataProvider, Dext generates dynamic SQL and displays real data in the Grid during development. In runtime, this SQL is completely ignored, and the component consumes only the injected collections. - Expression Filtering —
DataSet.Filter := 'Score > 100'supported using the sameTExpressionEvaluatoras the in-memory framework. - Auto-Stabilization — The
Activeproperty is never serialized asTruein the DFM; prevents missing instance errors at runtime. - DML Memory Mode —
Append,Edit,Post, andDeleteoperations natively manipulate the underlying in-memory list.
- TPH (Table-Per-Hierarchy) — Automatic polymorphic hydration based on discriminators via attributes.
- Streaming Iterators (Flyweight pattern) — O(1) memory for rendering large volumes in SSR views.
TStreamingViewIterator<T>iterates on demand during template@foreach. - Automatic converters for GUID, Enums, JSONB, and UUID v7.
- Stored Procedures — Declarative execution via
[StoredProcedure]and[DbParam]. - Multi-Tenancy — Shared Database (TenantId), Schema Isolation (
search_path), Tenant per Database. - Bulk / Batch Operations — High-performance batch APIs:
AddRange,UpdateRange, andRemoveRangesupporting raw generic collections (TArray<T>,IEnumerable<T>) for bulk database operations in a single context transaction, featuring configurable automatic chunking (defaulting to 100 records, customizable viaWithBulkBatchSizeinTDbContextOptions) to optimize network packets and satisfy parameter limit boundaries of DB drivers (e.g. FireDAC). - Database Sequence Generators & HiLo (
Dext.Entity.Sequences) — Declarative mapping of sequences via[Sequence('name', allocationSize)]attribute or fluentUseSequence. Leverages a thread-safeTSequenceManagerwith a Pooled-lo range optimizer to pre-allocate key ranges in memory, enabling high-performance bulk inserts for entities with sequenced primary keys. SQLite support is emulated via a specialized table (dext_sequences).
IgnoreQueryFilters(Fluent API) —Db.Users.IgnoreQueryFilters.ToList— bypasses all registered global query filters (Soft Delete, Multi-Tenancy) for a single query. Does not affect subsequent calls.- Specification-Level Control —
ISpecification<T>.IgnoreQueryFiltersandISpecification<T>.IsIgnoringFilters: enables specification classes to declare intent, keeping admin queries self-contained and reusable. IsOnlyDeleted(Spec Integration) —ISpecification<T>.IsOnlyDeletedpropagates the trash-bin query flag in the same mechanism, allowingOnlyDeletedto be declared in a spec.- Scoped Propagation — In
TDbSet<T>.ToList(ASpec), spec flags are propagated to the internalFIgnoreQueryFilters/FOnlyDeletedstate before SQL generation and reset viaResetQueryFlagsin afinallyblock — ensuring isolation between calls. - SQL Generator Integration —
TSQLGenerator<T>.GetSoftDeleteFilterreturns empty string whenFIgnoreQueryFiltersisTrue.GetQueryFiltersSQLexits early for the same reason. - Admin Spec Pattern — Allows building dedicated specification classes (
TAdminListSpec) that callIgnoreQueryFiltersin their constructor, enabling declarative, zero-friction access to raw data.
Exposes delta-tracking mechanisms and transport decompression.
- Row State Tracking — Native change tracking via
TEntityRowStateand change list propertyChanges(TEntityChange). - Tombstones for Deletion — Retains primary key maps (
Key) of deleted entities duringDelete, enabling synchronization of removals. - Transactional Consolidating — Native
AcceptChangesAPI to clear accumulated change logs after successful updates.
- Automated Routing Endpoints — Native
MapEntityDataSet<T>exposingGETfor fetching andPOST/applyfor persisting the change list. - Custom Persistence Engine — Pluggable
IEntityDataSetStoreinterface defaulting toTDbContextEntityDataSetStore(DbContext.SaveChanges).
- Fluent API — Consume APIs without visual components. Methods:
RestClient('url').BearerToken('...').Get<T>('/path').Await. - Fluent REST Request Factory — Grouping pattern using
Client.Request.Get('/path')to isolate request building, avoiding root-level client scope bloat and return type limitations (Issue #119). - Unrestricted Body Payloads — Native support for serializing
recordandTArray<T>in request payloads (Body<T>and the array helperBodyArray<T>), bypassing generic compiler restrictions. - Record & Array Deserialization — Native deserialization of JSON arrays and objects directly into records and dynamic arrays (
TArray<T>) during request execution. - Ergonomic Responses — Boolean helper
IRestResponse.IsSuccessfor immediate status code validation in the200..299range. - Connection Pooling — Intelligent
TNetHttpClientinstance reuse (thread-safe pooling), eliminating TCP/SSL handshake overhead and radically reducing OS resource usage. - Auto-Serialization — Native integration with Dext's JSON engine for hydrating objects and generic collections (
IList<T>). - Async First — Fully integrated with
Dext.Threading.AsyncwithICancellationTokensupport for cooperative cancellation and UI Access Violation protection. - Retry Logic — Automatic recovery with exponential backoff and Async/Await support.
- Typed Responses —
Client.Get<TUser>('/users/1')with automatic deserialization. - Async Chaining —
Client.Get<TToken>('/auth').ThenBy<TUser>(...).OnComplete(...).Start. - Cancellation —
ICancellationTokento abort ongoing requests. - Pluggable Auth —
TBearerAuthProvider,TBasicAuthProvider,TApiKeyAuthProvider. - Thread Safety — Immutable configuration snapshot in
Execute; isolated execution via pool. - Response Headers — Full access via
GetHeader(case-insensitive) andGetHeaders(TNetHeaders array). - THttpRequestInfo — Integration with
.httpparsers for ad-hoc request execution. - Multipart Form Fields with Content-Type — Support for specifying custom MIME types (e.g.
application/json) for individual form fields in multipart requests viaAddFormFieldandAddMultipartField(Issue #125). - Conditional Query Parameters — Support for fluently adding query parameters conditionally (
QueryParamIfNotEmpty,QueryParamIf, and overloads with default values) to simplify request building (Issue #123). - Legacy Compatibility and Indy Fallback — Complete abstraction of the HTTP engine (
IDextHttpEngine) with automatic fallback using Indy (TIdHTTP) for older IDEs (Delphi XE2 to XE7), active in compilers below XE8 or under theDEXT_FORCE_INDYdirective. OpenSSL DLLs required for legacy HTTPS requests. - Transparent Inbound Decompression —
TRestClientadvertisesAccept-Encodingand decompresses response streams dynamically. - Raw Stream Preservation — Preserves raw compressed bytes via
RawContentStreamproperty for audit or direct byte checking. - Dynamic Client Certificate / mTLS —
TRestClient.ClientCertificatewith overloads for file path (cert.pfx,cert.p12) and in-memory stream (TStream). Enables direct submission to public webservices (such as Portugal SAF-T) without requiring certificates installed in the Windows certificate store. Automatic per-request isolation and cleanup in connection pools.
- Bearer Token (JWT) — Automatic
Authorization: Bearer <token>header. - Basic Auth (RFC 7617) — Base64 encoding of
user:password. - API Key — Customizable header or query string.
- OAuth 2.0 Client Credentials (RFC 6749 §4.4) — Automatic token caching, thread-safe refresh with a 30s safety margin to prevent using expired tokens.
Dext features a native, high-performance Redis client library supporting RESP2/RESP3 serialization, connection pooling, reactive Pub/Sub channels, and RedisJSON.
- Zero-Allocation Parser — Highly optimized
TDextRedisParserparsing incoming RESP byte streams using memory spans (TByteSpan), avoiding heap allocations. - RESP3 Additions — Native support for new RESP3 value types including Nulls (
_), Booleans (#), and Double Floats (,).
- TDextRedisConnectionPool — Safe, high-concurrency client pooling (
IStack<TDextRedisConnection>) to minimize socket creation overhead and manage connections efficiently. - Thread-Safe Commands — Automatic acquisition and release of pooled connection handles during command executions.
- TDextRedisPubSub — Asynchronous Pub/Sub engine using Dext's native concurrent channels (
IChannel<TDextRedisMessage>) for thread-safe message dispatching.
- RedisJSON Module Support — Native integration with the
Dext.Jsonserialization engine to store and retrieve structured Delphi objects directly as JSON values.
- Unified TLS Abstraction —
IDextTLSEngine,IDextTLSContextProvider, andIDextTLSStreamdefinitions for decoupled transport security. - OpenSSL 3.x Memory BIO Engine — Zero-copy/lock-free TLS handshake and memory-buffered encrypted framing for raw asynchronous TCP Sockets (
epollon Linux andIOCPon Windows). - HTTP.sys & Windows Schannel Integration — Native HTTPS bindings and Windows Certificate Store integration without external DLLs.
- Taurus TLS & Indy SSL — Modern TLS 1.3 / OpenSSL 3.x provider (
TDextTaurusTLSContext) for Indy server engines. TDextRedisClientSSL Support (rediss://) — Transparent SSL/TLS stream wrapper for the native Redis client.dext dev-certsCLI Tooling — Pure Pascal CryptoAPI generator for self-signed X.509 development certificates with SAN extension (localhost,127.0.0.1) and automatic Root Certificate Store registration.
The framework includes support for network transport decoupling inside the IOCP/Epoll server to expose raw TCP/UDP sockets, alongside a native implementation of the MQTT v3.1.1 protocol (client and broker) for asynchronous pub/sub messaging.
- Engine Decoupling — Abstraction of physical connections (
IDextTransportConnection) and custom handlers (IConnectionHandler) allowing raw TCP/UDP streams to bypass the HTTP parser layer completely directly at the IOCP/Epoll worker threads.
- TDextTcpServer & TDextTcpClient — Concurrent, asynchronous TCP server and lightweight TCP client supporting configurable read/write timeouts.
- TDextUdpServer & TDextUdpClient — Low-level UDP communication components supporting raw byte spans and non-blocking receive callbacks.
- Binary Frame Encoder/Decoder — High-performance packet encoder and decoder supporting variable-byte Remaining Length representation and all standard MQTT control frames (CONNECT, CONNACK, PUBLISH, PUBACK, SUBSCRIBE, SUBACK, UNSUBSCRIBE, UNSUBACK, PINGREQ, PINGRESP, DISCONNECT).
- Trie Tree Route Router — Highly optimized Trie tree data structure for wildcards and topic subscription matching, with full support for single-level (
+) and multi-level (#) wildcards. - Broker Server & Client — Multi-session concurrent MQTT broker supporting subscription states and clean sessions, alongside a non-blocking MQTT client with background keep-alive ping loop.
High-performance binary transport protocol implementation.
- TProtobufSerializer — High-speed, zero-allocation binary serialization engine for Protocol Buffers (proto3).
- Format Handlers — Supports Varint, Fixed32, Fixed64, and Length-Prefixed formatting types using high-performance
TSpanmemory representations. - Entity Binding via RTTI — Marshals Delphi objects directly to Protobuf binary format, evaluating attributes such as
[ProtoMember]and field ordinals.
- TGrpcCodec — Framing codec for gRPC Length-Prefixed Messages (LPM).
- Compression Support — Compression flag handling (1-byte compressed flag, 4-byte big-endian message length) for HTTP/2 transmission.
- TGrpcDispatcher — Decodes HTTP/2 frames and maps incoming
application/grpcrequests to the registered service handlers. - Service Mappings — Dynamic routing and method dispatch via reflection and interface lookup tables.
- TEntitygRpcProvider — Pluggable gRPC sync provider for
TEntityDataSet, enabling bi-directional remote synchronization. - TgRpcClient — Low-level client engine sending Protobuf streams and parsing gRPC binary responses.
In-process MediatR-style publish/subscribe (Dext.Events). Handlers respect DI lifecycles (scoped handlers share the request context).
- IEventBus — Central in-memory event bus for total decoupling between producers and consumers.
- IEventHandler<T> — Typed interface for event handlers. Multiple handlers per event type, executed in registration order.
- IEventPublisher<T> — ISP (Interface Segregation Principle) facade for components that only publish a specific event type.
- Synchronous Dispatch —
IEventBus.Dispatchinvokes all handlers and returnsTPublishResultwith statistics (HandlersInvoked,HandlersFailed,HandlersSucceeded). - Asynchronous Dispatch —
DispatchBackgroundexecutes handlers in a separate thread with an isolated DI scope (fire-and-forget). - TEventBusExtensions — Generic static helpers
Publish<T>andPublishBackground<T>that box the event toTValueand delegate toIEventBus.
- IEventBehavior — Cross-cutting middleware for the event pipeline.
Intercept(AEventType, AEvent, ANext)method — callingANext()continues the pipeline; omitting it short-circuits. - TEventLoggingBehavior — Structured logging via
ILogger. Debug before/after handler with elapsed time. Error handling with failure re-raise. - TEventTimingBehavior — Debug-only, records dispatch time via
OutputDebugString. - TEventExceptionBehavior — Structured exception wrapping in
EEventDispatchExceptionwith event type name. Re-raise preserves original context. - Global vs Per-Event Behaviors — Global apply to all events; Per-event apply only to the specific type and execute INSIDE global ones.
Services.AddEventBus— RegistersIEventBusas a Singleton (each Publish creates a child DI scope).Services.AddScopedEventBus— Registers as Scoped (handlers share the same scope, ideal for web requests with a shared DbContext).Services.AddEventHandler<TEvent, THandler>— Typed handler registration with automatic Transient registration.Services.AddEventBehavior<T>— Global behavior.AddEventBehaviorFor<TEvent, T>— Per-event behavior.Services.AddEventPublisher<T>— RegistersIEventPublisher<T>as transient for ISP injection.Services.AddEventBusLifecycle— RegistersTEventBusLifecycleServiceas anIHostedService.
- TEventBusLifecycleService — Background service listening to
IHostApplicationLifetimeand publishingTApplicationStartedEvent,TApplicationStoppingEvent,TApplicationStoppedEventto theIEventBus. - Hosting Bridge (
Dext.Hosting.Events.Bridge) —THostingLifecycleEventBridgefor integration with the background services builder viaAddLifecycleEvents.
- TEventBusTracker — Fake
IEventBusfor tests: records every publish in a typed list.DispatchBackgroundis synchronous. - DI registration —
TEventBusTracker.Register(Services, Tracker)instead ofAddEventBus; chainable withAddEventPublisher/AddTransient. - Assertions —
HasPublished<T>,PublishedCount<T>,LastPublished<T>,GetPublished<T>,Clear.
- EEventDispatchAggregate — Aggregate exception containing
Errors: TArray<string>with one entry per failed handler. All handlers are always invoked before raising.
- CLI Runner —
dext testruns the project suite. On Windows,--coverageproduces HTML/XML plusdext_coverage.xml(SonarQube coverage) via Delphi Code Coverage. The live host for the suite is Dext Test Explorer (S36 / section 7.7), not an embedded web dashboard. - Fluent Runner API (
Dext.Testing.Fluent) — Programmatic configuration:TTest.Configure.Verbose.RegisterFixtures([...]).Run. The suite exe already reads-filter:,-category:,-fixture:,-junit:,-html:,-json:.
Write tests without base class inheritance using RTTI metadata.
- Core Attributes —
[Fixture],[Test],[Fact],[TestClass]. - Lifecycle Management —
[Setup],[TearDown],[BeforeAll],[AfterAll],[AssemblyInitialize],[AssemblyCleanup]. - Data-Driven Testing —
[TestCase(A, B, Expected)]— Inline parameterized tests.[TestCaseSource('MethodName')]— Dynamic data providers via methods.
- Execution Filters & Control —
[Ignore('Reason')],[Skip('Reason')]— Skip tests.[Explicit]— Tests run only when explicitly selected.[Category('Tag')],[Trait('Name', 'Value')]— Categorization and filtering.[MaxTime(ms)]— Warning if the test exceeds the budget (does not fail).[Repeat(n)]— Repeats the method n times.[Priority(n)]— Execution order (lower number first). Not a CLI filter.[Platform('Windows, Linux')]— OS-specific restrictions.
Fluent API based on the Should(Value) pattern.
- Typed Assertions — Specific methods for
ShouldString,ShouldInteger,ShouldDouble(approximation),ShouldBoolean,ShouldDateTime,ShouldGuid,ShouldUUID,ShouldObject. - List/Collection Assertions —
Should(List).HaveCount(5).Contain(X).OnlyContain(Predicate).AllSatisfy(Predicate). - Structural Comparison —
BeEquivalentTofor deep object and collection comparison (order-independent). - Soft Asserts —
Assert.Multiple(procedure ... end)to collect multiple failures in a block before failing the test. - Action Assertions —
Should(Proc).Throw<EException>().WithMessageContaining('...').
TDextApplicationFactory<TApp>/TDextWebApplicationFactory<TApp>— BuildsTWebApplicationwithWithTestServices/WithConfigure.CreateClient: IDextTestHttpClient— In-process GET/POST/PUT/DELETE (no TCP); dispatches throughTWebApplication.BuildRequestPipeline.IDextTestHttpResponse— StatusCode, ContentType, Body, headers.
MatchSnapshot('name')— Verify complex objects and JSON payloads via disk-based baseline comparison.- Folder — Baselines live in
{ExeDir}\Snapshots\(not__snapshots__/). - Structural JSON Compare — Smart comparison that ignores formatting and property order in JSON.
- Update Mode —
SNAPSHOT_UPDATE=1environment variable to refresh baselines.
- Dynamic Proxies —
TProxy(Interfaces) andTClassProxy(Classes with virtual methods) viaTVirtualInterfaceandTVirtualMethodInterceptor. - Fluent Mocking —
Mock<T>.Setup.Returns(Val).When.Method(Args). - Argument Matchers —
Arg.Any<T>,Arg.Matches<T>(Arg.&Is<T>),Arg.IsNil<T>,Arg.IsNotNil<T>. - Verification —
Received(Times.Once),Received(Times.AtLeast(n)). - Auto-Mocking —
TAutoMockerfor automated mock injection into the DI container during unit tests.
- Multi-Format Export — JUnit XML, xUnit XML, TRX (Azure DevOps), HTML (Dark Theme), JSON.
- SonarQube Integration — Generate code coverage and failure reports compatible with Quality Gates.
- Decoupled TestInsight Integration (
Dext.Testing.TestInsight) — Decoupled execution hook and listener for TestInsight plugin that automatically routes test runs and results to the IDE without framework compile-time coupling. - Decoupled Test Runner Integration & Registry (
Dext.Testing.Integration) — Command-line registry and parameter processing system enabling decoupled executions from the IDE or CLI without intermediate BPL dependencies. - Native DUnitX Integration (
Dext.Testing.DUnitX) — Decoupled runner adaptation for DUnitX that pipes real-time results, status streams, and filtering logic over local HTTP/SSE to the Dext Test Explorer IDE Expert. - Native DUnit Integration (
Dext.Testing.DUnit) — Decoupled runner adaptation for DUnit that registers custom listeners to pipe results, duration metadata, and execution streams to the Dext Test Explorer. - Native DUnit2 Integration (
Dext.Testing.DUnit2) — Decoupled runner adaptation using proxy interfaces to pipe real-time results and suite hierarchies from DUnit2 frameworks to the Dext Test Explorer. - Test Context Injection —
ITestContextinjectable via parameter forWriteLine,AttachFile(screenshots), and execution metadata. - Per-test history in Test Explorer (
TTelemetryTrackerinDext.Testing.Design.DockableForm) —{project}\.dext\testing\history.json(up to 1000 rows). The Details pane flags flaky tests and duration regression. This is not the suite-total JSON. TTestHistoryManager(Dext.Testing.History,dext_test_history.json) — Per-run totals (passed/failed/skipped/duration, last 50). Only the sidecar dashboard consumes it today. Explorer does not show that series yet — S75 F-10.- OpenTelemetry Test Telemetry (
Dext.Testing.Listeners.Telemetry) — Integrated telemetry listener piping test execution metrics (test_duration_ms,test_count_passed,test_count_failed) to OpenTelemetry collectors.
- Dext Test Explorer Dockable Window (
Dext.Testing.Design.DockableForm) — Native dockable window in RAD Studio displaying interactive test tree, status filters, and search. Per-test history in Details (flaky / duration). Suite totals across runs: S75 F-10. - Gutter Margin Icons (
Dext.Testing.Design.Gutter) — Interactive visual icons in the left code editor margin (green checkmark for pass, red cross for failure). - Embedded Local IDE HTTP/SSE Server (
Dext.Testing.Design.Server) — Real-time event streaming server embedded in the Expert receiving test execution streams without BPL coupling. - Code Coverage Visualizer (
Dext.Testing.Design.Coverage) — Direct editor highlighting of lines covered by test runs via AST parsing (Dext.Testing.Design.AST).
Dext is continuously validated by a massive testing infrastructure to ensure integrity across its subsystems:
- Engineering Statistics — The project exceeds 200,000 lines of pure Pascal code (excluding templates and documentation), reflecting a massive investment in stability and high-level abstractions.
- Massive Coverage — Hundreds of test suites with thousands of individual assertions validating everything from the Core (Memory, Collections) to complex Web and ORM integrations.
- Multi-DB Matrix (ORM) — The persistence engine is exhaustively tested across a real matrix of 5 databases: PostgreSQL, SQL Server, MySQL, SQLite, and Firebird.
- Stress & Concurrency Testing — Validation of concurrent collections, channels, and async tasks under high load to ensure no Race Conditions.
- Field Evidence — Framework validated in real-world projects deployed on AWS and Azure, with fiscal management systems processing peaks of ~800,000 daily requests.
- CI/CD — JUnit / xUnit / TRX / HTML / JSON reports and SonarQube coverage (
dext_coverage.xml) for Azure DevOps and GitHub Actions pipelines.
- ITemplateEngine — Main interface:
Render(template, context)andRenderTemplate(name, context). - TDextTemplateEngine — Complete implementation with AST (Abstract Syntax Tree) parser. Each directive is compiled into a node (
TTemplateNode) with aRendermethod. - ITemplateContext — Hierarchical context with string values, objects, and lists.
CreateChildScopefor nested scoping.
- ITemplateLoader — Pluggable interface for loading templates. Implementations: FileSystem and In-Memory.
TTextNode(literal text),TExpressionNode(interpolation{{ var }}),TIfNode/TElseIfNode/TElseNode(conditionals),TForEachNode(iteration with@index,@first,@last),TBlockNode(named blocks),TExtendsNode(layout inheritance),TSectionNode(sections),TMacroNode(reusable macros),TBreakNode/TContinueNode(loop flow control).
- Expression parser with support for arithmetic, comparison, and logical operators (
and,or,not). - Chained Filters —
{{ value | upper | truncate(10) }}with filter pipeline. - Filter Registry (
ITemplateFilterRegistry) —RegisterFilter(name, func)for custom filters. - Built-in Filters —
upper,lower,capitalize,truncate,default,date,html_escape, etc.
- Layout Inheritance —
{% extends "base.html" %}with block overrides. - Whitespace Control —
{%- -%}for whitespace control in directives. - HTML Mode —
IsHtmlModefor automatic output escaping. - Source Position Tracking —
TSourcePoswith line, column, and filename for precise error reporting. - ETemplateException — Exceptions with position and template snippet for debugging.
- Attribute-Based Validation — RTTI decorators:
[Required],[StringLength(min, max)],[Range(min, max)],[RegularExpression(pattern)],[EmailAddress],[Url]. - Fluent Validation API — Strongly-typed validation base class
TAbstractValidator<T>implementingIValidator<T>as a modern C# FluentValidation-like alternative. - Fluent Rule Builder — Memory-efficient record
TValidationRuleBuilder<T>that avoids heap allocations while building chained validation rules (Required,Length,Range,EmailAddress,Matches,MatchesPattern,Must,When). - Smart Property Integration — Concrete
RuleForoverloads for standardProp<T>smart properties (e.g.,Prop<string>,Prop<Integer>,Prop<Boolean>, etc.) to automatically extract property names from Prototype ghost entities without magic strings or compiler casting issues. - Pattern Registry —
TValidationPatternsregistry mapping keys to locale-specific regular expressions (e.g. Pt-BR or En-US phone numbers and zipcodes). - TValidator — Non-generic helper:
Validate(obj)returnsTValidationResultwith a list ofTValidationError(field + message). - TValidator<T> — Typed generic version.
- Custom Validators — Inherit from
ValidationAttributefor custom business rules. - Web Integration — Automatic resolution of registered validators (
IValidator<T>) from the Dependency Injection (DI) container inside the web model binding pipeline (THandlerInvoker.Validate), raisingTWebValidationExceptionto yield structured error JSON/HTMX payloads.
- TMapper — Static facade and central registry for object-to-object mapping using Delphi RTTI.
- Fluent Mapping Configuration —
TTypeMapConfig<TSource, TDest>record supporting custom mappings using fluent notation:ForMember(DestName, MapFunc)— Define custom mapping functions mapping source to target values.Ignore(DestName)— Prevent copying specific properties.
- Instance Mapping —
TMapper.Map<TSource, TDest>(Source)returns a newly instantiated mapped destination class. - In-Place Mapping —
TMapper.Map<TSource, TDest>(Source, Dest)maps source properties onto an existing destination object reference. - Collection Mapping —
TMapper.MapList<TSource, TDest>(SourceList)maps lists and generic collections automatically. - Record Mapping — Maps matching fields and properties between classes and records.
- Default Value Optimization — Support for mapping only non-default values using the
AOnlyNonDefaultparameter to avoid overwriting initialized destination values. - CreateMap<TSource, TDest> — Mapping registration with automatic property reflection by name (complements
TTypeMapConfigabove).
- ITenantProvider — Abstraction for current tenant identification.
- ITenantConnectionStringProvider — Dynamic connection string resolution per tenant.
- Strategies — Shared Database (TenantId), Schema Isolation (
search_path), Tenant per Database. - DML Tenant Filters (S68) —
GenerateUpdate/GenerateDelete(and batch templates) appendAND TenantId = :…forITenantAwareentities using the currentITenantProvider(honors.IgnoreQueryFilters). - DI Integration — Registered as a Scoped service for resolution per request.
- ISimpleNavigator — Push/Pop/Replace/PopUntil navigation with
TValuedata passing. - 3 Adapters —
TCustomContainerAdapter(embed frames in panel),TPageControlAdapter(tabs),TMDIAdapter(child windows). - Middleware Pipeline —
TLoggingMiddleware,TAuthMiddleware,TRoleMiddleware— same architecture as the Web pipeline. - Lifecycle Hooks —
INavigationAwarewithOnNavigatedTo(Context)andOnNavigatedFrom. - DI Integration — Navigator registered as a Singleton service in the container.
- Two-Way Attribute-Based Binding —
[BindEdit('Name')],[BindCheckBox('Active')],[BindText('ErrorMessage')]. - Nested Properties —
[BindEdit('Customer.Address.City')]with dot notation. - Message Dispatch —
[OnClickMsg(TSaveMsg)]eliminates manualOnClickhandlers. - Custom Converters —
IValueConverterwithConvert/ConvertBackfor complex types (e.g.,TCurrencyConverter). - TBindingEngine — Central engine automatically synchronizing ViewModel ↔ UI.
- Clean architecture with ViewModel + Controller + DI.
- Validation Integration —
FViewModel.Validatewith errors automatically reflected in the UI via binding.
- Interception Engine — Proxy engine for method interception, base for Mocks and AOP (Aspect-Oriented Programming) features.
- Design-Time Experts — IDE Grid Data Preview and specialized metadata property editors.
- TSelectionEditor Integration — Non-invasive context menu integration for
TFDConnectionandTDataSet(FireDAC and Generic). Dext menus coexist with native IDE menus. - TTableSelectionForm — Advanced selection UI with real-time filtering, "Select All/None" shortcuts, and live table/selection counters.
- Live Scaffolding Preview — High-fidelity preview window with real-time code generation, statistics (Entities/Metadata/Lines), and style switching (POCO vs. Smart).
- Smart PascalCase Engine — Acronym-aware naming logic (
EmployeeID→EmployeeId,ReportsTopreserved) with support forsnake_caseandALL_CAPSnormalization. - Enhanced Meta-Inference — Precise AutoInc detection via RTTI and
ftAutoInc, ensuring 1:1 parity with database schema. - IOTA Automation — Seamless creation of new units in memory and automatic association with the active Delphi project.
- Dext CLI (S01) — Unified CLI engine (
dext.exe) for project management and development automation. - Advanced Scaffolding — Project and file generation via smart templates:
dext new(projects),dext scaffold(controllers, ORM entities, DTOs, middlewares) supporting all major relational engines (SQLite, PostgreSQL, SQL Server, Firebird, MySQL/MariaDB, Oracle) with automatic uppercase schema resolution for Oracle dictionary metadata (MetaCurSchema,MetaDefSchema). dext dev-certs— Native CryptoAPI provisioner for local development X.509 certificates with SAN extension and automatic Root Certificate Store trust.dext test --coverage— Suite runner with code coverage via.mapfiles (Windows). Produces Delphi Code Coverage HTML/XML anddext_coverage.xml(SonarQube coverage) automatically. No separate--sonarflag.dext migrate [up|down|list|generate]— CLI manager for Dext ORM database schema migrations.dext doc— Automated static HTML technical documentation generator with interactive route visual maps.dext ui— Local web dashboard for project configuration (not a live test-suite monitor).dext index— Indexing of all public symbols (classes, records, interfaces, methods) in Markdown, JSON, and CSV optimized for AI agents and NotebookLM.
- TDiagnosticSource (S03) — Centralized event publisher based on JSON payloads, ensuring decoupling between producers (ORM, Web) and consumers. Observers intercept HTTP request lifecycle and SQL execution without coupling monitoring to business logic.
- Activity Tracking — CorrelationId / activity tracking for debugging complex and distributed flows.
- Dext Sidecar (
DextSidecar.exe) — Sidecar native process for real-time file watching (Dext.Services.FileWatcher.pas), log streaming (Dext.Sidecar.LogStreamer.pas), embedded telemetry web server (TSidecarServer), and System Tray VCL interface (Dext.Vcl.TrayIcon.pas). - Telemetry Bridge (
Dext.Logging.Telemetry) — AutomaticILoggerintegration, enabling HTTP and SQL telemetry visualization in console or log files. - SQL Capture — ORM native SQL instruction extraction and formatting for real-time auditing.
- HTTP Lifecycle — Latency, status codes, and web framework route tracing.
- Stack Trace Extraction (
Dext.Core.Debug) — Precise and detailed stack trace extraction at the point of exception. Critical for debugging highly integrated frameworks with dynamic execution flows.
The framework embeds a premium, high-performance, asynchronous observability suite designed to gather, persist, and visualize structured logs, distributed spans, system health metrics, and detailed database query and external network profiling.
- Asynchronous Ring Buffer — Log entries and spans are collected into a high-performance in-memory ring buffer (capped at 1000 items), eliminating disk I/O bottlenecks in critical request-handling threads.
- Asynchronous Persistence — A dedicated background worker (
TDashboardSaveTimer) periodically flushes traces totelemetry.jsonevery 30 seconds in a non-blocking manner. - Hierarchical Gantt Tree — The Dashboard renders visual span nodes nested under their parent trace contexts (
TraceId/SpanId) in real time, making latency and processing bottlenecks simple to analyze.
- RED Metrics Dashboard — Real-time visual graphs in the Dashboard tracking HTTP RPS (Requests per Second), SQL QPS (Queries per Second), HTTP Errors, and average latency.
- System Health Monitor — Operating system resource sampling: CPU usage (%), physical memory (Working Set in MB), active thread count, and active DB connections.
- Non-Blocking Persistence — Serialized metrics are appended to a ring buffer and written to
metrics.jsonevery 30s via the async background timer.
- FireDAC Auto-Instrumentation — Zero-coupling interception inside the DB driver layers (
Dext.Entity.Drivers.FireDAC.pas), automatically capturing raw SQL queries (db.statement), query parameters (db.params), query elapsed execution times, and routing database exceptions. - Outbound HTTP Auto-Instrumentation — Network call interception inside the Rest Client (
Dext.Net.RestClient.pas), capturing target URLs, HTTP methods, response elapsed timings, HTTP status codes, and exceptions. - Context Inspector Drawer — A sliding overlay panel in the Dashboard triggered by clicking any span node in the tree. Displays pretty-printed SQL statements, structured query parameters, copied cURL commands, and generic metadata tags.
- IStreamableSessionManager — SSE channel manager with automatic garbage collection (runs every 60s, evicting idle sessions after 30 minutes).
- HTMX Fragment Swap — Endpoints serving dynamic HTML fragments (e.g.
/sidecar/fragments/metrics), allowing live DOM updates via HTMX without writing any client-side JavaScript.
- Native AI Skills — Modular instruction files (
dext-web.md,dext-orm.md,dext-auth.md) teaching AI assistants (Cursor, Antigravity, Copilot, Claude) to generate idiomatic Dext code. - 3 Integration Modes — Direct copy to
.agents/skills/, global custom configuration, or symlinks. - Modular by Design — Atomic skills to save context tokens; load only relevant modules for the current feature.
- Compatibility — Claude Code, Cursor, Antigravity, Cline, OpenCode, GitHub Copilot.
The framework provides a native, zero-dependency implementation of the MCP 2025-03-26 specification, enabling Dext applications to expose tools, resources, and prompts to AI agents (like Claude Desktop and Claude Code).
- Supported Transports —
HTTP Streamable(Synchronous POST with Sessions),SSE(Legacy Server-Sent Events), andStdio. - Declarative RTTI API —
TMCPToolProviderwith[MCPTool],[MCPParam],[MCPResource], and[MCPPrompt]attributes for frictionless endpoint registration. - Fluent Builder API — Chainable registration:
Server.Tool('name').Description('...').OnCall(...). - Rich Content Types — Built-in support for
TMCPContent(Text, Image, Audio, Embedded Resources) andTMCPToolResultreturning multiple blocks and error states. - Integration — Runs natively on top of Dext's
TWebHostBuilderallowing MCP and REST endpoints to coexist non-blocking in the same process.
- TMCPServerBuilder — Fluent builder to configure MCP servers.
- HTTP Stack Selection — Support for Indy and HTTP.sys (Native) stacks.
- Provider Registration — Automated mapping of custom providers.
Dext Framework 1.0 — Features Index. Revision: September 2026.