Become a member!

DMVCFramework 3.4.1-sodium - What's New

DMVCFramework 3.4.1-sodium

Release Date: January 3, 2024

This release adds Delphi 12 Athens support, the Sempare Template Engine adapter, and important MVCActiveRecord improvements.


Major New Features

Delphi 12 Athens Support

Full support for Delphi 12 Athens including:

  • New packages for d120
  • Improved tasks.py to auto-detect the best Delphi version
  • Defined conditional ATHENSORBETTER

Sempare Template Engine Adapter

New server-side view engine option using the Sempare Template Engine:

// Use Sempare templates
Engine.SetViewEngine(TMVCSempareViewEngine);

Features:

  • High performance
  • Clean syntax
  • Full integration with DMVCFramework view model

foVersion Field Option

Optimistic locking support for MVCActiveRecord:

[MVCTable('articles')]
TArticle = class(TMVCActiveRecord)
private
  [MVCTableField('version', [foVersion])]
  FVersion: Integer;
public
  property Version: Integer read FVersion write FVersion;
end;

The foVersion option automatically:

  • Increments version on update
  • Raises exception if version mismatch (concurrent modification)

TMVCActiveRecord.GetCustomTableName

Override table name dynamically per instance:

TMyEntity = class(TMVCActiveRecord)
protected
  function GetCustomTableName: string; override;
end;

function TMyEntity.GetCustomTableName: string;
begin
  Result := 'custom_table_' + FormatDateTime('yyyymm', Now);
end;

Other Improvements

Template Engine Improvements

  • Updated TemplatePro
  • Improved Mustache helper for issue #693

Console Improvements

  • Huge improvements to MVCFramework.Console
  • Interactive text-based menu handler
  • Arrow keys handling
  • Default colors handling
  • Improved table drawing

Bug Fixes

  • Mustache View Engine fix for absolute view paths
  • Improved encoding caching
  • Better error messages for HTML responses

Updated Dependencies

  • LoggerPro updated with LogFmt support
  • TSQLTimestampOffset support in datetimetostr


← Back to DMVCFramework

Comments

comments powered by Disqus