Steven Critchfield wrote:
On Sun, 2003-09-07 at 00:43, Tom Forbes wrote:

Steven Critchfield wrote:

On Tue, 2003-09-02 at 10:00, [EMAIL PROTECTED] wrote:


php is not just a web scripting language anymore. it has been used in
other ways for quite a while now. it works nicely from the command line,
can be used with ncurses and with gtk. there are several well-known
respectable large projects out there built upon php. i usually find that
php's biggest critics are those who know the least about the language. however that holds true with pretty much any technology. linux suffers

from the same type of critics.


Just to point out, I am a php developer. I actually am employed to
create and maintain a large webapp in php.


I like the fact that I can take my php or perl scripts and not have to
change much to them to work in the other language. Well if they are
simple enough. There is enough well known documented problems with php.

Such as?


This is just an example that a co worker submitted recently. Now that
bugs is back up I can point to it.
http://bugs.php.net/bug.php?id=25281

A fair number of problems seem to be from the developers personalities.
This is known in other open source software as well. Take the fact that
so many people avoid qmail due to DJB. Monty Widenius of mysql causes
people to continually search for something better.

So, we're not necessarily talking about functionality problems (real ones anyway), but about personality problems- people who are vocal about their disagreement with the routes that various open source efforts have taken. - I saw an article recently about a PR guy for a well-known PC game producer politely (relatively, anyway), tell a bunch of hard-core gaming fans go to hell - he'd had enough of their whining, bitching, and generally tiresome diatribe. Same issue - a few vocal know-it-alls think they speak for the entire community when they whine (loudly) because their particular whims aren't being met, or because the development doesn't conform to their desired methodology.



Although it doesn't support the php argument, here is a link for amusement. http://www.rickbradley.com/tour/


Just saying that because it is used in large projects doesn't change
whether it is suited to the task. There are enough people on this
planet, that statistically you will find enough people who refuse to
admit the are using a square peg for the round hole.

If we go back to PERL's roots, we find that it was never intended as a general, all-purpose language, but one for extracting and formatting data. Now it seems as though it's being touted as the cure-all for *anything* that requires scripting. PHP's intent, on the other hand was a bit more sophisticated. Being a "web-based" scripting languange, it, by necessity, had to interface with other components (and do it efficiently) in order to acquire, manipulate, and pass data between the user and any backend processes.


I'm more curious to know what exactly it is about AGI scripting that would make PHP an inappropriate choice.


Perl has always been intended to be glue between processes.

You mean, the intent of PERL *has come to be* glue between processes. It wasn't that way in the beginning. I'd venture to say tha that most of what PERL can do today wasn't even a twinkle in its author's eye at the time it was first conceived.



I don't
consider it the cure all for everything. While I have used the gtk
extensions for php and perl for curiosity, I wouldn't suggest using them
for anything that needs to be done on a production system.


When you consider what it is you are doing, perl seems the perfect
choice. AGI is a textual interface to your app, which then must respond
in text. This is what perl was written to handle.

No, PERL, more accurately, was written to chew through reams of textual data, and produce some kind of formatted output. Consider the definition that appears in the original PERL man page:


        Perl is a interpreted language optimized for scanning  arbi-
        trary  text  files,  extracting  information from those text
        files, and printing reports based on that information.

Though it goes on to say that it's "also good for system management tasks", it's clearly an afterthought- shell scripting already had this covered.


Php is intended to take in user input, chew on it a moment, maybe
consult backends, then spew data and die.

And what is it about an AGI script that does not meet each and every one of these criteria?


Regards,

Tom

_______________________________________________
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to