Re: Proposed changes in libgda



Am Sam, 04 Nov 2000 22:40:50 schrieb(en) Rodrigo Moya:
> > * gda-init should be a part of the client library, because the server
> > library has it's own gda-server-init, and it should have its own
> > gda-init.h
> > 
> no, it will be needed for GDA-non-client applications, like the report
> part.
> 
> > * gda-config should be a part of the client library, too, because it's
> > purely client-sided
> >
> the same as with gda_init applies here.
>  

Not sure if I explained that well. I understood that the gda-common
library provides functions that will be used by the providers as well
as by the "clients" of libgda (the code that is on the client side
of gda.idl). The report engine is actually a libgda client.

> > * the names of the macros for the objects could be standardized (e.g.
> there
> > are now GDA_IS_XML_FILE, but IS_GDA_THREAD
> >
> yes, this is something I've been forgetting systematically. It would be
> great
> to provide a shell script which makes the change, so that client apps
> just have to run it to conform with the new names.

It seems to me that more macros are missing than spelled wrong; and the
only wrong-spelled macro names I found are in gda-xml-*, which is not
used by client apps yet I suppose.

> > * the actual definition of the _Gda_* structures could be in the .c
> file
> > instead of the .h file and thus be _real_ private; this would enforce
> users
> > of libgda to not use the internals of this structure and therefore give
> us
> > the freedom to change them
> >
> instead of this, I would do what is being done in some other GNOME libs:
> have
> the _Gda_* structures just contain the base class object and a
> _Gda_*Private pointer, which is then defined in the .c file.
> I think we should leave the _Gda_* structures in the .h files, first
> because
> of consistency with the rest (GNOME, GTK, GNOME-DB, etc), and second
> because people would know what the base class of every object is.
> An example of this which I've started to do on gnome-db, is on
> gnome-db/lib/gnome-db-control*

Ok, I'll look at that example.

> > * Makefile.am's could be cleaned up a bit. GDA_CLIENT_CFLAGS/LIBS and
> > GDA_PROVIDER_CFLAGS/LIBS should not be used for the library itself, but
> > rather for the client apps and the providers. I say this because e.g.
> > gda-server does not depend on libxml and GConf, and gda-client does not
> > depend on libxml, GConf and oaf (of course this could change).
> >
> I'm not sure about this. Both the client and server libs use the
> gda-common
> lib, which in turn must link with libxml and GConf

a) for the CFLAGS part I can surely say that GConf is not needed for
gda-client/server because that code does not #include gconf. CFLAGS is
only the include path.
b) for the LIBS part I can explain:
If we have static libraries (.a), we don't need it, because static
libs are _not_ linked. They are not more than an archive of one or more
o files.
If we have dynamic libraries, we can tell libtool what other libs my
lib depends on, and when a program links to my lib, libtool makes it
link to the dependency libs, too, automagically. This works with
the ..._LIBADD automake parameter.
But that would be enough to do for gda-common, because every program
linking to gda-client will link to gda-common, too.
I hope I explained understandable what I mean.

> > * what would you think about a private header file in each directory
> > (like common.h, defines.h or gda-clientP.h etc.) in which we include
> > the things that are now included in all .c files (config.h, the NLS
> > stuff...)? We would _not_ install that header, and it would be only
> > included in our .c files, not in any other headers.
> >
> yes

So what name for this private global header file would you prefer? Is
there any standard for this yet? (I didn't find anything)

> > * Gda_Recordsets defines signals, but they are never emitted. Maybe
> > they could be removed.
> >
> yes, I'll have a look at it, because it is in its current state due to
> the
> fact that it's based on GtkAdjustement! instead of GtkObject. This should
> also be changed.

You will find that I based the glib-version of Gda_Recordset on g_object
and implemented the _move() function in another manner.

> > * the files gda-value.h and gda-commandP.h in the gda-client directory
> > seem to be orphans and could possibly be removed
> >
> yes, they seem so, but don't remove them yet. I'll have a look at them

Ok, so I'll leave it up to you to remove them after you checked.

> > * we could put some ..._LIBADD in the Makefile.am's to link our
> libraries
> > to the correct dependency libs if dynamic libs are used.
> >
> I don't nderstand very well what you mean by this.

See my explaination above

> apart from the comments, it looks perfect. So, please tell me on which
> things
> you want to work and I'll help you doing the other ones.

I'll work on the things you agreed upon and let you know if I have
problems somewhere. It's actually a lot of little tasks, and I don't
think I will interfere with somebody else; I will commit every part
I've done as soon as it's finished.

Thanks,
--
Reinhard Müller
BYTEWISE Software GmbH
reinhard mueller bytewise at
www.bytewise.at





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