Handling class dependencies
View Single Post
02-21-2008, 02:46 AM
Join Date: Sep 2007
I would pass the instance via the constructor rather than create new instances within each object that requires db access.
My preferred solution is to use a
to store a single instance of the db, this allows access the db instance from any class.
Any fool can write code that a computer can understand. Good programmers write code that humans can understand.
View Public Profile
Send a private message to Karl
Find More Posts by Karl