The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

C++ ORM

Anyone know of a good c++ object relational mapper?

I have run across dtl (http://dtemplatelib.sourceforge.net/index.htm), has anyone had experience with this library?
AnonyMouse
Thursday, June 15, 2006
 
 
I opted to write my own -- it's not a particularly difficult job.  I defined an intermediate object/table data description language from which I derived C++ classes and SQL scripts to construct the relevant tables/indexes.  I was also able to express restrictions and foreign key constraints in this language, which came in handy when I applied this system to a popular DBMS which didn't support constraints/foreign-keys (so I was able to implement triggers and cascading deletes in a system that didn't natively support them).
Kalani
Thursday, June 15, 2006
 
 
Yeah, I actually ran across your post on another forum.  Is it the KTLib you are talking about?

Thursday, June 15, 2006
 
 
I went the same way and rolled my own ( http://ceamus.com/objbuilder/ )

Mine assumes that the database is the key.  Objects get generated based on what's found in the database.  It uses XSLT and XML, because they're made of magic fairy dust and solve everything.  More specifically, they let you get as tricky as you want with your generated objects.

I've included sample templates for using C++ with the native SQLite library, as well as PHP and the PDO libraries.  If you need it I can also supply code to handle an ODBC connection with Delphi.
Clay Dowling Send private email
Friday, June 16, 2006
 
 
Blank,

Maybe you read a post of mine a while back on LTU.  The project I mentioned there was actually something different.  It was a full relational database whose 'tuple source' could be in-memory/computed rather than just read off of records on disk -- the example I had was a program that let you execute SQL-style queries against a set of live window objects:

http://www.kalanithielen.com/applets/objsql_big.gif

This other ORM project I had was a bit more practical, and I've only used it for my day job.  It's based on an intermediate language I've defined, from which C++ class front-end code, SQL scripts, and script bindings are derived.
Kalani
Saturday, June 17, 2006
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz