[kdewebdev-site] Local test bench and defined variables

Andras Mantia amantia at kdewebdev.org
Thu Mar 10 19:49:27 EST 2005


On Thursday 10 March 2005 19:40, Eric Laffoon wrote:
> > I don't know if site programmers think differently from application
> > programmers, but I don't see a problem with providing an extra
> > argument, especially that even the faq.inc.php requires a similar
> > argument.
>
> We have to think differently. There is no persistence from page to
> page, display elements and factors are different, computing factors
> are different... There are a lot of differences. My thinking here was
> only biased from experience of dumb errors I've generated.
> 1) Use as few parameters as possible, especially if it make something
> more portable.
> 2) Give defaults to extra parameters whenever possible.
> 3) Be extremely reluctant to add parameters and again try to make
> them defaults, because of what they could break.

I think I realize what is your problem: PHP does not warn if you miss a 
parameter. C++ does unless you specify a default value for the 
parameter. But this is nothing that should stop us to use customizable 
functions (by extra parameters). Global variables just as confusing.

> Understandable, but it illustrates why I want to do things the way I
> do. Moura picked up and dropped in files from kallery... If we
> optimize code to be able to move from subdomain to subdomain without
> modification, or with the least possible modification, then we make
> it very easy to build the site. Even the smallest modifications
> require extensive testing. As we add sessions and user
> configurability this becomes that much more critical.

We will see. :-)


> > That is only once concerns. The other is good design. If you read
> > the releases.inc.php code now you don't have the slightest idea
> > from where $_appFormal comes as releases.inc.php does not include
> > anything from where it might come and it's not declared there.
>
> Then the same could be said of index.php,

No, as index.php starts with <? include "applib.php" ?> which clearly 
says that some functions and variables might be declared there. If 
releases.inc.php starts with an <? include "applib.php" ?> I don't have 
(such a big) problem with $_appFormal. But now there is an assumption 
that releases.inc.php is included only in a file where applib.php is 
already included and I really don't like this.

Andras
-- 
Quanta Plus developer - http://quanta.sourceforge.net
K Desktop Environment - http://www.kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://momo.creolmail.org/pipermail/kdewebdev-site/attachments/20050310/154dd038/attachment.pgp


More information about the kdewebdev-site mailing list