Role pattern lib for ruby

Hello there,
Im’ searching for a ruby lib that provides a role pattern framework.
Does anyone know about such a lib?

If there aren’t any, I’ll probably try to create my own, does anyone
have any ideas on how to proceed?

Lio

See Ruby Object Teams RubyObjectTeams download | SourceForge.net

It is based on object teams, a very rich role definition and composition
framework (google for its web site). Very nice.

“shasckaw” shasckaw@skynet.be wrote in message
news:401e927b$0$314$ba620e4c@news.skynet.be…

···

Hello there,
Im’ searching for a ruby lib that provides a role pattern framework.
Does anyone know about such a lib?

If there aren’t any, I’ll probably try to create my own, does anyone
have any ideas on how to proceed?

Lio

shasckaw shasckaw@skynet.be wrote in message news:401e927b$0$314$ba620e4c@news.skynet.be

Hello there,
Im’ searching for a ruby lib that provides a role pattern framework.
Does anyone know about such a lib?

Is there a “role pattern” definition somewhere? Is it a design
pattern? Or an analysis pattern? Or …

Just curious.

AA

Thansk for the link, it looks interesting but it is perhaps too complex
for what I intend to do. But I can give it a try… well, I’d be happy
to try it but there isn’t any files in the package, and project activity
is near to death. I’ll try to get more info about it, but I haven’t much
hope.

If anyone has another solution, please help me!

Lio

Its Me wrote:

···

See Ruby Object Teams RubyObjectTeams download | SourceForge.net

It is based on object teams, a very rich role definition and composition
framework (google for its web site). Very nice.

“shasckaw” shasckaw@skynet.be wrote in message
news:401e927b$0$314$ba620e4c@news.skynet.be…

Hello there,
Im’ searching for a ruby lib that provides a role pattern framework.
Does anyone know about such a lib?

If there aren’t any, I’ll probably try to create my own, does anyone
have any ideas on how to proceed?

Lio

“Alfio Astanti” aastanti@hotmail.com schrieb im Newsbeitrag
news:50aa3cba.0402120845.219a6150@posting.google.com

shasckaw shasckaw@skynet.be wrote in message
news:401e927b$0$314$ba620e4c@news.skynet.be

Hello there,
Im’ searching for a ruby lib that provides a role pattern framework.
Does anyone know about such a lib?

Is there a “role pattern” definition somewhere? Is it a design
pattern? Or an analysis pattern? Or …

See http://c2.com/cgi/wiki?RoleAndPlayer - always a good place to look for
patterns.

Regards

robert

“shasckaw” shasckaw@skynet.be schrieb im Newsbeitrag
news:401ee616$0$320$ba620e4c@news.skynet.be…

Thansk for the link, it looks interesting but it is perhaps too complex
for what I intend to do. But I can give it a try… well, I’d be happy
to try it but there isn’t any files in the package, and project activity
is near to death. I’ll try to get more info about it, but I haven’t much
hope.

If anyone has another solution, please help me!

Depending on what you need to do it might even be built into the language
already. If you only need to add roles over time you could define some
modules for the roles and add them as needed:

irb(main):001:0> class Foo;end
=> nil
irb(main):002:0> f=Foo.new
=> #Foo:0x1019dfe0
irb(main):003:0> f.respond_to? :inject
=> false
irb(main):004:0> f.extend Enumerable
=> #Foo:0x1019dfe0
irb(main):005:0> f.respond_to? :inject
=> true

Other than that SimpleDelegator might help you as well:
http://www.rubycentral.com/book/lib_patterns.html

robert

Lio

Its Me wrote:

See Ruby Object Teams RubyObjectTeams download | SourceForge.net

It is based on object teams, a very rich role definition and
composition

···

framework (google for its web site). Very nice.

“shasckaw” shasckaw@skynet.be wrote in message
news:401e927b$0$314$ba620e4c@news.skynet.be…

Hello there,
Im’ searching for a ruby lib that provides a role pattern framework.
Does anyone know about such a lib?

If there aren’t any, I’ll probably try to create my own, does anyone
have any ideas on how to proceed?

Lio

shasckaw wrote:

Thansk for the link, it looks interesting but it is perhaps too complex
for what I intend to do. But I can give it a try… well, I’d be happy
to try it but there isn’t any files in the package, and project activity
is near to death. I’ll try to get more info about it, but I haven’t much
hope.

Now, I know the truth, I had a bug with my archive manager that’s why I
couldn’t look into the package. I didn’t think it could be my archive
manager because I never had such problems before. I must tell the
package is a little weird, with the extension “tgz.gz” or “tgz.tar”.
Well, no matter all this, now I can use it and that’s a good new. BTW
the develloper of robjectteams told me he doesn’t use the CVS, so it’s
normal that it is empty.

Lio

···

Its Me wrote:

See Ruby Object Teams RubyObjectTeams download | SourceForge.net

It is based on object teams, a very rich role definition and composition
framework (google for its web site). Very nice.

