The Latin name Aurelius means Golden. Has TMS Software created the “Golden” Object Relational Mapping [ORM] Framework? Like any tool, it depends on your perspective and needs ... and for me, it sure looks like they have. Let me explain ...
I’m pretty sure that I’ve kissed every frog that exists in the land of Delphi ORM/OPF and it’s only now, that I think I’ve finally found the prince[ss]. I installed the product, opened the simple example in D2010Pro, read the Quick Start Guide, reviewed the code and ran the demo ... and knew, not only what was going on, but everything I needed to know to get a trivial Hello World application of my own up and running. This is a new experience for me. If I was going to design and build a ORM framework to be used with Delphi, admittedly the end result would likely be nothing even remotely close to TMS Aurelius, but it would be exactly what I have in mind and be striving to attain.
For me, probably the most significant point in evaluating an ORM framework for use would have to be “Does it persist an out of the box class?”. Some do – even without late breaking language enhancements, but many don’t. By taking advantage of language enhancements in the IDE, TMS Aurelius does – in spades. I’m speaking primarily of class attributes and anonymous methods but I expect the RTTI enhancements are getting a good workout [under the hood] as well. With some frameworks there is nothing even remotely resembling a “class” once you’re finished dressing them up. Having said that, most were developed long before the new language enhancements came along.
TMS Aurelius, from what I’ve read, really doesn’t seem to give a damn about the name of database you use on the backend. It seems to be designed to switch between them whenever it suits you. I also don’t think any ORM framework that I’ve seen, is as “switchable” on the back-end as this product – although with some of them, I never got close enough to this particular feature to know for certain. The product just happens to cover all “my” database needs but then, my needs are simple. The few utilities I have in use, all currently use MS Access for storage. I’ve been looking at Firebird as a replacement on one and possibly SQLite for a couple of others, but being busy searching for the perfect ORM, have yet to move in that direction. Looks like the opportunity may have finally arrived. The product ships with Component Adapters for AnyDac, dbExpress, dbGo (ADO), Interbase Express (IBX), NexusDB, SQL-Direct and SQLite, with the promise of more to follow – at least that’s what I’ve read.
You seem to have the power to to do pretty much anything you’ve ever wanted to do with an ORM framework. You can get your hands as dirty as you would like or just sit back and let the framework handle things for you. One question you see a lot is “Can I map to an existing database/structure?”. Apparently this isn’t a problem with TMS Aurelius. Personally, I think it’s a winner.
Maybe you should have a look.
… thanks for stopping by,
Dave
Sounds good.
ReplyDeleteCould you do short review and collect all ORM stuff out there for Delphi. This TMS Aurelius sounds good, but it's an commercial one, and now I would need Free one for my Hobby utils.
Hi Tommi, there's one here but it's a bit dated:
ReplyDeletehttp://tdelphihobbyist.blogspot.com/2008/01/win32-object-persistence-frameworks.html
It's missing a few of the more recent projects.
Hope that helps
All those are "local" ORM. What about a Client-Server ORM?
ReplyDeleteIn a Service Oriented world, it does make sense to have such a Client-Server ORM.
For instance, our free Open Source mORMot is able to connect remotely to its RESTful server to handle objects, transmitted in JSON. You can use a Delphi client, but also any other client - including AJAX clients, since JSON is a JavaScript format. I'm prototyping using it with http://www.op4js.com to code clients in Object Pascal, and run them as web apps. Your clients does not require a database connection - just a HTTP channel.
Of course, it does need to inherit from a particular class to work (TSQLRecord), but it allows strong typing and enhanced methods. It uses in-memory DB, or SQLite3 (statically linked), or any other DB (including native drivers for MS SQL or Oracle). I'm working on making reverse-engineering from any existing DB more direct.
It has an UI layer integrated - including grid, reporting, form edition, ribbon and i18n. You can implement services (via methods, but next version will come with interface services, like DataSnap). ORM is not just about data persistence, it can be the ground of RESTful services. I'm not saying it will fit all needs, of course. But it is worth considering not only some Entity Framework clone for Delphi. Objects deserve more than a DAL.
Works from Delphi 6 up to XE2. More than 700 pages of PDF documentation.
http://synopse.info/fossil/wiki?name=SQLite3+Framework
I still don't quite understand what advantage an ORM frame work gives me. My current app includes 100's of lines of carefully handcrafted SQL - so what will be different ?
ReplyDeleteDavid
I am not going to discuss my concerns about mORMot in detail here but one of my personal NoGos about it (at least as I remember from last time I have looked at it which has been a while) was that you have to inherit from that TSQLRecord class.
ReplyDeleteAbout the Client-Server ORM vs "local" ORM: With the architecture of Aurelius it should be possible to implement IDBConnection and "simply" making it multi tier.
Hi Dave, I really appreciate your words.. Just wanted to comment one thing: you asked "can I map to an existing database". The answer is yes of course, but one thing people are overlooking is TMS Data Modeler. It can reverse engineer your database, and generate the classes for you. So it's a tool that is smoothly integrated with TMS Aurelius. Thanks again.
ReplyDelete@Stefan Implement IDBConnection? There is a whole bunch of interfaces to implement, much more than IDBConnection. If you take a look at our documentation, you'll find out that a RESTful ORM is MUCH more than just a DAL. It will introduce a true SOA, including e.g. Business logic.
ReplyDelete@Wagner The TMS Data Modeler is a nice and powerful tool. I hope it will be soon able to generate external file mapping (attributes are sometimes not enough with complex existing DB).
Thank you. Will check...
ReplyDelete@ Tommi ... I neglected to mention, in the manual under Copyright Notice you'll find "TMS Aurelius framework trial version is free for use in non-commercial applications ...". You need to read it in full but, to me, it means I can use it as much as I want as long as it is not in a product that I sell. It also means you do not get the source code ... I can live with that. Again - you must read the section in its entirety.
ReplyDelete@ Arnaud ... What about a Client-Server ORM? Excellent question. It's totally outside the scope of my current needs, and I was pretty specific that I was posting about my specific needs, but certainly something for me to have a look at in the future. I did go and have a quick look at mORMot as a result of your post and it is something that I'm interested in having a look at. Perhaps it may sway me to believe that Client-Server is of value to the utilities I build.
ReplyDeleteThanks.
@ David ... in a nutshell [totally from my perspective] nothing. You could save yourself the bother on the next project though. Perhaps Wagner [who I think is the lead on the product for TMS] could comment.
ReplyDeleteThanks
@ Wagner ... I was actually speaking of the ability to map to an existing database within the framework and I expect that's exactly what you will get using TMS Data Modeller. Having said that, I've downloaded and tried TMS Data Modeller. It doesn't do MS Access databases [from the trial that I did] so the product was removed. I'm currently using a competitors product for what TMS Data Modeller does - with the exception of creating the classes of course :)
ReplyDeleteThanks.
@ Stefan ... thanks for your comments.
ReplyDeleteAurelius is not opensource but by its design I found many handles suggesting to me many similarities with the defunct brasilian [Persiphi](http://code.google.com/p/persiphi/) in google project. Have a look at this [thesis](http://deschamps.blog.com/files/2011/03/Framework-ORM-Delphi-Monografia.pdf). Same code samples (Music). In DBConnection.pas (Aurelius) unit you find this comment { TConexaoUnica } at line 118: This sounds portugese. It calls for clarification (Offshore developpent?) !
ReplyDelete@Anon ...
ReplyDeletehttp://code.google.com/p/perseph/ works. I don't know and can't read PHP so I could only get as far as the license agreements the code was produced under.
I spent quite a bit of time with DBConnection files in Aurelius over the last couple of days and think it's quite brilliant. I have no clue if it's a direct translation of the PHP parent but for what I did understand of it - it certainly didn't look like it to me.
The Deschamps's Blog seems to have been taken down. Quite recently too. Can't access the
PDF.
"It calls for clarification" ... why? Yea, it looks like the source of the idea/concept/product. I read the license agreement that is located in the trunk and it all seemed fine to me but IANAL. Not that what I think affects TMS Software business practises.
"Offshore developpent?" ... really, so what? I don't think using an OS product that was developed "offshore" fits into the description. Where is TMS Software HQ located? Not that it matters but are you sure they didn't do Persephone?
I'm not seeing the issue here.
Here is an ORM that works with Firebird
ReplyDeletehttps://www.kellermansoftware.com/p-47-net-data-access-layer.aspx
@Asava
ReplyDeleteYour link is about a .Net ORM...
I do not understand how it is relevant with this blog post, which focuses on Delphi.
Looking for ranking?
@Dave
ReplyDeleteAbout the flexibility of using swapping a database engine, mORMot is now pretty powerful.
You can set an external database for each table (or all at once, of course), then switching from one engine to another is just changing a TSQLDBSQLite3Properties kind of class to TSQLDBOracleProperties. Then all is done in the background.
And the internal SQLite3 kernel, by using its virtual table mechanism, is able to JOIN those external tables. That is, you can make a JOIN between several tables hosted on diverse databases engines. I suspect Aurelius is not able to do that.
About performance, we did not evaluate Aurelius, but it was reported that mORMot is much faster - see http://synopse.info/forum/viewtopic.php?pid=6363#p6363
In latest 1.18 revision, you have access of any DB.pas - based libraries, in addition to direct access to ODBC, OleDB, Oracle, SQLite3 and ZDBC. Firebird is therefore a new first class citizen in mORMot, via ZDBC direct connection.
Still missing the integration of existing databases.
It is in the road map!