Role-Oriented Programming [Was: Pool-oriented programming]

Role-Oriented Programming [Was: Pool-oriented programming]

Post by Comic Book » Fri, 20 Feb 2004 01:54:28



>
> As for tools, no, I'm afraid I work in Java, previously in Smalltalk.
All
> ROP I've done is roll-your-own. Its easy to do, though.
>

How do you handle the problem of calling Role methods, which are not in
the object's interface? Also, how do you make sure a method is called in
*all* the appropriate Roles attached to an object?
Thanks.

--
CBG ( http://www.yqcomputer.com/ )
 
 
 

Role-Oriented Programming [Was: Pool-oriented programming]

Post by Robert C. » Fri, 20 Feb 2004 10:05:38

On Wed, 18 Feb 2004 16:54:28 +0000, Comic Book Guy




If you use the Extension Object pattern to implement your roles, then
you could also use the reflection mechanisms of .NET to query the
extensions for certain methods and invoke them appropriately.

 
 
 

Role-Oriented Programming [Was: Pool-oriented programming]

Post by Comic Book » Fri, 20 Feb 2004 23:27:03


This is not a bad idea.
I have been looking at both the Extension Object and Role Object
patterns. Is there a reason you recommend the Extension Object pattern,
rather than Role Object? IOW, are there some pitfalls I have not noticed.
Thanks.

--
CBG ( http://www.yqcomputer.com/ )
 
 
 

Role-Oriented Programming [Was: Pool-oriented programming]

Post by Robert C. » Sat, 21 Feb 2004 00:56:30

On Thu, 19 Feb 2004 14:27:03 +0000, Comic Book Guy




If I follow the Role Object pattern correctly, it expects each role to
derive from the base object interface. Extension Object, on the other
hand, has no such constraint. With Extension object you can put any
method you want in the extensions.
 
 
 

Role-Oriented Programming [Was: Pool-oriented programming]

Post by sureshv » Mon, 23 Feb 2004 03:17:58


For yet another take on this, Check out "Acquisition" as it is used in zope.

http://www.yqcomputer.com/