Re: [gnome-db] Minor API change and MySQL [update/delete]_row

On Fri, 2003-10-31 at 04:58, Paisa Seeluangsawat wrote:
> Again, I think we have a terminology mismatch.  So I'll be more
> explicit this time.
> I *define* a *new* word "PRVD" to mean "anything that manage the
> underlying data, whether it's part of libgda package, or written by
> end users".  This include all of the following examples you've been
> using,
>     any data model implementation. ... They can be created, if wanted,
>     byan application using libgda.
>     yes, but data models can be implemented by anything, not only by
>     providers.
>     a program could want to create its own data-model-based class, for
>     instance.
>     if they are implementing a data model.
>     Any app can create its data model-based class, and in that case it
>     will need those functions.
> What I'm asking is separate headers for PRVD functions.  These headers
> will be public, i.e. can be #included by the end users.
yes, I understood from the beginning :-) What I say myself is why bother
with the extra header? Again, the standard in GNOME is to include, in
the header file, all public functions for that class. Having some
functions in a separate header, will break that, and, most important,
will confuse users, since most of them won't expect gda_data_model_
functions to be in another header, so they'll miss the function.

Also, for documentation, it will generate a separate section for that
file, which is, again, confusing.

> > But I don't see a need for a separate header.
> It's not a need, it's a want.  We want the API to be easy to
> learn/use.
right, that's why you don't want to hide public functions in obscure,
difficult to guess header files.

>   New users will appreciate not having wade through
> _set_id() or _free_row() in order to find _get_value() in the doc.
> Users who _free_row() on rows held by a model will get a compilation
> error that the function isn't defined and notice that something is
> wrong.  Users who do want to use the function can just #include
> gda-row-PRVD.h or gda-row-you-are-managing-data-here-pal.h and things
> are fine.
that looks really confusing to me, and is what I'm against. Since we
don't make any other kind of separation (like having the GdaConnection's
client-only be in a different header, even though providers do include
that file), why should we make that? It is just small subset of
functions, which can be marked as 'special' with a comment in the header

Also, there are also cases when you might need to do the notification,
even if not implementing a data model. You might have a data model (not
even related to a provider), modify a GdaValue on it (in which case the
data model won't get notified of the change), and might want to force a
notification, so that the widget showing the data model knows about the

So, it's not really a set of functions only used by providers, and, even
if they were so, there is no reason to add yet more headers, that, as I
said, will confuse many users.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]