Re: [Meinds-developers] Aspects: pro's and con's
Brought to you by:
emcs,
rickardoberg
|
From: Dmitri C. <di...@bi...> - 2001-11-30 12:04:38
|
On Fri, 30 Nov 2001, Dmitri Colebatch wrote:
> maybe we could have a method getAspect(Object resource, Class
> aspect) where the class is the interface represneting the aspect (and
> hence interceptors/behaviour) that you want...? I'm kinda tired atm... so
> probably not thinking straight... well, thats my excuse and I'm sticking
> to it (o: maybe I'll realise how silly this all sounds tomorrow!
duh! maybe like the one in ObjectFactory (o: ok... no more from
me... I'm just wondering if the problem is that we're trying to do OO
coding style and have the common Individual interface, when really we
should just be using differnet interfaces as we require... then if we had
a method in ObjectFactory that "casted" one aspect to another... so you
could do something like:
User user = UserBuilder.createObject("urn:user:dim");
// use user
user.getName();
ACL acl = ObjectFactory.cast(user, ACL.class);
// use ACL
??? I'm sure going on my last two emails that this is also a stupid idea,
but will send it anyway, hopefully I'll learn from it!
cheers
dim
|