Forum: Ruby Ruby design patterns and idioms

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
92926f8e4e94ac003e911c38cc4c0d0b?d=identicon&s=25 Jack Christensen (Guest)
on 2006-02-07 02:03
(Received via mailing list)
I've read Design Patterns and similar material. While I've certainly
picked up some good ideas, it seems that most of the techniques are
simply the normal ruby way, or are only necessary for lower level
languages and aren't applicable.

There are a lot of really useful things that can be done with
method_missing, duck-typing, closures, reflection, all the
metaprogramming stuff, etc. Most of what I understand of that comes from
looking through the source of ruby projects.

Are there any books or other resources on design patterns or techniques
specific to dynamic languages?

Jack
4299e35bacef054df40583da2d51edea?d=identicon&s=25 James Gray (bbazzarrakk)
on 2006-02-07 02:16
(Received via mailing list)
On Feb 6, 2006, at 7:01 PM, Jack Christensen wrote:

> Are there any books or other resources on design patterns or
> techniques specific to dynamic languages?

See if this gets you going:

http://www.rubygarden.org/ruby?ExampleDesignPatternsInRuby

James Edward Gray II
9dfe8c734b0f9b37a4e218425c0a2138?d=identicon&s=25 Gene Tani (Guest)
on 2006-02-07 04:54
(Received via mailing list)
Jack Christensen wrote:

> Are there any books or other resources on design patterns or techniques
> specific to dynamic languages?
>
> Jack

i mostly search this mail list but:

the facets and extensions libs, ruby tricks-R-us

http://redhanded.hobix.com/
and why's links below the picture of the pickax on the right, prolly
take a fe wmonths to work thru  ;-}

c2 and artima.com
http://c2.com/cgi/wiki?search=ruby

and the draft ORA ruby cookbook looks very promising
Bc6d88907ce09158581fbb9b469a35a3?d=identicon&s=25 James Britt (Guest)
on 2006-02-07 05:33
(Received via mailing list)
Gene Tani wrote:
> Jack Christensen wrote:
>
>
>>Are there any books or other resources on design patterns or techniques
>>specific to dynamic languages?
>>
>>Jack

This may have already been mentioned, but:

http://norvig.com/design-patterns/


Smalltalk books should have interesting reading, too:

http://www.iam.unibe.ch/~ducasse/FreeBooks.html


--
James Britt

"Programs must be written for people to read, and only incidentally
  for machines to execute."
   - H. Abelson and G. Sussman
   (in "The Structure and Interpretation of Computer Programs)
2d3ec3a83b4f8784d6853564fa0d2e77?d=identicon&s=25 Dido Sevilla (Guest)
on 2006-02-07 06:28
(Received via mailing list)
On 2/7/06, Jack Christensen <jack@jncsoftware.com> wrote:
> Are there any books or other resources on design patterns or techniques
> specific to dynamic languages?

I have an old issue of Dr. Dobb's Journal (August 1997), that has an
article entitled: "Dynamic Design Patterns in Objective-C: Dynamic run
times affect how programs are designed and built". While the article
focuses mainly on Objective-C and gives some examples from the
NeXTStep Runtime (today in use as Mac OS X's Cocoa), the dynamic
runtime of Objective-C is sufficiently similar to Ruby's that many of
the same principles apply.  Apparently, the full text of the article
is available here:

http://202.179.135.4/data/DDJ/articles/1997/9708/9...
Ded98dc06a045924f0d48b2e46fdf229?d=identicon&s=25 Henrik Martensson (Guest)
on 2006-02-07 06:52
(Received via mailing list)
On Tue, 2006-02-07 at 02:01, Jack Christensen wrote:
> Are there any books or other resources on design patterns or techniques
> specific to dynamic languages?

Here is a description of a refactoring I found useful awhile ago:
http://kallokain.blogspot.com/2006/01/refactoring-....

There is another, "Replace Mixin With Class", but I haven't made a
writeup of that one yet. (I will, its just that I am up to my eyebrows
in other projects right now.)

Those two refactorings together where useful in cleaning up
Test::Unit::XML a bit. You can read about it here:
http://kallokain.blogspot.com/2006/01/ruby-refactorings.html.

/Henrik

--
http://kallokain.blogspot.com/ - Blogging from the trenches of software
development
http://www.henrikmartensson.org/  - Reflections on software development
http://testunitxml.rubyforge.org/  - The Test::Unit::XML Home Page
http://declan.rubyforge.org/ - The Declan Home Page
This topic is locked and can not be replied to.