Re: [gdome]gdome object model



Le 24 Feb 2001 09:14:57 +0100, Paolo Casarini a écrit :
> I'm sorry for my insistence, but I don't believe that there are no reason
> to implement objects in gdome in a different manner regarding gtk.
> Who decided this? Why? What were the priciple implemetation choices?
> 
> I'm not saying that the way objetcs in gdome are implemented is wrong, it
> seems to be complete and good, but if a developer wants to implement a
> gnome applications using dom has to learn and use two different way to
> implement objects in C.

1) Users do not need to learn the object system of gdome to use it: they
should not need to create their own objects.

2) As I can see, there is no real need in gdome for the complexity of
the GTK+ object system: no need for dynamic type checking and all the
stuff from gtk+. gdome's objcet system is way more lightweight. It is
extremly simple and does only what you need which is simple inheritance
with static typechecking.

I duno who decided to do it that way but as far as I can tell, it does
its job right.

3) to answr your previous mail:

    - query_interface was left for future expansion. It is not relaly
    used now and will probably never be needed but no one saw the need
    to remove it.
    - Gdome objects' instances do not support inheritance at the
    instance level ( they do support inheritance only at the class level
    by inheriting the class structures: the vtables) probably for the
    folowing reason. The first version of gdome was using libxml 1 where
    many xml nodes had not the same structure layout. This meant that
    certain kinds of Gdome objects which were inheriting from
    GdomeElement needed a special pointer for their xml Node. So, there
    was too much diversity among the different node types... So,
    inheriting the intance variables was not really necessary. This is
    not the case anymore now. 


I hope those answers make sense to you even though I am not sure I am
right about all this. 

regards,
Mathieu

> 
> Thanx
> Paolo
> 
> 
> _______________________________________________
> gdome mailing list
> gdome gnome org
> http://mail.gnome.org/mailman/listinfo/gdome
> 



-- 
Mathieu Lacage <mathieu gnu org>
Portable: <lacage itineris net>





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