AW: [V4MD] please read ALL: what about next idea -- let's take some Arca syntax ?

Florian Bogeschdorfer fb at memedia.de
Mon Jan 23 07:33:50 CST 2006


Hi Ruslan!

> 
> 1) single QUERY function in Database class, which eliminates need of
> cursor
> at all.
> 
>     Hmm. I believe in V4MD 1.x was such function. Also we did have similar
>     db level function in the Valentina for WebSiphon about 5 years ago.
> 
>     So it is good idea add such function to V4MD 2 back.

I am still learning VNET and on MD I am using 1.1 but if you removed this
function: YES, bring it back. Also for compability.

> 
> 
> 2) In Vcursor class we have
>         GetRecordAsPropList(),
>         GetRecordsAsPropList().
> 
>    and we have functions which can return records as SIMPLE list,
>    and as Strings formated with some delimiters. So we have a lots here.
> 
> BUT. GetRecordsAsPropList() returns prop list in format
> 
>     [ [#fld1_name:v11, #fld2_name:v21],
>       [#fld1_name:v12, #fld2_name:v22],
>       [#fld1_name:v13, #fld2_name:v23],
>       [#fld1_name:v14, #fld2_name:v24]
>     ]
> 
> It is easy to see that this function stupidly create field names many
> times.
> IF you look on Arca list, then its author have extract field names into
> separate sublist, and rows go as simple list in fact.
> 
Well I do not see big advantages here. But if you like it :-)
> 
> 
> I think we can:
> 
>     * rename existed functions to
>                 RecordAsPropList2() // deprecated
> 
>     * and have RecordAsPropList() with new behavior.
> 
> So people that use them now will need just find/replace to fix existed
> code.
> All new code will go with these new methods.
> 
> What you think about this plan ?

Very bad idea. Why force people who update from V1 to V2 (and there are
still many of V1 users I would guess) to change their code?

Make new names for new functions. If you feel it is easier to no longer
mention these functions in the manuals - OK. But do not use functions with
same name and different results. Again: very bad idea.

And something general: the beginning with Valentina was not easy, yes. But
the cursor thing is brilliant when you got used to it. If you want to make
it easier for beginners, it would be a good idea to use 

db.SqlExecute() as integer
db.Query() as VResult

The the only more functions you would need are

ValentinaInit()
ValentinaCreate()
ValentinaOpen()


If you do so, it would be a good idea to change the docs in the same way.
You'll need a chapter "V4MD for beginners" showing how to use these 5
functions to create and handle a DB within minutes.

Then advanced users can continue to the other chapters

Best regards,

Florian




More information about the Valentina mailing list