Blog

All Blog Posts  |  Next Post  |  Previous Post

What is TMS Aurelius?

Bookmarks: 

Friday, November 18, 2011

I've been working with Delphi and databases for years already (actually I'm this close to say "for "decades" - in plural).
In database programming we all typically do the same: create SQL statements, execute it in the database and retrieve results back, using a TDataset descendant object which we use to iterate through data.
I guess that just like most of you who work regularly with databases, we've all used or written at some point small, medium-size "frameworks" to make these tasks a little more simple. Functions that build the SQL statement automatically based on some parameters, client datasets that build update statements, data dictionaries, etc.. In the past months though, I have switched several large projects including projects of customers to a new framework, built from the ground up.

It's basically something that prevents you from writing code like this:
Query1.Sql.Text := 'SELECT I.ID AS INVOICE_ID, I.INVOICE_TYPE, I.INVOICE_NO, I.ISSUE_DATE, I.PRINT_DATE, ' +
  'C.ID AS CUSTOMER_ID, C.CUSTOMER_NAME, C.SEX, C.BIRTHDAY, N.ID AS COUNTRY_ID, N.COUNTRY_NAME' +
  'FROM INVOICE AS I INNER JOIN CUSTOMER AS C ON (C.ID = I.CUSTOMER_ID) ' +
  'LEFT JOIN COUNTRY AS N ON (N.ID = C.COUNTRY_ID)' +
  'WHERE I.ID = :INVOICE_ID;'
Query1.ParamByName('INVOICE_ID').AsInteger := 1;
Query1.Open;
ShowMessage(Format('Invoice No: %d, Customer: %s, Country: %s',
  [Query1.FieldByName('INVOICE_NO').AsInteger,
  Query1.FieldByName('CUSTOMER_NAME').AsString,
  Query1.FieldByName('COUNTRY_NAME').AsString]));  
and instead write this:
Invoice := Manager1.Find<TInvoice>(1);
ShowMessage(Format('Invoice No: %d, Customer: %s, Country: %s',
  [Invoice.InvoiceNo, Invoice.Customer.Name, Invoice.Customer.Country.Name]));
Yes, it's an ORM framework! Instead of dealing with SQL statements, deal with objects directly, hiding all SQL intricacies for you.

We made it a generally useful ORM framework. We added a lot of features. We added lot of documentation, examples and demos. We tested it heavily with several databases and data-access components. We will release it very soon. And it's from TMS Software.

Wagner Landgraf


Bookmarks: 

This blog post has received 49 comments.


1. Monday, November 21, 2011 at 10:32:23 AM

Look fine!
In my application I use two database - Firebird and MSSQL. Is it possible to use this product for two database in one app? Thank you.

Sergey Ivanov


2. Monday, November 21, 2011 at 11:14:42 AM

We''re working on final features now. Currently it''s possible use both databases, but the object-relational mapping must be the same for both databases.

Wagner Landgraf


3. Monday, November 21, 2011 at 2:56:35 PM

Sounds very good.

Maybe if you use the absolutely superb anydac data-access components you will be able to target virtually any database.

Tom Conlon


4. Tuesday, November 22, 2011 at 5:30:15 AM

Several data-access components are supported - dbExpress, ADO, AnyDac, etc.

Wagner Landgraf


5. Tuesday, November 22, 2011 at 7:35:23 AM

I wish it will support Sqlite without any 3rd party dependencies.

Ye Zhihua


6. Tuesday, November 22, 2011 at 4:35:20 PM

Nice, finally more movement in the delphi world with the generics!!

But need more info though to see how the mapping is done and if we can replace our own ORM (well, its more a object - sql mapper with proxies, mediators etc)

Where can i signup for more info?

Marius


7. Wednesday, November 23, 2011 at 4:25:04 AM

ancious to see it :)

paulo quicoli


8. Wednesday, November 23, 2011 at 7:56:58 AM

@Marius: mapping is currently done with attributes. We also can consider adding more mapping modes in future (xml for example). Aurelius is designed to be non-intrusive, i.e., you can start using it almost without changing anything in your application, you can use Plain Old Delphi Objects. Send us an e-mail for more info.

Wagner Landgraf


9. Wednesday, November 23, 2011 at 8:29:23 AM

Looks promising..

Steve Faleiro


10. Wednesday, November 23, 2011 at 8:16:36 PM

When oh when will it be available?


Campbell Neal


11. Thursday, November 24, 2011 at 8:06:55 AM

Sounds good and sure fill a void that was felt for some time now.

oorja


12. Thursday, November 24, 2011 at 11:04:26 AM

Do you have a release data?
Which Delphi versions will be supported?

Magno Machado Paulo


