Hi Éric,

(hey, you just finally volunteer for implementing a new database driver
framework :)

> The KDE address book driver is split into two parts:
> ...
> So this framework is more or less general.
> 
> I think that, if we redesign the drivers some day, it would be more efficient 
> to group all "first part" (the leightweight ones) into one single library 
> that decides the loading of the "real" drivers at run time.

I see the potential for sharing code here, but I'm not sure whether a
shared "first-level" driver lib would be the way to go. Reason is that
some differences in the different implementations can only be
implemented on code level, /me thinks.

That is, the driver differ, for instance, in their acceptsURL behaviour:
Every driver decides the acceptance depending on a fixed URL pattern.
This could for instance be put into the configuration (so we could
register some "KAB driver" which states its URL pattern sdbc:kaddress:*
in the configuration, and the generic driver finds configuration
information (along with the sdbc:mozab:* and sdbc:evoab:*), and thus
returns |true| in acceptsURL.

On the other hand there is code other than just "load the secondary lib,
if this fails, throw a generic error" in the different drivers. This
code would need to be a parameter of the "generic" driver, depending on
which connection type it should actually create. This boils down to: You
still need a small piece of code from your primary lib, which is
different for different drivers.

Or I missed something in your suggestion :)

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer         [EMAIL PROTECTED] -
- Sun Microsystems                      http://www.sun.com/staroffice -
- OpenOffice.org Database                   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to