Re: Structure of PHP files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



'Tis true. I just find dealing with the smaller files much easier. At the time I was using Komodo IDE and it would get very sluggish with the larger files.

Take care,
Floyd

On Jul 23, 2009, at 9:34 AM, Robert Cummings wrote:


Floyd Resler wrote:
When I first started programming in PHP I used the second method you mentioned. I had a single file I called utils.php and it contained all the functions I could possibly need throughout my site. Unfortunately, this file grew to be over 10,000 lines and most of the time I only needed a couple of functions for each script I loaded. I have now abandoned that method and use a more modular approach. I have a lib folder that contains much smaller and specialized scripts (mainly classes). Now I only include what I need. I found it much easier to maintain than having a single file.

Not that I disagree with your methodology at this time, but you could have just made that single big file, include all those little files and still had a single load statement in each of your consumer source files. With compile caches the burden of loading all that code at startup is rather negligible :)

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux