I think is possible a better approach but until
now I was
unable to see a clear way on how Magritte could help with multiple
description request. The descriptions for the objects are deducted
from class side #descriptionXX of the objects wich collaborates
with MADescriptionBuilder but it's cache seems to be designed to
store only one description per object.
That's the default and what is required most of the time. However
there is nothing that prevents you from having multiple descriptions
for a single object (or class). Descriptions are just objects that
can be composed and stored in instance-variables like anything else.
I know of quite a lot of projects that have been doing exactly that.
Do you think that to extend Magritte to support
several
descriptions per object should be the best approach to this problem?
For example you could dispatch the request for a description trough
your user model:
SomeModel>>descriptionFor: aUser
^ aUser descriptionOf: self
UserModel>>descriptionOf: anObject
^ MACachedBuilderWithUser for: anObject class user: self
Cheers,
Lukas
--
Lukas Renggli
http://www.lukas-renggli.ch