- Регистрация
- 9 Май 2015
- Сообщения
- 1,071
- Баллы
- 155
- Возраст
- 51
I consider Aurelius Dataset (TAureliusDataset) a hidden gem of TMS Aurelius. Well, not exactly "hidden" because it's a significant part of it to deserve its own , but in the sense that it's different from the normal ORM "core" which is update, insert, delete, select, query, etc.. And for that it's #4 of .
The first misunderstanding about the TAureliusDataset is confusing its usage with the regular way we use Delphi datasets. I've been in discussions in forums with people that were blaming the usage of dataset, because it's not "good practice", because logic should be in the controller/model, etc., etc..
The point is Aurelius Dataset is for data binding. It's not about retrieving data. You will retrieve data the same way with or without the dataset. Your logic, controller and model will still be isolated. But when it comes to show or edit data of an entity in a visual form, you don't have to manually do things like this:
edCustomerName.Text := Customer.Name;
edCustomerCity.Text := Customer.City;
or even worse, to populate a grid or list (pseudo-code):
Grid.Clear;
for Customer in Customers do
begin
CurrentRow := Grid.AddRow;
Grid.Columns[0, CurrentRow] := Customer.Name;
Grid.Columns[1, CurrentRow] := Customer.City;
end;
that's tiresome, repetitive and not necessary with Aurelius Dataset. You just set the "data" of the dataset, which are your objects:
AureliusDataset1.SetSourceList(MyCustomerList);
or
AureliusDataset1.SetSourceObject(MyCustomer);
and you bind the dataset to data ware controls! Or to regular controls use live bindings. Or provide the dataset to some report tool.
The coolest thing about the Aurelius Dataset is that its minor features and high integration with Aurelius. It's not just a generic binder between Delphi objects and controls. But it handles smoothly a lot of specific Aurelius features like:
and provide the regular dataset mechanisms but adapted to the object-oriented approach, like:
And finally, it handles smoothly as well. You can have a criteria that is , avoiding all objects to be retrieved at once, and at the same time avoiding a cursor to be open to the database!
Watch the video above to see Aurelius Dataset in action, and if you want to get notified about upcoming videos, subscribe to our !
The first misunderstanding about the TAureliusDataset is confusing its usage with the regular way we use Delphi datasets. I've been in discussions in forums with people that were blaming the usage of dataset, because it's not "good practice", because logic should be in the controller/model, etc., etc..
The point is Aurelius Dataset is for data binding. It's not about retrieving data. You will retrieve data the same way with or without the dataset. Your logic, controller and model will still be isolated. But when it comes to show or edit data of an entity in a visual form, you don't have to manually do things like this:
edCustomerName.Text := Customer.Name;
edCustomerCity.Text := Customer.City;
or even worse, to populate a grid or list (pseudo-code):
Grid.Clear;
for Customer in Customers do
begin
CurrentRow := Grid.AddRow;
Grid.Columns[0, CurrentRow] := Customer.Name;
Grid.Columns[1, CurrentRow] := Customer.City;
end;
that's tiresome, repetitive and not necessary with Aurelius Dataset. You just set the "data" of the dataset, which are your objects:
AureliusDataset1.SetSourceList(MyCustomerList);
or
AureliusDataset1.SetSourceObject(MyCustomer);
and you bind the dataset to data ware controls! Or to regular controls use live bindings. Or provide the dataset to some report tool.
The coolest thing about the Aurelius Dataset is that its minor features and high integration with Aurelius. It's not just a generic binder between Delphi objects and controls. But it handles smoothly a lot of specific Aurelius features like:
and provide the regular dataset mechanisms but adapted to the object-oriented approach, like:
And finally, it handles smoothly as well. You can have a criteria that is , avoiding all objects to be retrieved at once, and at the same time avoiding a cursor to be open to the database!
Watch the video above to see Aurelius Dataset in action, and if you want to get notified about upcoming videos, subscribe to our !