Reply to Re: Classes without instances

Your name:

Reply:


Posted by Weird-beard on 11/19/05 00:37

there are situations that you must have an instance, an instance in
which you can fiddle with class variables. In static functions, you
cannot change the class variables, as the variables are kept inside the
instance but you dont have one. And the reason for using singleton is,
if you need the variable setting but you do not need the object more
than once and/or the class is expensive to maintain in terms of memory.
Singleton helps here. (See factory pattern, for example. Factories can
be driven by static methods too, if you do not need any variable
settings inside the class.)

[Back to original 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

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