13. Thursday, November 24, 2011 at 12:33:07 PM

@Magno: Beta should be release shortly (couple of weeks). It uses a lot of new Delphi features (Rtti, generics, attributes, operator overloading, etc.) so it will be available for Delphi 2010 and up.

Wagner Landgraf


14. Friday, November 25, 2011 at 8:46:54 PM

Will it supoort Nexus DB ?

Conner Robert


15. Saturday, November 26, 2011 at 5:42:36 AM

@Conner: Yes, Nexus DB will be supported.

Wagner Landgraf


16. Sunday, November 27, 2011 at 4:06:29 AM

Hi Wagner

very nice!!!

I''m anxious to try it;-)

There will also be support for ElevateDB 2.x Unicode?

Claudio Piffer


17. Tuesday, November 29, 2011 at 3:56:56 AM

Actually you don''t show the entire code, in the first part
-sql preparation
-sql execution

in the new style
-prototype
-sql execution

I don''t see really a big gain except that you can now express tables as classes, but you end up writing sometimes even more code than old fashioned.

I mean its really cool that you have this now but I don''t get ORM in general to be more efficient.

Neil


18. Tuesday, November 29, 2011 at 6:13:46 AM

@Neil: only thing missing in the code is the class mapping, which would be adding attributes to the fields for the mapping. Actually if automapping is use, not much more code is needed: just a single attribute informing the automapping.
ORM is not conceptually better than SQL or any other thing. It''s just a tool. It can be useless for you, but can fit well and be very useful for others. It''s up to us to provide a good tool and explain how you use it. It''s up to you to tell if it''s good for your needs or not.

Wagner Landgraf


19. Thursday, December 1, 2011 at 2:34:09 PM

Good Job ! I think that a ORM Framewrok its very important and extremelly necessary for any developer.

will it support DATASNAP ?

I´m waiting for it !

regards


Ricardo Pascoal


20. Sunday, December 4, 2011 at 12:00:22 PM

@Ricardo: Datasnap is supported in the sense that you can just use the regular dbExpress driver. If you''re working on client yo can just use a shared connection, if you are working on server it''s a regular usage of Aurelius, then you just provide the queried objects to the client.

Wagner Landgraf


21. Monday, December 5, 2011 at 11:51:50 AM

Hi Wagner,

This framework will binding the object BO with componentes not dbware or we need gonna user livebindings for it ?

could you post a complete example of persisting a class or a video demo ?

thanks

Ricardo Pascoal


22. Tuesday, December 6, 2011 at 9:48:50 AM

Livebindings can be used to bind objects to the controls. For dbware componentes, we''''re investigating if it''''s worth it to make a TDataset wrapper, if there is enough demand we can make objects bind to dbcontrols. Note that Aurelius uses new technology and is only available from Dephi 2010 and up, so live bindings is the new upcoming technology to use.


Wagner Landgraf


23. Wednesday, December 7, 2011 at 11:16:12 AM

Will this be part of the VCL subscription? Do you have pricing established if purchased outside the subscription?

Greg


24. Thursday, December 8, 2011 at 12:35:33 PM

Aurelius will not be added to TMS VCL Subscription, it will work with FireMonkey, IntraWeb , so much more than just VCL.

Bruno Fierens


25. Friday, December 9, 2011 at 9:21:24 AM

The ORM seems very promising and I would like to try.
When is the release date?

C@uly


26. Sunday, December 11, 2011 at 4:19:19 PM

We plan to release it in a couple of weeks.

Wagner Landgraf


27. Monday, December 12, 2011 at 4:29:02 PM

Is it support Many-To-Many relationship?

Majid


28. Tuesday, December 13, 2011 at 6:08:20 AM

In the first version Many-To-Many relationships will be supported with an intermediate class.

Wagner Landgraf


29. Friday, December 16, 2011 at 3:36:17 AM

Hi, would you like give me comparation betwen you ORM framework and InstantObject? FYI, i''m using InstantObject and it works fine

thx

Bagus Prasojo


30. Friday, December 16, 2011 at 5:28:17 AM

Bagus, well, if it''s working fine for it, why change? ;) If there is something specific you miss, let me know, I can tell you if Aurelius can do it. I don''t know InstantObjects in deep, so can''t talk much. What I can say is that different from many ORM out there, Aurelius uses all the new features in Delphi (so no Delphi 7 version, sorry). It means that most of methods and collections are strongly typed (generics), you map your classes at compile time using attributes, you can have your entity objects inherit from any class (including TObject), you can map on public properties or fields, etc.. Also Aurelius supports lazy loading, has full query API, projections, in queries, etc.

Wagner Landgraf


31. Friday, December 16, 2011 at 11:39:06 AM

