Rein's talk reminded me of something my undergrad advisor introduced
me to: the concept of traits. A trait is a small bundle of methods,
all implemented in terms of some minimum API, that gets composed into
an object using some sort of multiple inheritance. Which sounds
*remarkably* like Enumerable.
This is really interesting stuff that gives you new ways of composing
behaviors in a reusable way.
For those of you with the inclination to wade through an academic
paper or two, here are two links. (Caveat: I read the first one a
few years back, and haven't read the second one at all. I generally
find Andrew's writing accessible, though, so check 'em out if you're
curious.)
1) http://scg.unibe.ch/archive/papers/Scha03aTraits.pdf
2) http://www.cs.pdx.edu/~black/publications/refactoringsACM.pdf
Cheers,
-Sam
http://github.com/manveru/innate/blob/master/lib/innate/traited.rb
> --
> You received this message because you are subscribed to the Google Groups "pdxruby" group.
> To post to this group, send email to pdx...@googlegroups.com.
> To unsubscribe from this group, send email to pdxruby+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/pdxruby?hl=en.
>
> We had a nice, small meeting with lots of good content:
Thanks for the notes Igal, it was an interesting meeting and definitely
added things to my "to try out list".
If you're still going to give your presentation on Rack middleware and
Engines, I'd be happy to look over any notes you have. I've written
more than my fair share of Rails Engines and have found many of the tar
pits (and paved over a few with patterns).
--
Eric Davis
Little Stream Software
Redmine Custom Development and Support Services
http://www.LittleStreamSoftware.com
I actually have some slides online on that implementation:
http://docs.google.com/present/view?id=0AcEHtxZZUtqiYWg4OXd6YzhkNjZqXzY4Y2M4OHhjaGg&hl=en