[kdewebdev-site] Local test bench and defined variables
Andras Mantia
amantia at kdewebdev.org
Wed Mar 9 10:39:36 EST 2005
On Wednesday 09 March 2005 00:55, Eric Laffoon wrote:
> On Tuesday 08 March 2005 12:59 pm, Andras Mantia wrote:
> > On Tuesday 08 March 2005 22:48, Andras Mantia wrote:
> > > I cannot believe this does not work in PHP....
> >
> > showReleases("releases/releases.xml", $_appFormal);
> > works fine.
> >
> > Andras
>
> Oops. What will not work is...
> showReleases("releases/releases.xml", $appName=$_appFormal);
>
> I don't understand the comment about this being kdewebdev.org
> specific? That's what we're building.
When you write libraries (and this is basicly a library) you usually try
to be not application on environment specific. So if it's possible to
write code that does not depend on some other code (like in this case
inclusion of applib.php before releases.inc.php) you should do it.
> The question is whether we want
> to make it easier for people on our site or add things to remember
> for some other reason? Having a value that is automatically available
> in an application subdomain should minimize the requirement to call
> it since it will be there.
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.
> In this case I pulled CVS this morning and found an error on
> KLinkStatus in the release area showing on the page. The error was
> that a required parameter for the function was missing. It seems a
> good idea that if we add parameters to functions that may be in use
> they should have a default value if possible so as not to create
> errors, or we need to search out each instance of the function call
> in CVS and update it.
This might be my fault, as I said I fixed KLinkStatus locally.
> There are several ways to address the portability if that is what you
> want.
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.
> through various methods to absurd levels of complexity in spite of
> efforts to modularize and simplify. I'm probably paranoid about this.
What I suggest is exactly the sane modularization.
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/20050309/d9fa07ac/attachment.pgp
More information about the kdewebdev-site
mailing list