Do you have documentation that one can preview to be familiar with the feature sets? That may allow individual to do their own comparison with other ORM. Do you have any idea what it will cost?

Thanks,
Femi

Femi


32. Monday, December 19, 2011 at 6:35:25 AM

Femi, I have sent you an answer to your e-mail with this info.

Wagner Landgraf


33. Tuesday, December 20, 2011 at 5:25:53 AM

tms Aurelius is already available? how can I buy this product?

giuliano


34. Tuesday, December 20, 2011 at 7:30:36 AM

Not yet. We''re working hard to have it released as soon as possible.

Wagner Landgraf


35. Monday, January 2, 2012 at 6:13:49 PM

Bruno (#24) is suggesting it will be only available for FMX or Intraweb. I''m sure i''m reading/understanding this wrong, could somebody please eleberate on this..

Aurelius seems to be (just another nice) way of mixing queries and objects (basicly just support classes) and like mentioned before i''m very interested in the first release. We will need a mix of Aurelius and the good old query power (and thats including the ugly dbgrid approach)

Marius


36. Tuesday, January 3, 2012 at 11:54:06 AM

This looks interesting! Any chance MS Access databases might be supported?

Also, is this project related to the Data Modeler product you have?

Troy Wolbrink


37. Tuesday, January 3, 2012 at 12:01:48 PM

Aurelius will be available for VCL, FMX and Intraweb. Bruno was trying to say that Aurelius was out of VCL subscription scope because it goes way beyone the VCL-only world.

Wagner Landgraf


38. Tuesday, January 3, 2012 at 12:37:55 PM

1) MS Access won''t be supported in the first version.
2) Data Modeler 1.8 update will include support for Aurelius code generation

Bruno Fierens


39. Thursday, January 19, 2012 at 10:33:52 AM

Hi.

They plan to support Data-Access http://www.devart.com/ibdac/ IBDAC components?

If so, have a due date?.

Thank you.

James


40. Sunday, March 18, 2012 at 4:43:56 PM

We are testing Aurelius in Delphi and like very much. You will create a version for. NET?? This is very important for the standardization of our codes.

Edson


41. Monday, March 19, 2012 at 10:42:42 AM

I''m not sure there will be a .NET version. Aurelius came because Delphi world really missed a robust and solid ORM framework, but for .NET there are plenty of options.

Wagner Landgraf


42. Monday, January 28, 2013 at 1:14:20 PM

Hi,

Working with explicit transactions with TMS Aurelis? (StartTransaction, Rollback, Commit, InTransaction).

I would encapsulate the transaction in a class AOP (Aspect);

Hugo Castro


43. Thursday, January 31, 2013 at 5:53:52 AM

You can use transactions with the IDBConnection interface:

Var
Trans: IDBTransaction;
begin
Trans := MyConnection.BeginTransaction; // MyConnection is IDBConnection
Try
//...
Trans.Commit;
Except
Trans.Rollback;
Raise;
End;
End;


Wagner Landgraf


44. Friday, February 1, 2013 at 1:54:58 PM

Thank you for your attention.

How to know if you have an active transaction?

Something like, IDBConnection.InTransaction. (I see that there is not a method signature in the interface)

Hugo Castro


45. Saturday, February 2, 2013 at 2:46:54 PM

The is no such method yet, but be aware that transactions can be nested in Aurelius, i.e, if you call BeginTransaction twice, then you call Commit twice, the transaction will only be commited in second Commit call.

Wagner Landgraf


46. Friday, May 17, 2013 at 4:05:41 AM

Hello

Currently we''re using data access components (ODAC) with CashedUpdates feature (it''s possible to change few records of dataset than call CancelUpdates and dataset rollback all changes on modified records)

Is it possible to implement CashedUpdates functionality in TAureliusDataset or somehow simulate it without requery data from server?

Thank you
Anton Jarmolovic

Anton Jarmolovic


47. Friday, May 17, 2013 at 7:12:35 AM

I''ve send you an answer through e-mail, since you asked through our support e-mail as well. In summary you could do it reloading data from server, TAureliusDataset doesn''t implement a local cache besides one per record.

Wagner Landgraf


48. Sunday, October 20, 2013 at 8:41:24 PM

can you provide a many-to-many mapping example?

Sergio Jonas Schulz


49. Thursday, October 24, 2013 at 5:10:27 PM

Currently many-to-many is done by using an intermediate class that represents the table joining the two entities (for example, a class TCustomerAddress that has two properties: Customer and Address). You can send us an e-mail directly and we can discuss more technical details.

Wagner Landgraf




Add a new comment

You will receive a confirmation mail with a link to validate your comment, please use a valid email address.
All fields are required.



All Blog Posts  |  Next Post  |  Previous Post