At 10:26 AM 4/29/99 -0400, you wrote:
>Michael Farr wrote:
>> It is quite simple to generate your own GIF image's dynamically (with
PHP),
>
>You can do this in C with the gd library from Thomas Boutell.
>
> http://www.boutell.com/gd/
>
>
>> C is good ... but not for web pages.
>
>Why not? I am truely interested in your opinion in this. I've heard
>other people say the same thing, but so far it's been mostly a lack of
>experience in C and greater experience in some other language. I don't
>do much in Perl, but that's not because Perl is not a good language,
>it's because I'm not as experienced with it.
>
>I have been using it for web apps for 4 1/2 years. Certainly writing
>everything from scratch in C would be a pain in the rear, but that's
>what libraries are for.
Don't get me wrong, C is good, but the power of C is really used when all
you ever want to generate is stdout text. If I needed to do some real
tough processing, then I'd use C, or C++.
Mostly scripting doesnt need much more than a print statements, PHP is more
direct at this. For example
In php you can say
echo "<INPUT TYPE=HIDDEN NAME=servname VALUE=$servname>";
in C you would say
printf("<INPUT TYPE=HIDDEN NAME=servname VALUE=%s", servname);
or C++
outs << "<INPUT TYPE=HIDDEN NAME=servname"VALUE=" << servname;
Its a pain having to think about joining the strings properly in C. I
prefer to just write it the way it is going to look.
Also the libraries are there and are easy to look up when you need to do
something more interesting. C doesnt have cool web sites like PHP to go
and ask questions about creating web pages on.
On the other hand when you want to get really hard core, you can do some
stuff like they have got on the php web page ... I still haven't figured
that stuff out.
.. the difference is so minimal its not funny, but overall PHP has got to
win for web based stuff