Page 1 of 1
Design Patters - use em?
Posted: Fri May 23, 2003 3:42 pm
by JPlush76
Just wondering how many of you actually sit down before a project and map out your coding based on some programming design patterns out there. If so what advantages do you find using them?
Posted: Fri May 23, 2003 4:26 pm
by BDKR
I don't really think that way personally, but there is good in it if it helps you. Harry Fuecks and Jason are doing great stuff with PHP in this area. Check out PHPpatterns.com much?
Something else you may wish to keep in mind is that there are a lot of general programming sites out there that have tons of great interviews and articles. No, they may not be PHP specific, but it's really good to start thinking of problems at a higher level, as opposed to just wearing "your favorite language" colored glasses. Artima.com (a java/python shop) has some fantastic articles and interviews. Joel Spolsky is another one.
Anyways, I get a kick out of the anti pattern thing. As much as being funny, it's as much a guide as regular patters are.
Cheers,
BDKR
Posted: Sat May 24, 2003 12:49 am
by nielsene
I almost always design before I write. After coming up with a design (database schema, class structure, page-flow, page layout, etc) each part goes through some "what-if" testing and "rigorization".
Database schema gets normalized to 5NF (I'm a database stickler) and triggers/rules/db functions, UDTs are spec'd out.
Class structure gets compared to the Gang of Four's patterns. I decide if I want to restructure my first pass to orient along the "standard patterns" at this point. I'm much less a stickler here than I am on database design -- probably because code is 100-1000 times easier to change than the schema. I find the GoF's book to be a wonderful reference, as it goes into a great deal of input for when they feel the different patterns are useful and when they are not.
Page Flow/layout for is more fluid and I don't "rigorize" it much at this point. I find I need beta-user input for this. However, I do spend a great deal of time decided what type of security mechanism is required -- probably as much time is spent on this as in the database.
Posted: Sat May 24, 2003 7:03 am
by BDKR
nielsene wrote:
Database schema gets normalized to 5NF (I'm a database stickler) and triggers/rules/db functions, UDTs are spec'd out.
Ever read any of Fabian Pascal's rantings? Awesome stuff!
Cheers,
BDKR
Posted: Sat May 24, 2003 11:50 am
by nielsene
BDKR wrote:[
Ever read any of Fabian Pascal's rantings? Awesome stuff!
Agreed, but I don't consider his texts rantings with the exception of the content at dbdebunk.com which is meant to me thought-provoking (and inflamatory).
Chris Date's texts are even better.
Posted: Sat May 24, 2003 1:35 pm
by BDKR
nielsene wrote:
Agreed, but I don't consider his texts rantings with the exception of the content at dbdebunk.com which is meant to me thought-provoking (and inflamatory).
Chris Date's texts are even better.
I don't consider his texts ranting either, to be honest with you. My use of the word 'ranting' is just me being colorful, so to speak.
Cheers,
BDKR
Posted: Sun May 25, 2003 9:20 am
by jason
Design Patterns are as much a tool as anything else. When I plan, I start with the data side, and work my way up. Using the Eclipse Lib means I have more freedom to simply design based on patterns, because I have a library of them waiting to be used. It provides a stable starting place.
I dont' design exclusively with classes. I design exclusively smart (at least I try to). If what I am doing can best be accomplished with a pattern, I use it. The book of four is a collection of all patterns, nor is it a cookbook. Rather, it's a listing of well known design patterns, and how they can be used to solve common problems.
That's all a design pattern is. A common solution to a common problem. So do I design my software based on design patterns? No. I design my program around the problem, and use design patterns where appropriate.