What to expect from Valentina Cocoa?
Philip Mötteli
philip.moetteli at econophone.ch
Fri Dec 9 17:41:56 CST 2005
Am 09.12.2005 um 16:49 schrieb Ruslan Zasukhin:
> On 12/9/05 3:22 PM, "Philip Mötteli"
> <philip.moetteli at econophone.ch> wrote:
>
>>>> So what I have understood so far, is that persistent objects
>>>> have to
>>>> inherit from a common superclass (VObject)?
>
> You are not forced do that.
Good.
>>>> Do I also have to send SQL myself or is that automatically taken
>>>> care of?
>>>
>>> I think both ways can be used
>>
>> Well, I ask differently: Are something like faults used?
>
> Justin?
>
> Shame on me, I do not know yet what is faults.
Let's say, object A references object B (object B is an IVar of
object A). Instead of the persistence layer loading object B from DB,
when object A is accessed, it just creates a placeholder/proxy/fault
and places that object instead of object B. When now object B is
really accessed, then the fault fires and triggers the loading of the
DB record of object B's attributes and replaces itself with the real
object B. This all is of course transparent to the user of such a
persistence library. The user never knows, if he deals with a
transient or a persistent object.
>>> Well, I think I will ask Sergey to spend some time and start develop
>>> examples of Valentina for Cocoa.
>>
>> Thanks. It's ok for me so far. I prefer natural language at this
>> level. But thanks.
>
> Natural language? You mean talk on list ?
Yes. :-)
> No problems. You can ask more questions.
Thanks.
> In short answer to your questions is:
> Valentina is set of classes for different APIs
> (C++, C#, RB, Lingo, Obj-C now)
Actually, my question is: How much transparency does the interface
for Objective-C to Valentina offer?
Complete transparency would be, that I just send the following to any
object, without the need of any model at all:
[someObject becomePersistent]; // Embedded DB
[someObject becomePersistentWithName:FOO onHost:aHostName]; //
Client server model
This should be the one and only line I should have to write in my
program. Just one line. All the objects that are referenced from that
"root" object should automatically become persistent (persistency by
reference). Every change to such a persistent object should be
automatically propagated to the DB (propagation by mutation). This
needs some Aspect Oriented features of the programming language
(bindings).
Basically, the code never knows, if it's dealing with a transient or
persistent object.
Smalltalk has that. And it would be possible in Objective-C, because
Objective-C offers enough structural (so, no need for a model) and
behavioral reflection to implement such an interface too.
Re
Phil
PS: With CoreData we lag a lot more behind this ideal, than we were
with EOF.
More information about the Valentina-beta
mailing list