DMVCFramework 3.0.0-hydrogen - What's New
DMVCFramework 3.0.0-hydrogen
Release Date: 2018
The beginning of the 3.x series - a complete rewrite with modern architecture.
Major Features
MVCActiveRecord ORM
Introduction of the built-in ORM:
[MVCTable('customers')]
TCustomer = class(TMVCActiveRecord)
private
[MVCTableField('id', [foPrimaryKey, foAutoGenerated])]
FID: Integer;
[MVCTableField('name')]
FName: string;
public
property ID: Integer read FID write FID;
property Name: string read FName write FName;
end;
// CRUD operations
Customer := TCustomer.Create;
Customer.Name := 'John Doe';
Customer.Insert; // INSERT INTO customers...
Customer.Name := 'Jane Doe';
Customer.Update; // UPDATE customers SET...
Customer.Delete; // DELETE FROM customers...
Attribute-Based Routing
Declarative routing with attributes:
[MVCPath('/api/customers')]
TCustomerController = class(TMVCController)
public
[MVCPath('/($ID)')]
[MVCHTTPMethods([httpGET])]
procedure GetCustomer(const ID: Integer);
end;
JSON-RPC 2.0 Support
Full JSON-RPC 2.0 implementation for RPC-style APIs.
Modern Architecture
- Clean separation of concerns
- Middleware pipeline
- Dependency injection foundations
- Cross-platform preparation
Breaking Changes from 2.x
Version 3.0 is a major rewrite. Migration from 2.x requires significant changes. See migration guide in documentation.
Comments
comments powered by Disqus