• Что бы вступить в ряды "Принятый кодер" Вам нужно:
    Написать 10 полезных сообщений или тем и Получить 10 симпатий.
    Для того кто не хочет терять время,может пожертвовать средства для поддержки сервеса, и вступить в ряды VIP на месяц, дополнительная информация в лс.

  • Пользаватели которые будут спамить, уходят в бан без предупреждения. Спам сообщения определяется администрацией и модератором.

  • Гость, Что бы Вы хотели увидеть на нашем Форуме? Изложить свои идеи и пожелания по улучшению форума Вы можете поделиться с нами здесь. ----> Перейдите сюда
  • Все пользователи не прошедшие проверку электронной почты будут заблокированы. Все вопросы с разблокировкой обращайтесь по адресу электронной почте : info@guardianelinks.com . Не пришло сообщение о проверке или о сбросе также сообщите нам.

TMS Aurelius 5 is here! Come see it Live!

Sascha Оффлайн

Sascha

Заместитель Администратора
Команда форума
Администратор
Регистрация
9 Май 2015
Сообщения
1,549
Баллы
155

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

has been released with

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

!

Photo by Tony Hand on Unsplash


Photo by

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

on

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.




As we have

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

, lots of new features were expected for the next major release of

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

, our state-of-art

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

for Delphi. And indeed, Aurelius 5 was released last week!

The

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

provides you can see the full list of new features, improvements and bug fixes. Here are the major new features, and at the end of this article we have a special invitation for you!

Data Validation


You can now add data validation via attributes directly to your entity classes.

[Entity, Automapping]
[Filter('Multitenant')]
TTrack = class
strict private
FId: Integer;
[Required] FName: string;
FGenre: TGenre;
FComposer: Nullable<string>;
[Range(0, 3600000)] FMilliseconds: Nullable<Integer>;
FTenantId: Nullable<string>;
function GetDuration: string;
public


All fields will be proper validated according to the validation attributes applied. With a few lines you will guarantee that the entity will be persisted with a valid state.

The above class is part of the Music Library demo provided with TMS Aurelius (trial and registered versions).

Note how the track name is required, and the duration must not be greater than one hour (3600000 milliseconds). If you try to save something with wrong data, Aurelius will automatically prevent the user from doing so and raise an exception:

Data Validation Example


Global filters and multitenancy


Aurelius now includes global filter mechanism. Users will be able to define filters globally, including parameters, and choose which entities will have it applied.

The Music Library demo was made multitenant with a few lines of code. The entities were marked with a new global filter definition:

[Entity, Automapping]
[FilterDef('Multitenant', '{TenantId} = :TenantId')]
[FilterDefParam('Multitenant', 'TenantId', TypeInfo(string))]
[Filter('Multitenant')]
TGenre = class
strict private
FId: Integer;
[Required] FName: string;
FTenantId: Nullable<string>;


And, from that, Aurelius allows you to enforce values in filter (to prevent a wrong tenant id to be saved) and also enable filters to retrieve data:

Manager.EnableFilter('Multitenant')
.SetParam('tenantId', CurrentTenant);


That was it! Music Library demo is now multitenant, with a few UI changes to allow the end-user to choose which tenant to use, data is now fully separated between tenants.

Data Validation Example


Attribute-based event handlers


Events are an important feature of any framework, and with Aurelius is not different. It

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

to add custom business logic. You can add specific code just before an entity is being saved, after an entity is deleted, when an SQL is being executed, among others.

But now you can add event handlers directly in your classes, using attributes. You can use it for logging for example, or even to add custom, more complex data validation.

The Music Library demo also shows how to do it:

TGenre = class
{...}
public
[OnValidate]
function Validate: IValidationResult;

{...}

function TGenre.Validate: IValidationResult;
begin
if SameText(Name, 'Experimental') then
Result := TValidationResult.Failed('Experimental music is not allowed')
else
Result := TValidationResult.Success;
end;


Such validation will be applied, and Experimental genres will not be allowed in our Music Library app!

Come See it Live!


There are more new features, actually: TObjectManager.AddOwnership method, Aurelius Dataset can now refresh fields directly from objects and automatically destroy the source list, etc.

But, what about if you come and see the new features live, in action, with a more deep explanation?

The free webinar

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

will be held next Wednesday, March 24th, at 4pm UTC at the

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

.

In this webinar,

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

, TMS Aurelius architect, will explain to newcomers what TMS Aurelius is about, how to use it, and then show all the new features in action, with real code.

And of course, it will be a live session: you can ask questions and participate!

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

and learn more about this amazing ORM framework!


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

 
Вверх Снизу