PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.ruby > design patterns in ruby: any good?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
design patterns in ruby: any good?

Réponse
 
LinkBack Outils de la discussion
Vieux 08/01/2008, 17h46   #1
Giles Bowkett
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut design patterns in ruby: any good?

Has anybody read it? Does it come recommendafied? I still haven't
found a great tech bookstore in Los Angeles so I haven't browsed it.

--
Giles Bowkett

Podcast: http://hollywoodgrit.blogspot.com
Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com

  Réponse avec citation
Vieux 08/01/2008, 17h50   #2
pat eyler
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: design patterns in ruby: any good?

On Jan 8, 2008 9:46 AM, Giles Bowkett <gilesb@gmail.com> wrote:
> Has anybody read it? Does it come recommendafied? I still haven't
> found a great tech bookstore in Los Angeles so I haven't browsed it.
>


I liked it. If you'd like the overview, I reviewed it here:

http://on-ruby.blogspot.com/2007/12/...by-review.html


> --
> Giles Bowkett
>
> Podcast: http://hollywoodgrit.blogspot.com
> Blog: http://gilesbowkett.blogspot.com
> Portfolio: http://www.gilesgoatboy.org
> Tumblelog: http://giles.tumblr.com
>
>




--
thanks,
-pate
-------------------------
Duty makes us do things, Love make us do things well.
http://on-ruby.blogspot.com http://on-erlang.blogspot.com
http://on-soccer.blogspot.com

  Réponse avec citation
Vieux 08/01/2008, 19h15   #3
aemadrid@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: design patterns in ruby: any good?

I'm almost finished and I'm liking it. It s me put my thoughts
ordered and I have learned a few things too.

AEM

On Jan 8, 9:46am, Giles Bowkett <gil...@gmail.com> wrote:
> Has anybody read it? Does it come recommendafied? I still haven't
> found a great tech bookstore in Los Angeles so I haven't browsed it.
>
> --
> Giles Bowkett
>
> Podcast:http://hollywoodgrit.blogspot.com
> Blog:http://gilesbowkett.blogspot.com
> Portfolio:http://www.gilesgoatboy.org
> Tumblelog:http://giles.tumblr.com


  Réponse avec citation
Vieux 08/01/2008, 19h26   #4
Giles Bowkett
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: design patterns in ruby: any good?

> > Has anybody read it? Does it come recommendafied? I still haven't
> > found a great tech bookstore in Los Angeles so I haven't browsed it.

>
> I liked it. If you'd like the overview, I reviewed it here:
>
> http://on-ruby.blogspot.com/2007/12/...by-review.html


Excellent review! Gives me an idea for a good blog post, too -
patterns and idioms in the Rails source.

--
Giles Bowkett

Podcast: http://hollywoodgrit.blogspot.com
Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com

  Réponse avec citation
Vieux 08/01/2008, 20h08   #5
Jake Cutter
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: design patterns in ruby: any good?

On Jan 8, 2008 1:26 PM, Giles Bowkett <gilesb@gmail.com> wrote:
> > > Has anybody read it? Does it come recommendafied? I still haven't
> > > found a great tech bookstore in Los Angeles so I haven't browsed it.

> >
> > I liked it. If you'd like the overview, I reviewed it here:
> >
> > http://on-ruby.blogspot.com/2007/12/...by-review.html

>
> Excellent review! Gives me an idea for a good blog post, too -
> patterns and idioms in the Rails source.


Nice review, but coverage of the GoF patterns? But I've read so many
otherwise intelligent folks say that the GoF patterns were created to
address the limitations of less flexible languages, and that there's
no need for them in a language as powerful as Ruby...

What gives?

Jake

  Réponse avec citation
Vieux 08/01/2008, 20h08   #6
Jake Cutter
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: design patterns in ruby: any good?

On Jan 8, 2008 1:26 PM, Giles Bowkett <gilesb@gmail.com> wrote:
> > > Has anybody read it? Does it come recommendafied? I still haven't
> > > found a great tech bookstore in Los Angeles so I haven't browsed it.

> >
> > I liked it. If you'd like the overview, I reviewed it here:
> >
> > http://on-ruby.blogspot.com/2007/12/...by-review.html

>
> Excellent review! Gives me an idea for a good blog post, too -
> patterns and idioms in the Rails source.


Nice review, but coverage of the GoF patterns? But I've read so many
otherwise intelligent folks say that the GoF patterns were created to
address the limitations of less flexible languages, and that there's
no need for them in a language as powerful as Ruby...

What gives?

Jake

  Réponse avec citation
Vieux 08/01/2008, 21h03   #7
Giles Bowkett
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: design patterns in ruby: any good?

