About Object and Model

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

About Object and Model

stephane ducasse
Hi guys

I'm reading Object and I have the impression that some methods are in Object while there should be on Model.

when: anEventSelector
        send: aMessageSelector
        to: anObject
        exclusive: aValueHolder

okToClose....
taskbarIcon
taskbarLabel

May be some of these methods should grouped in traits, then applied to Model.
Then if the user wants something else than Model to play the game he can simply apply a trait.

I think that this hierarchical decomposition is often forcing us to stack methods in the wrong place
I think that the composition is way stronger and much more flexible than hierarchical ordering.
tell me what you think. I would like to have a nice Object class.

Stef
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: About Object and Model

Hernan Wilkinson-3
I like the idea... a lot of methods should be removed from Object and the idea of using traits for that is interesting. I support the motion! :-)

On Thu, Oct 21, 2010 at 5:06 PM, stephane ducasse <[hidden email]> wrote:
Hi guys

I'm reading Object and I have the impression that some methods are in Object while there should be on Model.

when: anEventSelector
       send: aMessageSelector
       to: anObject
       exclusive: aValueHolder

okToClose....
taskbarIcon
taskbarLabel

May be some of these methods should grouped in traits, then applied to Model.
Then if the user wants something else than Model to play the game he can simply apply a trait.

I think that this hierarchical decomposition is often forcing us to stack methods in the wrong place
I think that the composition is way stronger and much more flexible than hierarchical ordering.
tell me what you think. I would like to have a nice Object class.

Stef
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project



--
Hernán Wilkinson
Agile Software Development, Teaching & Coaching
Mobile: +54 - 911 - 4470 - 7207
email: [hidden email]
site: http://www.10Pines.com


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project