in reply to OOP design related question.
One thing I've done in a similar setup is to create a singleton object to hold the database handle.
The first time it is used it connects, every other time it returns the previously opened handle.
This allows me to use the database handle wherever it is needed and not explicitly pass it around.
|
---|