Design patterns

D

Daniel Mendler

Hi,

are there some good tutorials or references about design patterns in
ruby, which talk about mixins etc? I would really appreciate one because
ruby is quite different from other languages (and more flexible)
concerning oop.

I found a lot of modules using nested submodules like ClassMethods and
InstanceMethods. Is there a kind of ruby standard for such things?

Daniel
 
J

James Gray

the writer of the book is Russ Oslen, James is the writer of the
review :)

Sorry if I didn't make that clear. I linked to my review in the hope
that it would provide more detail about what was in the book.

James Edward Gray II
 
J

Julian Leviston

Yeah, the book is okay, but it doesn't have all the patterns of the
GOF book, and some of the Ruby is really irksome... and sometimes it's
just wrong!

Julian.
 
S

Shin guey Wong

Julian said:
Yeah, the book is okay, but it doesn't have all the patterns of the
GOF book, and some of the Ruby is really irksome... and sometimes it's
just wrong!

Julian.

Can you point out which pattern in the book is wrong with Ruby? I never
read the GOF book. This is the first Design Pattern book I read, I
really want to know which pattern seems wrong. For me, everything look
nice and it is a good book for me.
 
T

Todd Benson

Can you point out which pattern in the book is wrong with Ruby? I never
read the GOF book. This is the first Design Pattern book I read, I
really want to know which pattern seems wrong. For me, everything look
nice and it is a good book for me.

From the horse's mouth...

http://on-ruby.blogspot.com/2008/01/russ-olsen-interview.html

I'm going out to buy it today, so I hope it isn't as bad as Julian
suggests. I don't have a problem if some of the code doesn't work
perfectly, since I distrust most of the code I look at anyway :)

Todd
 
C

Chuck Remes

Can you point out which pattern in the book is wrong with Ruby? I
never
read the GOF book. This is the first Design Pattern book I read, I
really want to know which pattern seems wrong. For me, everything look
nice and it is a good book for me.

I bought this book about a week ago and absolutely love it. I have the
original GoF book, but this is a fantastic companion to it. Russ'
writing style is very informal which I like. I have found it very easy
to understand his text and examples.

I haven't found any obvious design problems with his code. I would
point out that his example of the Strategy Pattern is a bit lacking.
Oftentimes the strategy will either get a large set of parameters
handed to it in the initializer/constructor OR it will pass a copy
of :self. (Obviously passing :self leads to a lot of tight coupling
between the objects; that detail is also left out of the discussion
too.) He only covered the former case where parameters are passed to
the strategy. This is a minor oversight in my opinion.

I recommend this book.

cr
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top