develooper Front page | perl.moose | Postings from October 2011

Re: OO Design Principles/Patterns

Thread Previous | Thread Next
From:
John Napiorkowski
Date:
October 11, 2011 06:02
Subject:
Re: OO Design Principles/Patterns
Message ID:
1318338127.4828.YahooMailNeo@web30401.mail.mud.yahoo.com
>________________________________
>From: Steve <steve@matsch.com>
>To: "moose@perl.org" <moose@perl.org>
>Sent: Tuesday, October 11, 2011 8:50 AM
>Subject: OO Design Principles/Patterns
>
>As someone who arrived somewhat late to the OO game, I have take every opportunity to learn some of the principles of OO design and use.  I have been using Moose for a couple of years, primarily in the context of Catalyst and HTML::FormHandler.  Lately though, I am studying the book 'Design Patterns - Elements of Reusable Object-Oriented Software', which comes highly recommended in OO land.
>
>I am wondering if anyone in the Moose community is: 1) aware of the book, 2) used the patterns with Moose, and 3) has taken time to write about implementing some of the patterns with Moose.
>
>The only thing I've seen referenced is how Moose 'almost' can be used to create an abstract class with roles.  This might be good subject matter for a book on Moose!
>
>Steve
>


Dear Steve,

I sorta started a project like this once, but got lazy and never got past https://metacpan.org/release/Patterns-ChainOfResponsibility (not sure if that is the most awesome example of the CoR pattern either)

I think the thing was I started to think that those patterns, while interesting, are not universally applicable to all languages and styles.  For example, a lot of the patterns seem to be to be how to make flexible code when you are using a statically compiled languages.  As a result I figured it would be better to wait a few years and see just exactly how people use Moose to good effect.  Perhaps the community is starting to approach that critical knowledge, although I doubt I have it!

I guess even so, having such a thing would not be a bad exercise, and serve as a good bit of advocacy as well as help form a bridge for programmers coming from other languages.

John 

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About