You are here: Re: Classes in files « PHP Programming Language « IT news, forums, messages
Re: Classes in files

Posted by Curtis on 01/30/07 09:59

On Mon, 29 Jan 2007 23:52:49 -0800, Willem Bogaerts
<w.bogaerts@kratz.maardanzonderditstuk.nl> wrote:

>> I have the following class structure and I'm wonder how best to put this
>>
>> in seperate files/folders instead of all in one file. Thanks!
>
> It does not really matter if you put each class in its own file or if
> you group them in library files. It is just a matter of personal taste.
>
> What I really avoid is mixing "free running" code with class or function
> definitions. A file should either define something or run something. Not
> both.
>

That's a good point you make there.

It might be fine to keep all the sub classes in one file, if they're small
enough. Usually, it'd be better to minimize the amount of require and/or
include constructs used.

--
Curtis

 

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

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