Joshua Kogut wrote:

w00t. You got me on that one. I think this analogy is blown far out of the water by those smarter than I. Congrats *bows*. Ok, the real reason I would rather have php than perl, is really two things. First, to use the toolbox [perl], you (should) need to know how to use every tool effectively, or at least most of them, the hammer [php] is the ONLY the tool you need.

Inexperienced users may see easier ways to do something with perl, but chances are, you can still do these things (related to web applications) with php. Note: Perl has tools to cover every aspect of your entire computing experience, it can make desktop applications, utilities, can do file management, etc. This results in a steep learning curve. Another benefit for php, is that it is SIMPLE, and simple doesn't always mean limited. It means simple. It results in a language that I, a relative beginner to php (only been using it for a year and a half now) can make an entire web site, login system, custom session handlers, full database support (mysql, yeah!) basic file management, user uploading, automatic payment system (paypal, yeah!), automatic xml/rss feed generation, mass emailing system (spam, yeah! lol), HAND-BUILT message boards, etc.

How many scripts do you see for the front/back end of a website that involve perl? I don't see very many, on the other hand, php has many freely available scripts that do everything that I have just said could be done in less than 5 hours. Note: I am NOT recommending php because of the amount of free scripts that are out there, this is an example of its popularity. As stated by a popular wiki,

<en.wikipedia.org <http://en.wikipedia.org>>-------------------------------- One major part of PHP which has helped it become popular is that it is a very loose language; in particular, it is dynamically typed <http://en.wikipedia.org/wiki/Dynamic_typing>. That is, the rules are not as strict with variables—they do not have to be declared and they can hold any type of object. Arrays are heterogeneous, meaning a single array can contain objects of more than one type.

According to Netcraft <http://en.wikipedia.org/wiki/Netcraft>'s April 2002 <http://en.wikipedia.org/wiki/2002> survey, PHP is now the most deployed server-side scripting language, running on around 9 million of the 37 million domains <http://en.wikipedia.org/wiki/Domain> in their survey. This is confirmed by PHP's own figures, which show PHP usage (measured on a per-domain basis) growing at around 5% per month. In May 2003, almost 13 million domains were using PHP, based on the same source.[1] <http://www.php.net/usage.php>

Due to PHP's popularity in the web space, a new breed of programmers emerged who are familiar only with PHP. This encouraged the development of a command line interface for PHP, as well as GUI libraries such as GTK+ <http://en.wikipedia.org/wiki/GTK> and text mode libraries like Ncurses <http://en.wikipedia.org/wiki/Ncurses> and Newt. This was a major step for PHP, because it helped move it from being a language used only for CGI to a general-purpose programming language. On the desktop it has been favored by some new programmers as a rapid prototyping environment. It is both a quick and effective tool for create rapid web applications with ease, greatly improving any website as a whole.
</en.wikipedia.org>----------------------

So, php isn't just a web language, it is also a general purpose programming language. lol, php is powerful, no doubt about it, but there is one thing you should know, that you don't have to go either php OR perl, you can choose php AND perl, for the sick, sick people that want to learn both languages.

I know PHP and Perl and have given both languages a lot of thought and I have come to sum it up to this, PHP is largely a cancer that has grown on Perl. I know thats a big statement and its probably way over the top but here is why. Firstly I have done benchmarking between Perl and PHP and PHP is often countless magnitudes slower then Perl. For example if if you open up a file with php in a while loop and do nothing iterating through the file it takes MANY magnitudes times longer to go through it doing NOTHING.

Also PHP is largely just Perl taken and aimed at the cheap web hosting market, if you know both languages you know at the core how similar they are, this is because PHP was originally written in Perl and it looks like its creators couldn't come up with anything on their own. PHP is just making things a bit easier for web hosting from spitting out errors to the web page while developing instead of Perls method of writing it to the log file or creating an good quality encoder so developers can sell apps and protect their property, because of its cheaper easier host ability PHP apps such as PHPNuke have driven a demand for apps that hosting providers base a lot of their infrastructure around. These little things are great for web hosting community are behind the core of its uptake, over all though PHP really is just riding on the hard work of the creation Perl by going that extra mile on usability on both sides.

If mod_perl could just be a bit more friendly to the mass web hosting then there is no reason why it couldn't be bigger then PHP since its a lot faster.



On 11/1/05, *allan juul* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Joshua Kogut wrote:

    > Hey guys, here's an analogy concerning Php and MP. You can go to
    a store,
    > and you have $100 US to buy something to help you hammer nails.
    The logical
    > choice is that you should buy a hammer right? It does what you
    need it to,
    > and the shallow learning curve is nice. But, on the way to the
    hammer
    > section, you see this multi-purpose tool that can not only
    hammer the nail
    > for you, but it can also buy the nail, hold the nail in the
    wood, and then
    > make lemonade for you. Now, you go buy the multi-purpose tool,
    bring it
    > home, and then realize that it doesn't do the one job that you
    wanted it
    > for, hammering, as well as a hammer would.
    >
    > This is how I felt with Perl. It did so many things that I felt
    that it just
    > couldn't concentrate one one thing enough, web applications. So,
    I found
    > myself at php.net <http://php.net> < http://php.net> one day and
    fell in love with the trusty
    > hammer.

    i _really_ like your analogy even i strongly disagree (perl/mp is a
    toolbox rather than a single multi-purpose-tool IMO)

    so, you could turn that analogy upside down ;)

    let's say you opted to buy the cheap tool (the simple hammer) and you
    got home and started hammering. midway thru you realize that you
    made a
    mistake so you want the nail out but now you haven't got the tool
    because the tool you bought can only hammer.

    so you go back to the shop and "invest" in the toolbox. (actually you
    just swap your original hammer with the toolbox since they are
    both the
    same price ). then you go home again. you open the toolbox. wow.
    theres
    a hammer ... no wait there are 2,3,4,N hammers, different sizes,
    different materials, different colours. but please don't use the
    screwdrivers as a hammer. there are also N tools to take out the
    nails.
    did you run out of nails? no problem, look in the box.

    ./allan



    ---------------------------------------------------------------------
    The official User-To-User support forum of the Apache HTTP Server
    Project.
    See <URL: http://httpd.apache.org/userslist.html> for more info.
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>
       "   from the digest: [EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>
    For additional commands, e-mail: [EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>




--
||  jmkogut  ||
email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
|| Networking: Where all your problems are category 5. ||



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to