December 1, 2010

ivan.todorovich ivan.todorov..
Lab Rat
96 posts

ActiveRecord in Qt

Page  
1

Hi,

I wonder if someone has created a library that uses ActiveRecord’s pattern in Qt.

 Signature 

o_o Sorry for my rusted english.

24 replies

December 1, 2010

Volker Volker
Robot Herder
5428 posts

We have created a similar approach in one of our projects. Instead of saving in a database directly, we use some hand-crafted XML to push the data to java based server application that does the actual db operations.

Unfortunately I cannot post source code, as this is a closed source project.

To be flexible, one might consider adding a wrapper level between the objects and the database or provide a kind of database driver for getting and submitting the data to a remote server.

December 1, 2010

Volker Volker
Robot Herder
5428 posts

For those who are not familiar with the concept: A short descripton of ActiveRecord on wikipedia [en.wikipedia.org].

December 1, 2010

Denis Kormalev Denis Kormalev
Lab Rat
1654 posts

Heard about couple of qt projects that provides orm functionality. I will find them and post back

December 1, 2010

ivan.todorovich ivan.todorov..
Lab Rat
96 posts

Hey, thanks. That would really help me.
I was thinking in making an ActiveRecord library of my own, just to satisfy the needs of my project.
But I just thought that would be better to adapt an existing project, don’t you think?
Anyway any help and examples would be appreciated.

I really like the Ruby ActiveRecord’s API [ar.rubyonrails.org].
Thanks,
Iván

 Signature 

o_o Sorry for my rusted english.

December 2, 2010

Andre Andre
Area 51 Engineer
6031 posts

I have a concept mail to the qt mailinglist hanging around with thoughts about this issue. I really think something like this is needed, but it needs to be Done Right ™. ORM frameworks for Qt that I know of are QDjango, QsT SQL Tools, QxOrm and QtPersistence. None of these seem to fit my bill, but there are interesting ideas in some of them.

 Signature 

Looking for Qt developers to join our team @ i-Optics: https://qt-project.org/forums/viewthread/25393/

December 2, 2010

Denis Kormalev Denis Kormalev
Lab Rat
1654 posts

Yes, I’ve meant QDjango, QxOrm and QsT. As I know last one was made to avoid problems in other ORMs for Qt, so maybe it will become awesome tool someday.

December 2, 2010

blex blex
Lab Rat
191 posts
Denis Kormalev wrote:
Heard about couple of qt projects that provides orm functionality. I will find them and post back

http://opensource.bolloretelecom.eu/projects/qdjango/

But I do not know anything about it’s quality.

 Signature 

————————————

Oleksiy Balabay

December 2, 2010

Denis Kormalev Denis Kormalev
Lab Rat
1654 posts

blex, at the September QDjango had too little features. But all other ORMs are also not fully-featured. AFAIK QxOrm is the most featured library now.

December 2, 2010

blex blex
Lab Rat
191 posts
Denis Kormalev wrote:
blex, at the September QDjango had too little features. But all other ORMs are also not fully-featured. AFAIK QxOrm is the most featured library now.

Thank you for information.

But my opinion is that C++ is not a good choice for ORM. ORM lives better in Java and Net :)

 Signature 

————————————

Oleksiy Balabay

December 2, 2010

Andre Andre
Area 51 Engineer
6031 posts
blex wrote:
But my opinion is that C++ is not a good choice for ORM. ORM lives better in Java and Net :)

IMHO, you don’t choose a language just for building an ORM. You use an ORM as part of your application for which you have chosen a language. If you choose Qt, then you have already chosen C++ in most cases.

Back to the issue in question: an ORM for Qt.
Dennis: what specific issues was QsT SQL Tools designed to avoid?

 Signature 

Looking for Qt developers to join our team @ i-Optics: https://qt-project.org/forums/viewthread/25393/

December 2, 2010

Denis Kormalev Denis Kormalev
Lab Rat
1654 posts

Andre, I didn’t use it, but I’ve read QsT maintaners article about it. He said that it was designed to make library users live easier. Also he said that it is not an ORM in common, it is something that is near to ORM. There are some problems witch caching, relations support (QxOrm will be the best in this case), full sql support.

December 2, 2010

Andre Andre
Area 51 Engineer
6031 posts

I just downloaded it, and I immediately noticed one massive drawback for me. All documentation is in Russian. That makes it impossible for me to work with it, I fear. Pitty.

 Signature 

Looking for Qt developers to join our team @ i-Optics: https://qt-project.org/forums/viewthread/25393/

December 2, 2010

Denis Kormalev Denis Kormalev
Lab Rat
1654 posts

Andre, oops, didn’t know it. If you want I can ask maintainer to write english docs.

December 2, 2010

ivan.todorovich ivan.todorov..
Lab Rat
96 posts

Andre wrote:
I just downloaded it, and I immediately noticed one massive drawback for me. All documentation is in Russian. That makes it impossible for me to work with it, I fear. Pitty.

Same :(

BUT, QDjango looks really good. At least for my needs right now.. I will check it out later. Thanks

 Signature 

o_o Sorry for my rusted english.

December 2, 2010

Andre Andre
Area 51 Engineer
6031 posts

Denis Kormalev wrote:
Andre, oops, didn’t know it. If you want I can ask maintainer to write english docs.

Please do. In the meantime, I created a ticket for it on sourceforge with the same request as well. Even the in-code stuff is in Russian, though the method and class names are in English.

 Signature 

Looking for Qt developers to join our team @ i-Optics: https://qt-project.org/forums/viewthread/25393/

Page  
1

  ‹‹ How can I modify the appearance of a QTableView?      Resources from promoted widgets do not appear in main application (designer question) ››

You must log in to post a reply. Not a member yet? Register here!