Re: [gnome-db] Future characteristic



On Wed, 2004-10-27 at 14:28 +0200, Vivien Malerba wrote:
> > > Also there is a DbShell widget which is not used anywhere, I'll remove it.
> > > 
> > it's used in the gnome-database-properties application
> 
> Ok, I'd missed the line where it's used. I'll make sure it is private
> to the library.
> 
it already is private IIRC

> > 
> > > >
> > > > * MgHandler, does it have any GUI part at all? If not, could it be part
> > > > of libgda? The same for all other supporting data types that have no GUI
> > > > relation at all.
> > >
> > > The MgHandler in itself does not have any GUI part, but one of its
> > > methods does create a GtkWidget, so Gtk is required. The same applies
> > > to the rest of the dictionnary.
> > > 
> > ok, might it make sense then in libgnomedb?
> 
> What making sense? If it's to put it into libgnomedb, then yes.
> 
yes

> > 
> > > >
> > > > * "The MgWorkGrid widget hides the GtkTreeView it internaly uses.
> > > > Exposing it to the developpers would improve possibilities."
> > > > again, we should keep just one of the grid widgets IMO and make it
> > > > support all kind of GdaDataModel-based classes. Then, with the one we
> > > > keep, it should probably be directly inheriting from GtkTreeView itself,
> > > > so that people can use all GtkTreeView API with it directly.
> > >
> > > The MgWorkGrid is not just a tree widget to display rows. It does not
> > > work from a MgResultSet, but from a SELECT query, and allows edition
> > > of the displayed rows: you can't ask a MgWorkGrid to display a
> > > MgResultSet. This is why I want to keep the GnomeDbGrid as well.
> > > 
> > why do we need to work from a SELECT query? Can't we make it work from a
> > data model instead?
> 
> Because a simple GdaDataModel is a list of data, with no way of
> knowing where the data comes from, which is a pre-requisite if you
> want to update that data in the database.
>
but since GdaDataModel is fully extensible, we can add anything we want
to derived classes.

Also, GdaDataModel already has methods for updating the data in the
model, so I guess it makes sense to reuse/extend that

>  The idea is to modify the
> data in the GdaDataModel and make sure the data is actually modified
> in the database as well (in a correct way).
> 
this is what the append_row/update_row/append_row methods on the data
models do. We just are missing the implementation of those methods in
all providers.

If we need anything extra, GdaDataModel offers the base on which we can
extend to anything we want.

> > 
> > > However we could create an interface which both GnomeDbGrid and
> > > MgWorkGrid will implement, so the API can be the same for both
> > > widgets.
> > > 
> > the data model one :)
> 
> I was thinking of an interface for the following functions:
> _set_titel(), _get_title(), _set_column_title, etc
> 
again, if we reuse the GdaDataModel, there is no need to have 2 widgets.
A single widget can support both read-only models and full featured data
dictionaries, and adapt itself to whatever it is using.

> > 
> > > >
> > > > * "I think we should keep the usage of a data dictionnary in the future
> > > > Libgnomedb library optionnal:"
> > > > or we could have a libgnomedb-dictionary library, that provides all the
> > > > extra GdaDataModel-based classes
> > >
> > > That would more or less be the current Libmergeant library!
> > > 
> > yes. I think there is no gain in having 2 libraries, so all the public
> > things should be in libgnomedb. What we can do is have the dictionary in
> > libgnomedb-dictionary, for instance, so that libgnomedb is small enough
> > for simple applications. But all reusable stuff should be made available
> > in one place.
> 
> Then we'll end up with libgnomedb quite unchanged, and
> libgnomedb-dictionary quite the same as the current libmergeant. I
> think it's better to have everything in the same library with a simple
> API to use it.
> 
yes

> I'll update the proposal document and send it again for comments.
> 
I think this document would be better placed in the website, so that
anyone can see it. Would you like to put it in the
gnome-db-web/docs/white-papers directory, please?
-- 
Rodrigo Moya <rodrigo gnome-db org>



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