[fxruby-users] Inheritance

Uwe Hartl uwe.hartl at gmx.net
Thu Feb 9 16:17:33 EST 2006


Hi henon,

I derived my idea to do it this way from this article:
http://www.javaworld.com/javaworld/jw-07-1999/jw-07-toolbox_p.html
http://www.javaworld.com/javaworld/jw-09-1999/jw-09-toolbox.html

I like the ideas of this guy and try to follow it through. How do you think 
about it after all? I managed (until now) that each layer of my application 
does not know anything of the data in another object. Interaction always 
takes place within the same object. The one layer which needs to show some 
informations does have an "information object" and asks it to show itself at 
a thertain space ("Like take this frame and display yourself"). How the 
information object does this: don't care. This means complete encasulation. 
My question came from the point, the database deliveres an object from a 
query and this is the smallest atom of data I want to handle. These should 
look from the outside just like data-objects. But internal it needs to know, 
what it can do. Since I started with Ruby to be honest a couple weeks ago 
(three or four) I am not really fluent (yet).

Thanks for the hint anyways, I would like to hear what you think about the 
articles mentioned above. I did not bounce this off anybody jet, I just 
started to try it.

Thanks
Uwe




> use the MVC pattern! don't mix data and view classes (allthough fox did it)
> when you want to display your data instantiate the apropriate view to
> display it.
> you may have a FixnumView class and a DateView class which listen to
> changes in the data and display it.
>
> just my 2 cents,
> -- henon



More information about the fxruby-users mailing list