Home : Products : Gossamer Forum : Discussion :

Products: Gossamer Forum: Discussion: Re: [Jagerman] Why dymanic pages as opposed to HTMl?: Edit Log

Here is the list of edits for this post
Re: [Jagerman] Why dymanic pages as opposed to HTMl?
In Reply To:
PHP's philosophy is a little different - basically, it tells you what the way you should do something is.

yes. like 500 years before: there was no "right" way to write correctly. everyone wrote simply like he wanted to.. i hope you agree the model today with having one way to write "tomorrow" is better.


In Reply To:
For example, consider the following:

my $response = GT::WWW->get('http://gossamer-threads.com');
print "Response status: " . int($response->status) . "\n";
print "Response string: " . $response->status . "\n";
print "Headers: " . $response->headers . "\n";
print "Content: $response\n";

Could I do something like that in PHP? It's doubtful.

no, evern better Tongue

$snoopy = new Snoopy; // snoopy is a class..
$snoopy->fetch("http://raphb.ch/");

echo "headers: <pre>";
print_r($snoopy->headers);
echo "</pre>";
echo "status: " . $snoopy->status;
echo "content: " . $snoopy->results; // "." is concarnation..

and hey, if you don't want the headers, you could even do:

$fp = fopen("http://raphb.ch/", "r");
$content = file($fp); // loads the filepointer fp into array content
foreach($content as $value) {
echo $value;
}

In Reply To:
Yes. You don't know Perl, yet you can see exactly what that does. On the other hand, I can't look at your PHP example and figure out what it does.

i'd say the opposite Unsure


In Reply To:
I could write the same code so that it looked like this:
[.]
Many people would probably be tempted to write it that way - or worse. My point is that just because some Perl code is ugly, doesn't mean that all Perl code is ugly.

yes. but of course if you can't write ugly, you won't write ugly. there is NO reason to write ugly, never.

In Reply To:
But, the fact that Perl can be ugly is a strengh, not a weakness.
Basicly i think you should force the user to write in a good style. you should never support users wich write ugly code. i'm reading pretty much code the hole day. i don't think having various ways to solve something is pushing creativity. it rahter stops it, 'cause you've to hold more things in your mind. more code. more ways to solve something.. ok, this really may be discutable Crazy (even if i'd never agree..)

cu, Raphael.

Last edited by:

raphb: Nov 15, 2002, 7:27 AM

Edit Log: