Global space? Yes, what you're talking about, if possible, is a sin.A little misleading about what Im feeling.
Why is getting the classes to work together a pain?
Im feeling that the more classes that I add the more cumbersome things get,
and at the rate Im going, I get the feeling my code will self destruct (figure of speech).
For example. I have another class that handles comments.
This class currently takes the smarty class by reference, which contains the DB class by reference.
If I were to convert the user management file to a class,
then the comments class will also have to contain the user management class which contains,
a reference to the DB class.
The whole class paradim, just gets uglier and uglier in my case.
I have to stop and rethink about how to make classes work together better.
Robert Cummings made a suggestion to me in an earlier topic about singleton patterns,
and again, in this topic about frameworks (basically a design pattern from what I've been reading so far this past week).
Im just not sure how to proceed, and the thought occured to me to use $GLOBALS like
$GLOBALS['db']->Execute('some sql');
$GLOBALS['smarty']->fetch('that template');
Im going to have to invest in a book on frameworks (design patterns), as I can't see myself continuing down
the road Im presently on.
Im open to any suggestions on books. Im currently reading up on articles at phppatterns.com, hopefully some of it
will sink in.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php