On Mon, Feb 25, 2008 at 9:20 AM, tedd <[EMAIL PROTECTED]> wrote:
> At 8:50 PM -0600 2/24/08, Larry Garfield wrote:
>  >Design patterns are just that: A formalization of various common patterns 
> that
>  >come up over and over in programming.  Ever get the feeling "wow, I know 
> I've
>  >written something kinda like this at least three times now?"  That means 
> it's
>  >probably a design pattern of some kind.
>  >
>  >Studying design patterns helps you recognize a give problem as being similar
>  >to another, so the solution is probably similar.  It also can alert you to
>  >common pitfalls and common ways around them.
>
>  I've read at least a couple of books on the subject and for something
>  that's designed to make programming easier, I find it difficult to
>  implement.
>
>  I'm more like -- "I've written something like this before -- I'm
>  going to find my code and alter it" -- type of guy.
>
>  I'm sure it's my failing, but I program trees and not forest. From my
>  perspective, you plant enough trees, the forest will take care of
>  itself. Besides, every forest I've designed ends up a lot different
>  than when I started. So I focus on trees -- it's simpler for me.
>
>  I think it's good to develop a methodology so that you can reuse past
>  code, but the "design patterns' I've read about seem too abstract for
>  me.
>
>
>  Cheers,
>
>  tedd
>  --
>  -------
>  http://sperling.com  http://ancientstones.com  http://earthstones.com
>
>  --
>
>
> PHP General Mailing List (http://www.php.net/)
>  To unsubscribe, visit: http://www.php.net/unsub.php
>
>

To each their own I guess.  Just out of curiosity, are you primarily
writing entire web applications or one off scripts?

I used to say "you don't need all that" but over time I just can't say
it much anymore.  It seems easy to just dive in and throw something
out the door, but then new features need to be added.  One of my
favorite programming books, Design Patterns Explained, says "Change
happens! Deal with it."  Using patterns helped me do just that with
minimal crying because the underlying architecture could be easily
modified.

Also maybe look at Head First Design Patterns if you are interested in
ever understanding them.  Most of the books I've read say something
along the lines of it should be obvious when to use these patterns
when you read their book.  This might be true for some/most people but
I couldn't get my head wrapped around them till I read Head First.
Seeing their examples with the fun writing just made things click for
me.

After reading that not only could I use them, but I started spotting
them in peoples code.  Another benefit of knowing patterns is having a
common language for explaining solutions to problems between
developers.  Saying I'm using the decorator pattern makes much more
sense then saying I'm wrapping this thing with another thing that
makes it do something else so I can swap out behaviors because they
work together, etc.

...but that is just the world I like to live in. :)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to