> Nice review, but coverage of the GoF patterns? But I've read so many
> otherwise intelligent folks say that the GoF patterns were created to
> address the limitations of less flexible languages, and that there's
> no need for them in a language as powerful as Ruby...
>
> What gives?


I was wondering about that myself. I think the Singleton pattern gets
used a lot in Ruby, though. Definitely a question worth asking.

--
Giles Bowkett

Podcast: http://hollywoodgrit.blogspot.com
Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com

  Réponse avec citation
Vieux 08/01/2008, 21h11   #8
James Gray
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: design patterns in ruby: any good?

On Jan 8, 2008, at 2:03 PM, Giles Bowkett wrote:

>> Nice review, but coverage of the GoF patterns? But I've read so many
>> otherwise intelligent folks say that the GoF patterns were created to
>> address the limitations of less flexible languages, and that there's
>> no need for them in a language as powerful as Ruby...
>>
>> What gives?

>
> I was wondering about that myself.


Ruby isn't immune to design patterns.

Some patterns are very trivial in Ruby (Visitor is basically just a
method that takes a block), and some others don't make as much sense
in Ruby (Factory isn't nearly as important with classes being objects
themselves). Ruby also inspires some new patterns, I believe. The
ideas that led to the design patterns and many of the patterns still
apply to Ruby in some fashion though.

James Edward Gray II

  Réponse avec citation
Vieux 08/01/2008, 22h02   #9
Thomas Wieczorek
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: design patterns in ruby: any good?

On Jan 8, 2008 8:08 PM, Jake Cutter <cutter38@gmail.com> wrote:
>
> Nice review, but coverage of the GoF patterns? But I've read so many
> otherwise intelligent folks say that the GoF patterns were created to
> address the limitations of less flexible languages, and that there's
> no need for them in a language as powerful as Ruby...
>
> What gives?
>


IMO, patterns give you a common vocabulary to speak with other
developers and a way to refactor existing code.
Raganwald wrote a good blog entry about it
http://weblog.raganwald.com/2008/01/...th-design.html

  Réponse avec citation
Vieux 09/01/2008, 02h37   #10
Michael Brooks
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: design patterns in ruby: any good?

Giles Bowkett wrote:
> Has anybody read it? Does it come recommendafied? I still haven't
> found a great tech bookstore in Los Angeles so I haven't browsed it.


Hello Giles:

You may also find this Scribd document interesting:

http://www.scribd.com/doc/396559/gof-patterns-in-ruby

There are also a couple of other interesting documents regarding ruby on
Scribd (try a search for ruby) like

http://www.scribd.com/doc/266840/Ruby-Code-Snippets

Michael


  Réponse avec citation
Vieux 09/01/2008, 03h29   #11
Giles Bowkett
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: design patterns in ruby: any good?

> Hello Giles:
>
> You may also find this Scribd document interesting:
>
> http://www.scribd.com/doc/396559/gof-patterns-in-ruby


Gracias! It was useful actually -- I forgot about Singleton being in
the std lib.

Pat's review says the book covers only 14 of the GoF's original 23
patterns, I think that's the explanation for the disparity between
"Ruby makes design patterns useless!" vs. "design patterns can be
useful in Ruby." Presumably the missing 9 are considered either not
necessary, or just less interesting, in Ruby.

--
Giles Bowkett

Podcast: http://hollywoodgrit.blogspot.com
Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com

  Réponse avec citation
Vieux 09/01/2008, 04h04   #12
M. Edward (Ed) Borasky
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: design patterns in ruby: any good?

Giles Bowkett wrote:
>> Nice review, but coverage of the GoF patterns? But I've read so many
>> otherwise intelligent folks say that the GoF patterns were created to
>> address the limitations of less flexible languages, and that there's
>> no need for them in a language as powerful as Ruby...
>>
>> What gives?

>
> I was wondering about that myself. I think the Singleton pattern gets
> used a lot in Ruby, though. Definitely a question worth asking.
>


Well ... I have the book. I'm totally unfamiliar with the GoF book. I
know it's a classic, but I've just never gotten around to learning
design patterns. So I got the book and I like it. If you're already an
expert on design patterns from another language, for example, from "Head
First Design Patterns" (Java) I rather doubt you'll learn anything from
this book that you don't already know. But for me, it's exactly what I
need.

  Réponse avec citation
Vieux 09/01/2008, 04h42   #13
Dean Wampler
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: design patterns in ruby: any good?

[Note: parts of this message were removed to make it a legal post.]

On Jan 8, 2008 3:02 PM, Thomas Wieczorek <wieczo.yo@googlemail.com> wrote:

> On Jan 8, 2008 8:08 PM, Jake Cutter <cutter38@gmail.com> wrote:
> >
> > Nice review, but coverage of the GoF patterns? But I've read so many
> > otherwise intelligent folks say that the GoF patterns were created to
> > address the limitations of less flexible languages, and that there's
> > no need for them in a language as powerful as Ruby...
> >
> > What gives?
> >

