Proposed changes in libgda



After (nearly) having finished the conversion from gtk objects to glib
objects in libgda, I have collected a list of changes I would propose to
libgda to make the code even cleaner, better organized and better
understandable than it is now (and maybe even better usable):

* 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

* gda-config should be a part of the client library, too, because it's
purely client-sided

* the names of the macros for the objects could be standardized (e.g. there
are now GDA_IS_XML_FILE, but IS_GDA_THREAD

* every object should have a gda_xxx_free method which only frees the
object, and the destructor (gda_xxx_destroy/gda_xxx_finalize) should be
private and do all the actual work

* gda_connection_new shouldn't take a parameter, the orb needs not be
passed from outside this function; this change would break existing apps
but would make usage of libgda easier, as normally you wouldn't have to
deal with orbit/oaf as a libgda user

* 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

* as discussed before we could use AM_PATH_* for orbit, oaf, and gconf in
configure.in

* 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).

* gda-config should call gconf-config, oaf-config, orbit-config, xml-config
and glib-config and add the output of them to it's own output (like
oaf-config calls orbit-config in the current version).

* the macros directory should be removed IMHO, and a non-gnome autogen.sh
should be used

* 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.

* what would you think about creating a gda.m4 for all those projects
that use gda?

* Gda_Recordsets defines signals, but they are never emitted. Maybe
they could be removed.

* the files gda-value.h and gda-commandP.h in the gda-client directory
seem to be orphans and could possibly be removed

* if we make use of the popt library in gda-server-init, we must honour
that in configure.in, because that library is not necessarily installed

* we could put some ..._LIBADD in the Makefile.am's to link our libraries
to the correct dependency libs if dynamic libs are used.

* and finally we could fix all the compiler warnings that are still
generated when building gda.

Of course I would volunteer to do those things, if you want me to.

What do you think?
--
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]