Maintaining large scale PHP applications

This is a discussion on Maintaining large scale PHP applications within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hi all, Last night I was in the pub listening to a friend recount the problems of building / releasing java ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-27-2004
Colin McKinnon
 
Posts: n/a
Default Maintaining large scale PHP applications

Hi all,

Last night I was in the pub listening to a friend recount the problems of
building / releasing java code. This morning I got into work to stumble
across a bug in my PHP application due to two different files containing a
function with the same name (came about because the function was added to
an include file, and not all the files which included it were tested).

It struck me that this would not happen with a compiled language - either
the linker would deal with the problem, or more likely, it would throw up
an error. But with only 'php -l' to check individual files combined with
manual checking this is bound to be a limiting factor in building large PHP
applications.

Is the only option for me to build a black box test environment for my code
(rather tricky as it has a lot of integration with external systems) or
does someone have a better way of solving the problem?

(anyone grousing about the lack of namespaces in PHP will be flamed)

TIA,

C.
Reply With Quote
  #2 (permalink)  
Old 08-28-2004
Chris Hope
 
Posts: n/a
Default Re: Maintaining large scale PHP applications

Colin McKinnon wrote:

> Hi all,
>
> Last night I was in the pub listening to a friend recount the problems of
> building / releasing java code. This morning I got into work to stumble
> across a bug in my PHP application due to two different files containing a
> function with the same name (came about because the function was added to
> an include file, and not all the files which included it were tested).
>
> It struck me that this would not happen with a compiled language - either
> the linker would deal with the problem, or more likely, it would throw up
> an error. But with only 'php -l' to check individual files combined with
> manual checking this is bound to be a limiting factor in building large
> PHP applications.
>
> Is the only option for me to build a black box test environment for my
> code (rather tricky as it has a lot of integration with external systems)
> or does someone have a better way of solving the problem?
>
> (anyone grousing about the lack of namespaces in PHP will be flamed)


The only way I can see of getting around the namespace issue is to prefix
your functions and classes with something eg foo_ for project "foo",
similar to what they do with the various library functions eg mysql_*

Of course, this still doesn't solve your problem with functions being
declared with the same name...

--
Chris Hope - The Electric Toolbox - http://www.electrictoolbox.com/
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:15 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0