Using the factory pattern (mad rantings of a mind without coffee)
View Single Post
04-06-2008, 12:07 PM
Join Date: Dec 2007
Originally Posted by
There is no single solution. You could include a file which has the database connection code, for one simple solution. If you're writing the same line of code 100 times (or even 50, 10, 5 times!) then you're setting yourself up for problems in the future as has already been recognised (the example of having to edit 100 files just to change the database type).
Yeah, that's my problem, I love to code so much that I write more code that is useless. :P
"The reasonable man adapts himself to the conditions that surround him... The unreasonable man adapts surrounding conditions to himself... All progress depends on the unreasonable man." - George Bernard Shaw
View Public Profile
Send a private message to Orc
Visit Orc's homepage!
Find More Posts by Orc