“shasckaw” shasckaw@skynet.be wrote in message
news:401e927b$0$314$ba620e4c@news.skynet.be…

Hello there,
Im’ searching for a ruby lib that provides a role pattern framework.
Does anyone know about such a lib?

If there aren’t any, I’ll probably try to create my own, does anyone
have any ideas on how to proceed?

Lio

“Robert Klemme” bob.news@gmx.net wrote in message news:c0i3fc$16pa88$1@ID-52924.news.uni-berlin.de

Is there a “role pattern” definition somewhere? Is it a design
pattern? Or an analysis pattern? Or …

See http://c2.com/cgi/wiki?RoleAndPlayer - always a good place to look for
patterns.

Thanks a lot!! I have searched c2 indeed, but for some obscure reasons
I skip that specific page … :slight_smile:

AA

Robert Klemme wrote:

“shasckaw” shasckaw@skynet.be schrieb im Newsbeitrag
news:401ee616$0$320$ba620e4c@news.skynet.be…

Thansk for the link, it looks interesting but it is perhaps too complex
for what I intend to do. But I can give it a try… well, I’d be happy
to try it but there isn’t any files in the package, and project activity
is near to death. I’ll try to get more info about it, but I haven’t much
hope.

If anyone has another solution, please help me!

Depending on what you need to do it might even be built into the language
already. If you only need to add roles over time you could define some
modules for the roles and add them as needed:

irb(main):001:0> class Foo;end
=> nil
irb(main):002:0> f=Foo.new
=> #Foo:0x1019dfe0
irb(main):003:0> f.respond_to? :inject
=> false
irb(main):004:0> f.extend Enumerable
=> #Foo:0x1019dfe0
irb(main):005:0> f.respond_to? :inject
=> true

Other than that SimpleDelegator might help you as well:
http://www.rubycentral.com/book/lib_patterns.html

robert

I’ll try that way,
thanks for the advices,
Lio

Is there a description of it somewhere?

aosd.net is singularly void of information, pointing only to an old ACM
issue thats not available online, and pdfs of academic research papers.

I keep hearing the term, but not associated with any concrete
information. All the projects I’ve seen just point to aosd.net, and
their docs assume you already know what aspect-oriented, cross-cutting,
etc., mean.

Can anybody help me out?

Cheers,
Sam

Quoteing shasckaw@skynet.be, on Thu, Feb 05, 2004 at 12:30:03AM +0900:

···

shasckaw wrote:

Thansk for the link, it looks interesting but it is perhaps too complex
for what I intend to do. But I can give it a try… well, I’d be happy
to try it but there isn’t any files in the package, and project activity
is near to death. I’ll try to get more info about it, but I haven’t much
hope.

Now, I know the truth, I had a bug with my archive manager that’s why I
couldn’t look into the package. I didn’t think it could be my archive
manager because I never had such problems before. I must tell the
package is a little weird, with the extension “tgz.gz” or “tgz.tar”.
Well, no matter all this, now I can use it and that’s a good new. BTW
the develloper of robjectteams told me he doesn’t use the CVS, so it’s
normal that it is empty.

Lio

Its Me wrote:

See Ruby Object Teams RubyObjectTeams download | SourceForge.net

It is based on object teams, a very rich role definition and composition
framework (google for its web site). Very nice.

“shasckaw” shasckaw@skynet.be wrote in message
news:401e927b$0$314$ba620e4c@news.skynet.be…

Hello there,
Im’ searching for a ruby lib that provides a role pattern framework.
Does anyone know about such a lib?

If there aren’t any, I’ll probably try to create my own, does anyone
have any ideas on how to proceed?

Lio

Sam Roberts wrote about Object Teams:

Is there a description of it somewhere?
(…)
Can anybody help me out?

On the Ruby Object Teams page on sourceforge there’s a link called “Home Page”,
which leads you to http://objectteams.org

My first impression is that Object Teams is a very useful paradigm. It “allows
the programmer to encapsulate the interaction of a set of objects (roles) into a
compound object (the team)”. I’ve never been convinced to really start using
AOP, but I’ll definitely give the Object Teams concept a try.

Regards,
Pit

Alfio Astanti wrote:

“Robert Klemme” bob.news@gmx.net wrote in message news:c0i3fc$16pa88$1@ID-52924.news.uni-berlin.de

Is there a “role pattern” definition somewhere? Is it a design
pattern? Or an analysis pattern? Or …

See http://c2.com/cgi/wiki?RoleAndPlayer - always a good place to look for
patterns.

Thanks a lot!! I have searched c2 indeed, but for some obscure reasons
I skip that specific page … :slight_smile:

AA
What is explained on that page is rather different from the academic
papers I’ve found all over the web about role pattern.
For example, robjectteams which is in fact a kind of role designing
framework doesn’t work with the same axioms. BTW robjectteams is really
simple to understand, I really advice anybody to read its samples. Here
is the site if you want more info:
RubyObjectTeams download | SourceForge.net

Cheers,
Lio

Pit Capitain wrote:

