More on V4RB 4.8.1 apps -- about Class Style ... more

Joseph Morgan joseph at checkos.com
Tue Oct 15 13:29:32 CDT 2013


I agree with Steve. I think allowing the developer to choose is best. But that's what is already what we are doing. Correct?

Joseph

> On Oct 15, 2013, at 12:56 PM, Steve Albin <steve at steve-albin.com> wrote:
> 
>> On Oct 15, 2013, at 1:40 PM, Ruslan Zasukhin wrote:
>> 
>>> On 10/11/13 11:20 PM, "Steve Albin" <steve at steve-albin.com> wrote:
>>> 
>>> I should clarify that I am abandoning the class way for defining the database
>>> tables.  I still create a subclass of VDatabase, but I don't create classes
>>> for all the tables.  I find that if your VTable classes do not match your
>>> database EXACTLY, then you can have problems.  Of course, this should be true
>>> - they should match.  But, in practice I've found that database schemas easily
>>> change.  Fields that had no default defined get a default NULL defined.
>>> Fields that were not defined as indexed get indexed.  I suspect as Valentina
>>> versions change, schemas get updated in subtle ways that may effect how the
>>> VTable classes should be defined.
>>> 
>>> There is no need to use the VTable classes.  Valentina knows what the database
>>> contains already.  I create subclasses of VCursor and do all my access of the
>>> database via SQL.
>>> 
>>> My one application where I switched to not using classes for opening the
>>> tables is much more stable.  I realize that I may have been using the table
>>> classes incorrectly, but I'll take success however I find it.
>> 
>> May be future we will redesign this Class way ...
>> Don't know yet how :-)
>> 
>> 
>> From one side Class-way adds OO-style,
>> Btw it not uses SQL at all, in contrast to ORMs around SQL-dbs,
>> 
>> 
>> Also in contrast to ORM-styles:
>>   they create instance of each tblPerson record ..
>>   we in Class-way have only single - current record
>> 
>> May be we need somehow take best of both ways ..
>> Or allow to developer choose way.
> 
> I may not be understanding all the jargon, but I thought this is the way Valentina already works - using the best of both ways.  We can use the classes for some functions and the SQL for others.  This is what I am doing and it works nicely.
> 
> Steve
> 
> 
> --
> Steve Albin, Montclair, NJ
> http://www.steve-albin.com
> http://www.jazzdiscography.com
> 
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina


More information about the Valentina mailing list