Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Preaching Perl gospel to PHP converts...

by BUU (Prior)
on Apr 25, 2002 at 13:23 UTC ( [id://161940]=note: print w/replies, xml ) Need Help??


in reply to Preaching Perl gospel to PHP converts...

A couple of people have mentioned that it would be a good idea to 'add another tool to the tool box' (or whatever semi-random metaphor they feel like using), but my question is, how does adding php help you? I mean, what you can you do in php you cant do in perl, aside from some syntactical differences as noted above, function != sub etc, how does learning php help above perl? _I_ only see two real advantages of php, one is that it allows you to easily embed your script within html without having to print print print all the time, and the other is that its a small, lightyweight and easy to learn language, so its not that hard for newbies to pick up. For the first point, ill just mention templates and perlscript and leave it at that, for the second point, well, not much you can do, with power comes some complexity. Thoughts? Im not particurally trying to start a holy war or what not, I just tend to look at php as a web only subset of perl.

Replies are listed 'Best First'.
Re: Re: Preaching Perl gospel to PHP converts...
by powerhouse (Friar) on Feb 05, 2003 at 15:59 UTC
    Ok, almost a year later, I want to throw my comments in there...

    I am a relativley NEW Perl programmer. I started learning Perl about 9 months to a year ago.

    I have only modified a php script, I have not written any.

    Speaking from OUTSIDE PHP looking in, and on the "outskirts" of Perl(not a Perl guru), I have seen ONE THING, that PHP does, that I have not yet seen Perl do.

    PHPLive.
    For those that do not know what that is, it's a Live Support helpdesk. It uses Javascript and PHP. The part I'm talking about, is how I can have my "console" open, which is NOT an applet, it's just a window, and I can leave it open forever, and my site will ALWAYS know that I have it open, so it says I'm online, or if one of my partners is on it, it says online. However, if I'm the only one, and I merely CLOSE the window, and then refresh my website, it KNOWS I've closed the window.

    I have not seen perl be able to "call" a window, REMOTELY, that could be in china, and know that it's open or closed.

    If Perl does it, I would LOVE to know the ways to make it work. I'm sure there are some kind of applets out there that can work, but to just use a ordinary window, it's amazing that it does that.

    Don't get me wrong, I'm a Perl Guy, all the way. I have some many different sites, that I've built in Perl, that are getting better and better, as I learn more and more.

    I just wish, I could create a Perl "live support" desk, like that PHPLive by OSICodes(open source industry codes).

    That would rock.
    (hint hint, if someone knows how to make Perl do something like that, please let me know)

    That is they only REAL difference I see. I think that Perl has much better support, since it's been around much longer.

    thx,
    Richard

      It's not the PHP doing the work it is javascript and DHTML in the web page via a technique called "Remote Scripting".

      Basically the javascript makes Remote Procedure Calls to a server and loads data in the background preventing a refresh of the page and allowing "constant" two-way communicatin between the browser and the server.

      So the backend server application can be written in anything as long as the javascript client and the server speak the same RPC mechanism.

      Search for "remote scripting" javascript perl on google.

      Here is a decent start:
      • http://developer.apple.com/internet/javascript/iframe.html
      • http://www.paranoidfish.org/boxes/2002/04/17/
        • http://www.paranoidfish.org/boxes/2002/01/30/
      --
      Clayton aka "Tex"
      I have seen ONE THING, that PHP does, that I have not yet seen Perl do.

      I have seen several.

      • PHP has one central website for news, documentation, downloads, etc (php.net). Perl websites are scattered all over the place: perldoc, useperl, perlfaq, etc.
      • PHP is very easy to install. mod_perl is not.
      • PHP is open source, but has significant corporate backing (i.e, Zend) that Perl lacks.
      • The PHP community is trying hard to make the next version of PHP a worthy contender to Java in the Enterprise world. The Perl6 community could care less.
      • PHP makes the easy things even easier. :)
      perl -e "print 'Just another PHP hacker!'"

        PHP is very easy to install. mod_perl is not.
        I've seen this asserted before and it always leaves me scratching my head. Can you or someone else elaborate on what is so easy about installing and maintaining PHP? The way I understand it, I have to pick which "modules" I want PHP to use before compiling it. If I want to change those, add new modules or upgrade some then I have to do the ./configure (with scads of options); make; make test; make install dance. At least with perl if I want to upgrade or add DBD::Pg it is separate from the perl core so I'm not forced to do the equivalent of recompiling perl and mod_perl.

        The perl dance looks like: download String::Approx, perl Makefile.PL LIB=~/lib && make && make test && make install and then any code that wants to make use of that just says use String::Approx.

        Am I just not understanding PHP here or this the supposedly "easy" process? If there is a better way to manage a PHP installation I'd love to hear about it since I can see myself wanting to use PHP occassionally and it'd be good to have a maintenance process that isn't torture.


        Seeking Green geeks in Minnesota

        Howdy!

        "PHP makes the easy things even easier." (with smiley)

        ...but does it make the hard things possible? Harder? Easier? If you're going to trot out the line, you don't get to pick out part of it. And I'm being a bit more critical *because* the snark is anonymous.

        I'll leave other points for others to address... yours,
        Michael

        I know I'll burn in hell for this :) but I just could not resist temptation to troll on PHP vs. Perl topic. You know, last months I've participated in couple of PHP projects and my frustration shows.

        PHP has one central website for news, documentation, downloads, etc (php.net). Perl websites are scattered all over the place: perldoc, useperl, perlfaq, etc.

        Show me central website for PHP modules downloads (similar to CPAN). There is no such beast (and no, small collections of PHP libs on PEAR doesn't count).

        PHP is very easy to install. mod_perl is not.

        This was commented in other subthread. If you forgot to compile in support for, say MySQL, you have to recompile PHP. Well, actually there is exist a way to compile support for it separatly afterwards but I would not call it simple.

        PHP is open source, but has significant corporate backing (i.e, Zend) that Perl lacks

        So what? Perl can be successful without any corporate backing.

        The PHP community is trying hard to make the next version of PHP a worthy contender to Java in the Enterprise world. The Perl6 community could care less.

        Perl5 is already there.

        PHP makes the easy things even easier.

        Not it my experience though.

        --
        Ilya Martynov, ilya@iponweb.net
        CTO IPonWEB (UK) Ltd
        Quality Perl Programming and Unix Support UK managed @ offshore prices - http://www.iponweb.net
        Personal website - http://martynov.org

        Perl runs archive.com, Google, eToys and a bunch of other huge sites. The first anywhere nearly comparable site I've heard of switching to PHP is Yahoo, and their real work (the backend) is still all Perl.

        Contender to Java? I've yet to see a single high traffic site running on serverside Java technology. And in other news, I offer Perl in the pole position.

        Perl doesn't hype itself. Perl just gets the work done.

        Makeshifts last the longest.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://161940]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-03-19 10:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found