Professional Web Applications Themes

role pattern lib for ruby - 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...

  1. #1

    Default 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

    shasckaw Guest

  2. #2

    Default Re: role pattern lib for ruby

    See Ruby Object Teams http://sourceforge.net/projects/robjectteam/

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


    "shasckaw" <be> wrote in message
    news:401e927b$0$314$skynet.be... 


    Its Guest

  3. #3

    Default Re: role pattern lib for ruby

    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: 
    >
    >
    >[/ref]

    shasckaw Guest

  4. #4

    Default Re: role pattern lib for ruby


    "shasckaw" <be> schrieb im Newsbeitrag
    news:401ee616$0$320$skynet.be... 

    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
     [/ref]
    composition 
    > >
    > >
    > >[/ref]
    >[/ref]

    Robert Guest

  5. #5

    Default Re: role pattern lib for ruby

    Robert Klemme wrote: 
    >
    >
    > 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
    >
    >[/ref]
    I'll try that way,
    thanks for the advices,
    Lio

    shasckaw Guest

  6. #6

    Default Re: role pattern lib for ruby

    shasckaw wrote:
     

    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
     
    >>
    >>
    >>[/ref]
    >[/ref]

    shasckaw Guest

  7. #7

    Default Re: what is aspect-oriented s/w? (was Re: role pattern lib for ruby)

    Sam Roberts wrote about Object Teams: 

    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


    Pit Guest

  8. #8

    Default Re: what is aspect-oriented s/w? (was Re: role pattern lib for ruby)

    Pit Capitain wrote:
     
    >
    > (... Object Teams stuff ...)[/ref]

    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




    Pit Guest

  9. #9

    Default Re: what is aspect-oriented s/w? (was Re: role pattern lib for ruby)

    Hello!

    Pit Capitain wrote: 
    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.
     
    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 ;) ).

    Lio

    shasckaw Guest

  10. #10

    Default Re: what is aspect-oriented s/w? (was Re: role pattern lib for ru by)

    I think I can give a reasonable overall picture of AOP.

    Think about it from a top-down view-point, as a form of weaving code together,
    as opposed to the traditional manner of building one block on top of another.
    So lets say you want to monitor employees. So you create a model of an
    employee, then you create a logging mechinism, and say a visualizer. AOP
    allows you to weave these components together describing how they interact,
    without requiring you to specifically modify any of the code within them.
    Traditionally you would have built the logging mechinism on top of, or
    integrated into, the employee model, and likewise with the visualizer. AOP
    allows you to have much cleaner Seperations Of Concerns --and that's the real
    point of AOP.

    So an *aspect* then, is one of these concerns, and is said to be orthogonal to
    the other concerns. The weaving is accompished by describing where code is to
    be "interwoven" into other code. The code that gets "inserted" is called
    *advice* (in practice it is defined much like one does a method). This is
    accomplished by selecting join-points. *Join-points* are specific places in
    code that can have other advice code inserted into it, and are selectable by
    some descriptive syntax. This syntax will select a set of joint-points; a set
    of join-points so selected is reffered to as a *point-cut*.

    HTH,
    T.



    T. Guest

  11. #11

    Default Re: what is aspect-oriented s/w? (was Re: role pattern lib for ruby)

    On Thu, 5 Feb 2004, T. Onoma wrote:
     

    thanks for that - interesting.

    -a
    --

    ATTN: please update your address books with address below!

    ================================================== =============================
    | EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
    | PHONE :: 303.497.6469
    | ADDRESS :: E/GC2 325 Broadway, Boulder, CO 80305-3328
    | STP :: http://www.ngdc.noaa.gov/stp/
    | NGDC :: http://www.ngdc.noaa.gov/
    | NESDIS :: http://www.nesdis.noaa.gov/
    | NOAA :: http://www.noaa.gov/
    | US DOC :: http://www.commerce.gov/
    |
    | The difference between art and science is that science is what we
    | understand well enough to explain to a computer.
    | Art is everything else.
    | -- Donald Knuth, "Discover"
    |
    | /bin/sh -c 'for l in ruby perl;do $l -e "print \"\x3a\x2d\x29\x0a\"";done'
    ================================================== =============================

    Ara.T.Howard Guest

  12. #12

    Default Re: what is aspect-oriented s/w? (was Re: role pattern lib for ruby)

    T. Onoma wrote: 

    I have already tried to understand AOP. The stuff I've already read
    about it explained aproximatively the same things as you did. But I must
    tell it doesn't help me much to understand. Those concepts Join-Points,
    Point-Cuts, advices, aspect and concerns are too blurred for me.

    Someone has already proposed AOP for python and Guido Van Rossum himself
    said him it was not its intention to do that as it is possible to do AOP
    with the use of meta-classes.

    Then I suppose it is possible to do that in ruby either. If some fair
    people could give some simple examples of practical AOP in ruby, it
    would probably help everybody to grasp the concepts.

    Meanwhile I'll try to get something from robjectteams. :)

    Cheers,
    Lio

    shasckaw Guest

  13. #13

    Default [OT] What is a "role pattern"? (was Re: role pattern lib for ruby)

    shasckaw <be> wrote in message news:<401e927b$0$314$skynet.be>... 

    Is there a "role pattern" definition somewhere? Is it a design
    pattern? Or an ysis pattern? Or ...

    Just curious.

    AA
    Alfio Guest

  14. #14

    Default Re: [OT] What is a "role pattern"? (was Re: role pattern lib for ruby)


    "Alfio Astanti" <com> schrieb im Newsbeitrag
    news:google.com... 
    news:<401e927b$0$314$skynet.be>... 
    >
    > Is there a "role pattern" definition somewhere? Is it a design
    > pattern? Or an ysis pattern? Or ...[/ref]

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

    Regards

    robert


    Robert Guest

  15. #15

    Default Re: [OT] What is a "role pattern"? (was Re: role pattern lib for ruby)

    "Robert Klemme" <net> wrote in message news:<c0i3fc$16pa88$news.uni-berlin.de>... 
    >
    > See http://c2.com/cgi/wiki?RoleAndPlayer - always a good place to look for
    > patterns.[/ref]

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

    AA
    Alfio Guest

  16. #16

    Default Re: [OT] What is a "role pattern"? (was Re: role pattern lib forruby)

    Alfio Astanti wrote: 
    >>
    >>See http://c2.com/cgi/wiki?RoleAndPlayer - always a good place to look for
    >>patterns.[/ref]
    >
    >
    > Thanks a lot!! I have searched c2 indeed, but for some obscure reasons
    > I skip that specific page ... :-)
    >
    > AA[/ref]
    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:
    http://sourceforge.net/projects/robjectteam/

    Cheers,
    Lio

    shasckaw Guest

Similar Threads

  1. POLS ANT file pattern in Ruby
    By Robert Dawson in forum Ruby
    Replies: 4
    Last Post: October 20th, 02:22 PM
  2. Replies: 2
    Last Post: September 16th, 09:32 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139