>
> IMO, patterns give you a common vocabulary to speak with other
> developers and a way to refactor existing code.
> Raganwald wrote a good blog entry about it
> http://weblog.raganwald.com/2008/01/...th-design.html
>
>

Here's a good blog on this "controversy"
http://peripateticaxiom.blogspot.com...-patterns.html

dean


--
Dean Wampler
http://www.objectmentor.com
http://www.aspectprogramming.com
http://aquarium.rubyforge.org
http://www.contract4j.org

  Réponse avec citation
Vieux 09/01/2008, 05h44   #14
John Wilger
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: design patterns in ruby: any good?

On Jan 8, 8:46am, Giles Bowkett <gil...@gmail.com> wrote:
> Has anybody read it? Does it come recommendafied? I still haven't
> found a great tech bookstore in Los Angeles so I haven't browsed it.


I thought it was well written. Personally, I didn't really learn
anything new from it, but I've strongly suggested that the less
experienced developers on my team give it a read. Perhaps it's got
something to do with the fact that it uses Ruby to discuss the
patterns, but the book also seems to be more approachable than its GoF
counterpart. (Could also just be that I've had a lot more experience
with such things since I read the GoF book the first time.)

--
Regards,

John Wilger
  Réponse avec citation
Vieux 11/01/2008, 15h37   #15
pat eyler
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: design patterns in ruby: any good?

On Jan 8, 2008 12:08 PM, Jake Cutter <cutter38@gmail.com> wrote:
> On Jan 8, 2008 1:26 PM, Giles Bowkett <gilesb@gmail.com> wrote:
> Nice review, but coverage of the GoF patterns? But I've read so many
> otherwise intelligent folks say that the GoF patterns were created to
> address the limitations of less flexible languages, and that there's
> no need for them in a language as powerful as Ruby...
>
> What gives?


I didn't want to say anything when this was first asked, because I was in
the middle of an interview with Russ Olsen (the author) at that point. I just
posted the interview this morning, so if people are still wondering why
design patterns are important even in a language like Ruby, you might
want to take a look:

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

>
> Jake
>
>




--
thanks,
-pate
-------------------------
Duty makes us do things, Love make us do things well.
http://on-ruby.blogspot.com http://on-erlang.blogspot.com
http://on-soccer.blogspot.com

  Réponse avec citation
Vieux 11/01/2008, 16h29   #16
Thomas Wieczorek
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: design patterns in ruby: any good?

On Jan 11, 2008 3:37 PM, pat eyler <pat.eyler@gmail.com> wrote:
>
> I didn't want to say anything when this was first asked, because I was in
> the middle of an interview with Russ Olsen (the author) at that point. I just
> posted the interview this morning, so if people are still wondering why
> design patterns are important even in a language like Ruby, you might
> want to take a look:
>
> http://on-ruby.blogspot.com/2008/01/...interview.html
>


Thank you for the interview! I think I go and buy the book right now.

  Réponse avec citation
Vieux 14/01/2008, 23h30   #17
Russ Olsen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: design patterns in ruby: any good?

M. Edward (Ed) Borasky wrote:
>
>
> Well ... I have the book. I'm totally unfamiliar with the GoF book. I
> know it's a classic, but I've just never gotten around to learning
> design patterns. So I got the book and I like it. If you're already an
> expert on design patterns from another language, for example, from "Head
> First Design Patterns" (Java) I rather doubt you'll learn anything from
> this book that you don't already know. But for me, it's exactly what I
> need.


Far be it for me to disagree with someone who seems about ready to buy
my book, but... oh well.

You see, I think that if you picked up a book on design patterns in Java
on your way to writing a program in Ruby, you will be making a serious
mistake. As others have pointed out, Ruby is different from Java and the
other traditional programming languages in some serious ways: open
classes,
and dynamic typing to name just a couple.

What I did in the book was to stand back and look at each pattern and
ask
a couple of questions: "What problem is this pattern trying to solve?"
and, critically, "How do people typically solve this problem in Ruby?"

Turns out that sometimes the Ruby solution is pretty much the same as
the Java solution. A Composite in Ruby is pretty much the same as a
Composite in Java. But for many of the patterns - here Commands and
Iterators come to mind - the Ruby solution is radically different
than the Java solution. Why? Those are the kind of questions that I
tried to answer in the book.

One of the nice things about Ruby is that many problems are much easier
to solve. The last thing we need is folks writing Java or C# code in
Ruby. We need people writing Ruby in Ruby.


--
Posted via http://www.ruby-forum.com/.

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 18h18.


Édité par : vBulletin® version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,21861 seconds with 25 queries