[quote=35842:@Joseph Claeys] I still don’t know what this client is. Is that just an ORM class that talks to the database?
[/quote]
This is not just ORM class. It is much more complex internally and more effective.
- Valentina engine was started as alrternative to relational dbs in 1993 year.
- at first It was named it as OO-db, later switched to OR Object-Relational db.
- VDB engine (and VReports, VServer, VStudio) are made with C++
In 1998 year we have plug Valentina engine into REALbasic 2.x.
We made that as set of classes:
VDatabase, VCursor – most dbs have this analogs and only
VTable, VField, VSets, …
Total we have about 40 classes and 1000 methods.
This not counting power of SQL
So we try to make Object-Model as on DB level, so on API level for IDEs/languages, which are self Object-Oriented.
=============
In about 2002 we have introduce VSERVER, and of course we was need VCLIENT.
It is obvious that we have try to implement it in such way that existed code of desktop apps was easy switched to client-server mode.
This was big technical challenge. And we resolve it in beauty way. For example, we have mini-parser of our C++ headers, it parses them, generate intermediate XML files, then works XSLT, then works sources generator, which generate a lots of VCLIENT sources automatically. And so on.
But vclient is not just proxy-objects. We have the second level of all that classes, inherited from generated. Where we have made many optimizations on client-side to reduce the number of calls to remote VSERVER.
Exists many other optimizations in our VCLIENT-SERVER:
- server-side cursors – VERY comfortable way to modify records.
- client-side cache – keep records to reduce calls to vserver.
- protocol – is more effective than have mySQL … proved by Xojo developer - he did ORM for Xojo, than for ObjC now. Tests at first against mySQL, then against VServer. Nice was – its ORM – a lots of small queries. Even not huge result-queries
==========
Disclaimer,
I think Antonius did means that Valentina API itself is more OO-style, than pure C of e.g. mySQL or SQLite.
You already have classes.
These classes work 99% same for LOCAL db, so for client/server.
It is still possible think about true ORM around Valentina DB also … and we have plugged it for example on PDO of PHP…
Thorsten have its own cool ORM on ObjC around Valentina model, with use of its unique features, for example Links.
We still going extend Valentina DB model: inheritance, arrays, types, …
Then ORM will be even more logical easy, without that hard “impedance mismatch” …