Re: How do we manage large code sets in PHP? [message #169664 is a reply to message #169657] |
Wed, 22 September 2010 07:36 |
Willem Bogaerts
Messages: 8 Registered: September 2010
Karma:
|
Junior Member |
|
|
On 22/09/10 01:07, Michael wrote:
> In C/C++ we create manageable files and compile/link them together
> into a single executable. What do we do in PHP?
Create manageable files also.
There is no difference in that respect with C++, java or most other
languages. You can put your files in an organised directory structure if
that helps, just like in the language you were used to.
The main differences are:
- Your source is the executable. No need to compile anything. But if
your source is a huge secret you might have a problem with it. And every
library file can be executed.
- (for web projects) your directory structure is much more dictated by
security considerations. You probably want to keep the library files
outside of the web root, and only put files inside the web root that
must be called by a browser. If you want both secure and non-secure
sections of your site, you probably want two web roots as well.
Source code control systems are a nice tool for organizing code, also in
PHP. For example, see
http://www.howtoforge.org/set-up-a-modular-svn-repository-for-php-websites
Good luck,
--
Willem Bogaerts
Application smith
Kratz B.V.
http://www.kratz.nl/
|
|
|