Sam Roberts wrote about Object Teams:

Is there a description of it somewhere?
(…)
Can anybody help me out?

(… Object Teams stuff …)

Sorry, I didn’t notice you were talking about Aspect Oriented Programming in
general. Ignore my previous post for the moment, but look at it again when you
come to a point where you say “well, AOP is nice, but how can I use it?”

Object Teams, which I was talking about, uses AOP under the hood to offer a very
nice way to build components out of objects that don’t have to know each other.

Regards,
Pit

Well, that was some good links, but they're all pretty hand-wavy about
what AOP is, other than great.

Here's some quotes, maybe you can see why I'm not quite graspoing the
point yet.

Quoteing mlipper@US-ABP.com, on Thu, Feb 05, 2004 at 01:09:22AM +0900:

Check out http://www.aspectJ.org . This is a Java-specific aspect-oriented
framework that is (arguably, depending on who you ask) the most advanced in
terms of functionality. Although the docs relate to this framework in
particular, they provide a coherent intro to the subject.

They seem to assume you already have an idea what AOP is:

  Many software developers are attracted to the idea of aspect-oriented
  programming (AOP) but unsure about how to begin using the
  technology. They recognize the concept of crosscutting concerns, and
  know that they have had problems with the implementation of such
  concerns in the past. But there are many questions about how to adopt
  AOP into the development process. Common questions include:

    Can I use aspects in my existing code?

    ...

  (From the intro in the programming guide).

I'm still at the "what's an aspect" stage!

I read further, and now I wonder what a joint-point is, a pointcut, an
advice, and still don't have a clue what an aspect is...

Cross-cutting seems more straightforward, at least in the abstract.

Also check out http://aspectwerkz.codehaus.org/ and

Their documentation starts with the very encouraging:

  You most likely not learn Aspect-Oriented Programming by only reading
  this paper. If you are a beginner I would recommend that you first
  read some introductory articles on the subject.

http://nanning.codehaus.org/ .

And their doc's top-level link to AOP leads to:

  Aspect Oriented Programming

  Might not be the best name for what Nanning does.

Hmmm... :slight_smile:
  
So, all I know so far is when you've got an issue (like user
validation), and you've got to put code dealing with it all over the
place, AOP should help.

You find all the places, those are called join-points, and somehow
aspect code appears there?

(and, what's an aspect, again?)

I'm particularly confused, because in OOP, this isn't such a big deal, I
don't think. You'd give objects a reference to a UserValidation object,
and they'd use it to do the validation, so, all that logic is central.
Hey, it can even be singleton, so they can just get if from the system.

There's lots of handwaving about how AOP allows you to factor more stuff
out than you can factor out with just OOP, etc, etc, but **how**.

It sounds cool, but I was looking for a simple example, like you'd use
to show a C programmer what an object was in C++... This is a Employee
class, it has a Salary, you can fire it, but different kinds of emplyees
(Developer, Ceo) get fired differently, so they are derived from
Employee and specialize the fire() method...

I am currently downloading the aspectj examples, maybe I'll see the
light.

Still displaying aspects of confusion,
Sam

Hello!

Pit Capitain wrote:

Pit Capitain wrote:

Sorry, I didn’t notice you were talking about Aspect Oriented
Programming in general. Ignore my previous post for the moment, but look
at it again when you come to a point where you say “well, AOP is nice,
but how can I use it?”
We were talking about AOP? No, it seems you made a mistake somewhere, we
weren’t talking about that, I just wanted some lights about role
pattern. And someone pointed out that I could use an AOP framework for
ruby and designed with roles.
In fact, I’m already at the point “how can I use it?”. I don’t even
bother to read exhaustively the ObjectTeams site, it’s too academic for
me: most docs are in fact german academic thesis.

Object Teams, which I was talking about, uses AOP under the hood to
offer a very nice way to build components out of objects that don’t have
to know each other.
I will give it a try. I don’t want to do something complex, I’ll
probably use only few features of robjetcteams. If robjectteams is too
complex for me to understand, I’ll seek another way (perhaps delegation
will be enough?). Nevertheless I think robjectteams is worth the
experience (and a shorter name :wink: ).

Lio

Quoteing shasckaw@skynet.be, on Thu, Feb 05, 2004 at 07:30:02AM +0900:

Hello!

Pit Capitain wrote:

Pit Capitain wrote:

Sorry, I didn’t notice you were talking about Aspect Oriented
Programming in general. Ignore my previous post for the moment, but look
at it again when you come to a point where you say “well, AOP is nice,
but how can I use it?”
We were talking about AOP? No, it seems you made a mistake somewhere, we
weren’t talking about that, I just wanted some lights about role
pattern. And someone pointed out that I could use an AOP framework for

Uh, he wasn’t replying to you, he was replying to my question (see the
subject) with some helpful links to AOP projects, and I do want to know
about AOP!

ruby and designed with roles.
In fact, I’m already at the point “how can I use it?”. I don’t even

And I am not at this point.

Cheers,
Sam