Posted by Daedalus.OS on 10/13/02 11:30
Ok first I'm pretty new to OOP, so my question may sound stupid to some of
you. If the only answer you can provide is "get a book about OOP" then don't
loose your time and mine cause it's already ordered. I'm just too curious
about this one to wait for the book.
I would like to know is if it's good php programming practice to use
abstract classes instead of singleton classes. For exemple a login class.
I've made one as an abstract class and now I'm wondering if it's a good
idea. Technically there would be only one login object so I thought having
this object was pointless and I use an abstract class with everything in it
static. Is it a good or a bad idea and why? In what situation the difference
between having only one object and no object at all with only static
functions and variables would lead to use one more the other? Or why in a
PHP context would I prefer to have a single object rather than what I would
call a "static virtual object".
Thanks,
Dae
[Back to original message]
|