Skip to content

Dext Framework: Delphi's Design-Time Revolution

Dext Design-Time Revolution

Many ORM frameworks promise productivity, but few deliver a truly integrated experience within the Delphi IDE. The Dext Framework breaks this barrier by being a high-performance ORM that allows you to configure your entire data engine directly in the Object Inspector, with instant visual feedback and without the need to write repetitive infrastructure code.

In this visual guide, we walk through each step of this experience that redefines Full Stack development with Delphi, merging the power of object-relational mapping with RAD agility.


The process begins with the automatic generation of entities. Dext reads your database and creates robust entity classes, respecting types and relationships.

With the Dext.EF.Design package installed, you gain access to specialized components and context menus that automate the most tedious tasks.

Design Package Installation Installed Components

With an active FireDAC connection (e.g., SQLite), you trigger Scaffolding directly from the connection components’ context menu. It’s the end of manual field-by-field mapping.

FireDAC Connection Triggering Scaffolding

Select the desired tables and preview the code before generating it. Dext allows you to customize class names, properties, and mappings directly in the Preview.

Table Selection Scaffolding Preview Entities Created


🪄 Phase 2: Design-Time Magic (Live Data)

Section titled “🪄 Phase 2: Design-Time Magic (Live Data)”

Connecting entities to your interface is a purely visual and extremely fluid process.

The TEntityDataProvider serves as the smart bridge between the database and your model. Simply connect it to your TFDConnection.

Configuring Provider

Dext scans your project’s units for decorated classes. You don’t need to register anything manually; the entities appear ready for use.

Unit Scanning Scan Result

By selecting the EntityClassName and setting Active = True in the Object Inspector, real data from the database populates your Form Designer immediately. This allows you to validate the layout with live data without compiling the project.

Configuring DataSet Live Data in Delphi


⚡ Phase 3: Customization and Dynamic Filters

Section titled “⚡ Phase 3: Customization and Dynamic Filters”

Dext allows you to control property behavior through powerful attributes and visual settings.

Master-Detail filtering is configured visually. The result is reflected in the detail grid at design-time, ensuring relationship logic is correct before execution.

Dynamic Master-Detail

As a modern ORM, Dext allows you to control property behavior through attributes directly in the entity code. This not only defines business rules but also automatically configures the interface in the IDE (such as column widths, labels, and masks).

[Table('Customers')]
TCustomerEntity = class
public
[PK, MaxLength(5), Column('CustomerID'), DisplayLabel('Code'), DisplayWidth(10)]
property CustomerId: StringType read FCustomerId write FCustomerId;
[MaxLength(40), DisplayLabel('Company'), DisplayWidth(30)]
property CompanyName: StringType read FCompanyName write FCompanyName;
[MaxLength(30), DisplayLabel('Contact')]
property ContactName: StringType read FContactName write FContactName;
[MaxLength(15), DisplayLabel('City'), Alignment(taCenter)]
property City: StringType read FCity write FCity;
[MaxLength(15), DisplayLabel('Country')]
property Country: StringType read FCountry write FCountry;
end;

Dext offers a wide range of attributes to enrich the design-time experience:

  • [DisplayLabel]: Defines the column title.
  • [DisplayWidth]: Automatically calculates grid column width.
  • [ReadOnly], [Visible], [EditMask], [DisplayFormat], and more.

Use the Refresh Entity Metadata command to have the DataSet reconfigure itself and update the fields in the IDE instantly after any code changes.

Customizing via Attributes Refresh Metadata Updated Fields Attributes Example


Here are the features that make Dext unique for those seeking extreme agility.

Need to check data quickly without setting up grids? The Live Preview command opens an instant visualization window for the selected entity’s data.

Live Preview Action Data Visualization

Dext offers native support for advanced search dialogs with dynamic filters, all ready to be invoked via code or configured in the IDE.

Advanced Search Dynamic Filter in Search


🔄 Phase 5: Reverse Scaffolding (The “Secret Weapon”)

Section titled “🔄 Phase 5: Reverse Scaffolding (The “Secret Weapon”)”

What if you don’t want to start from the database or have a custom TDataSet? Dext can generate entities from any active DataSet.

In this example, we use a dynamically created TFDQuery. Dext reads the field definitions and generates the equivalent entity class in seconds.

Reverse Scaffolding Action Reverse Scaffolding Preview Entity Generated Successfully


The Dext Framework is not just an ORM; it’s a development acceleration engine. It allows the Delphi developer to focus on what really matters—business logic—while the data infrastructure is resolved visually, with high performance and elegance.

Official Dext Repository: Access on GitHub


Originally published at cesarromero.com.br