Question about best style // OO
Ruslan Zasukhin
sunshine at public.kherson.ua
Tue Dec 28 20:00:24 CST 2004
On 12/28/04 7:11 PM, "Jan Erik Moström" <lists at mostrom.pp.se> wrote:
> A few questions about "style" when using Valentina. I'm for the first time
> developing a "more than trivial" application using Valentina and there are a
> few things that I'm wondering about:
>
> + Valentina has a kind of OO approach but my problem is that the
> way I model the objects in my app has little to do with how I design
> the database. This means that I would have to "double" the
> number of classes to do the design and then move the data from
> the "valentina objects" to "my objects". This has resulted in
> that I've been using SQL to do all the "database talking" with
> Valentina.
> Is there any kind of "penelty" for doing things with SQL
> directly (speed etc)?
Again a little advertise of 2.0 :-)
1) in 2.0 we have improve A LOTS API of V4B.
I claim that in V4RB 2.0 you can solve
ANY database task without SQL.
In the same time you get the full SQL92(+)
2) YES SQL way is always slower than API way of Navigational model.
this is far known in the DB world.
SQL have on the other hand advantage on client/server solutions.
and it reduce the coding....but it is usually slower.
Nevertheless SQL have win the war. :-)
but MOST Valentina developers now are mainly
APPLICATION developers. And this make difference.
You already are used to do coding.
So we think that Valentina 2.0 can give
serious strike to SQL.
(but we still love and improve SQL :-)
3) so I think that you can do next:
- you have own classes as you need
- you do not make own classes around Valentina,
i.e. You use so called API-way, but not Classes-way.
- and using API way you will be able do any searches you need
and manage db not using SQL.
4) in the same time, I believe you still can create OWN classes around
Valentina for RB classes, and put them into YOUR classes.
so YOUR classes when need something from DB will access
not Vdatabase, Vtable, but MyDatabase, tblPerson, and so on.
You see?
Just Classes-way give you DIRECT pointers to ache object of database.
In the API way you will need each time ask for a table or a field.
In both cases 3) or 4) you will have own classes, and database will be
hidden behind of this façade.
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina
mailing list