You are here: PHP5 Singlton vs. Abstract Classes « All PHP « IT news, forums, messages
PHP5 Singlton vs. Abstract Classes

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация