[Asterisk-Users] Newbie IVR question

Steven Critchfield critch at basesys.com
Sun Sep 7 10:21:57 MST 2003


On Sun, 2003-09-07 at 00:43, Tom Forbes wrote:
> Steven Critchfield wrote:
> > On Tue, 2003-09-02 at 10:00, listbox at adamsbrothers.com 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. 

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. 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. 

Php is intended to take in user input, chew on it a moment, maybe
consult backends, then spew data and die.  
-- 
Steven Critchfield <critch at basesys.com>




More information about the asterisk-users mailing list