Stories
Slash Boxes
Comments

News for nerds, stuff that matters

MySQL and Perl for the Web

Posted by timothy on Mon Apr 26, 2004 03:30 PM
from the good-place-for-em dept.
Craig Maloney writes "MySQL (love it or hate it) is one of the most popular databases for deploying websites. Perl (also love it or hate it) was almost synonymous with website programming. Arguably there are different choices for different needs in web development (PostgreSQL, PHP, Java, etc.), but there is no argument that if you are planning on putting together a website, using MySQL and Perl that MySQL & Perl for the Web will aid immensely in that development." Read on for the rest of Maloney's concise review of the book. While not new, he says it's still a valuable volume.
MySQL and Perl for the Web
author Paul DuBois
pages 552
publisher New Riders
rating 10
reviewer Craig Maloney
ISBN 0735710546
summary A clear, well written book for Perl and MySQL

Who is this book for?

Developers looking for a quality book on Perl and database development should not pass this book up. While the title of this book is MySQL & Perl for the Web, it could have easily been called DBD/DBI & Perl for the Web. The SQL examples may or may not work with various databases, but the DBI interface code should remain the same. This book will also do well as a reference for experienced coders looking for well-crafted examples of web-based applications.

What's good?

The second chapter should be enough to get anyone up to speed with using Perl, DBI, CGI, Apache, and MySQL. After a brief introduction and configuration of MySQL and Apache, the author settles in to discuss coding DBI and Perl. The remainder of the chapter details the best practices for using Perl and DBI together. Near the end of the second chapter, the author creates a fully functional to-do list, demonstrating ways to add, update, and delete information from the database using Perl and DBI. Instead of taking small baby steps over many chapters, the author shows important concepts and best practices for those concepts quickly. Even seasoned (hardened?) programmers may learn new tricks or methodologies from the second chapter of this book.

Is that the end? Are we left with one very well written tutorial chapter? Thankfully, the rest of the book has plenty to offer. Subsequent chapters include:

  • Improving performance with mod_perl
  • Generating and processing forms
  • Writing form-based applications
  • Automating the form-handling process
  • Performing searches
  • Session management
  • Security and privacy issues
  • E-commerce applications

Each chapter is clearly written, with several examples used to demonstrate the concepts presented. The examples are clearly written, and the author makes the whole learning process enjoyable and fun. The examples range from a give-away contest (including a random drawing), an electronic greeting card program, polling programs, and a shopping cart program. Each of the examples is presented completely, but are introduced in pieces (subroutines, modules, etc.) The full source code is available from the author's website at http://www.kitebird.com/mysql-perl/

What's in it for me?

MySQL & Perl for the Web is the book that Perl programmers on any project will wish The Other Guy had read. The examples are clear, the writing is engaging, and the code is maintainable. This is a practical book and should not be overlooked in any serious Perl programmer's library.


You can purchase MySQL and Perl for the Web from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

This discussion has been archived. No new comments can be posted.
Display Options Threshold:
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • Web, schmeb (Score:5, Insightful)

    by jargoone (166102) * on Monday April 26 2004, @03:31PM (#8976068)
    Perl (also love it or hate it) was almost synonymous with website programming.

    Love Perl for most anything, hate it for web "programming". There's a good reason it was synonymous with website programming. It's because there now exist more flexible, robust, easy-to-use platforms for web development.
    • Re:Web, schmeb (Score:5, Interesting)

      by wawannem (591061) on Monday April 26 2004, @03:37PM (#8976143)
      (http://www.wantii.com/)
      Currently working in a Java/JSP/Sybase-based web programming environment and I love it.

      But, I will give perl it's props.

      I often use it to prototype large projects. Despite most arguments for other languages, I will say that you can pump out perl code pretty fast and it does help when you need some mockups and basic functionality to sell a concept.
      [ Parent ]
      • Re:Web, schmeb by DebianRcksLindowsLie (Score:2) Monday April 26 2004, @03:59PM
    • Re:Web, schmeb by zerocool^ (Score:2) Monday April 26 2004, @03:39PM
      • Re:Web, schmeb by DAldredge (Score:2) Monday April 26 2004, @03:43PM
        • Re:Web, schmeb (Score:4, Informative)

          by zerocool^ (112121) on Monday April 26 2004, @03:54PM (#8976358)
          (http://mirror.cs.vt.edu/ | Last Journal: Tuesday April 13 2004, @11:24AM)

          ?? Support your inferrence that perl is faster than PHP?

          I don't have hard numbers, but I have been in environments where both are used, and perl seems to perform much worse. Specifically, I administer ~100 webservers, and clients that use more php put far less of a load on the system than people writing in perl scripts executed through web pages or mod_perl. In multiple years of working with both, perl just has become synonymous with higher system load.

          The load jumps related to PHP that I see are always MySQL based loads.

          ~Will
          [ Parent ]
        • Re:Web, schmeb by trewornan (Score:1) Tuesday April 27 2004, @04:51AM
      • Re:Web, schmeb by hotfries (Score:1) Monday April 26 2004, @03:48PM
      • Rooting (Score:5, Funny)

        by ryantate (97606) <ryantate@ryantate.com> on Monday April 26 2004, @04:27PM (#8976761)
        (http://ryantate.com)
        The only reasons to use perl over PHP for web development are 1.) familiarity with perl (slashdot), and 2.) security (to avoid "today's php upload root exploit").

        So PHP is ideal unless, you know, you don't want to be rooted ...

        Noted.

        (Backs away slowly ...)
        [ Parent ]
        • Re:Rooting by zerocool^ (Score:2) Monday April 26 2004, @08:49PM
        • Re:Rooting by Vaughn Anderson (Score:2) Monday April 26 2004, @09:02PM
      • Re:Web, schmeb (Score:5, Informative)

        by sporty (27564) on Monday April 26 2004, @04:31PM (#8976807)
        (http://digg.com/)
        No. perl is not a regexp manip language. The regular expression stuff is a subset of it, just like the data structures and what not.


        Saying that perl had to be addapted to web development is just wrong. perl also, is not slower than php. Perl is a VERY modular language. You can do traditional CGI programming in it, just like php. There are many templating options as well as mod_perl, which more resembles java servlets than it does php.


        Also, stating that it's clearer means nothing. At least with DBI, i know how to connect to any database. With php, there's a seperate function to open a connection to the database, per vendor. Their function names are quite conveluded, switching orders of word types, i.e. noun_verb vs verb_noun.


        PHP is built for the web first, and is a programming language second.

        [ Parent ]
        • Re:Web, schmeb by FilthCatcher (Score:1) Tuesday April 27 2004, @05:42AM
        • 1 reply beneath your current threshold.
      • Re:Web, schmeb by daperdan (Score:3) Monday April 26 2004, @04:38PM
      • Re:Web, schmeb (Score:4, Interesting)

        by ajs (35943) <[moc.sja] [ta] [sja]> on Monday April 26 2004, @05:21PM (#8977386)
        (http://www.ajs.com/~ajs/)
        Perl had to be adapted to web development

        No more so than any other language. PHP really doesn't count here... it's an HTML templating tool that was adapted to programming, which is why it's great for prototyping small web tools, but even at the medium-scale (e.g. PHPNuke/PostNuke) it's already cumbersome in the extreme (look at how many times those two projects have had to re-architect). Insofar as PHP is getting back to its roots and becoming Perl again, it's a good language.

        If I were starting from scratch on a new Web-related project I might use PHP, but I would almost certainly treat it as a templating system only, and then write the back-end in Perl or Java depending on the platform. But that might just be that I've not explored TTK enough... I've heard very good things about it as a templating system.

        it's significantly slower than php

        No, no it's not. Running any kind of benchmark on real code it's not. When you integrate Perl poorly with a Web server, then it's slow. When you integrate it well (e.g. bricolage, TTK, Mason) it's quite reasonable, and VERY easy to develop in.

        [PHP is] easier to understand and easier to program in

        well ... to a PHP programmer yes.

        PHP is a Perl derivative in roughly the same way that Java is a C++ derivative. One's children always spend their youth claiming that their parents "did it all wrong", but as they grow and mature they find that their parents had gone through all of this before and that their decisions were not so very surprising after all. PHP has come a long way, and bravo to it, but let's not get hyperbolic.

        Familiarity with perl (slashdot)

        Were you using Slash as an example of something written by someone familliar with Perl or as an example of something one would be familliar with?

        If the former, it probably should have been "Familiarity with Perl and PHP not having been written yet (Slashcode)"
        [ Parent ]
      • Re:Web, schmeb by eyeye (Score:1) Tuesday April 27 2004, @05:21AM
      • Re:Web, schmeb by redtux1 (Score:1) Tuesday April 27 2004, @01:08PM
      • 1 reply beneath your current threshold.
    • Pathologically Eclectic Rubbish Lister by IO ERROR (Score:3) Monday April 26 2004, @03:42PM
    • Why bother? by Decaff (Score:3) Monday April 26 2004, @03:53PM
    • Re:Web, schmeb by Mr. Neutron (Score:1) Monday April 26 2004, @03:56PM
      • Re:Web, schmeb by Anonymous Coward (Score:1) Monday April 26 2004, @04:08PM
      • Re:Web, schmeb by next1 (Score:1) Monday April 26 2004, @08:33PM
      • Re:Web, schmeb by Mr. Neutron (Score:2) Monday April 26 2004, @09:24PM
      • 1 reply beneath your current threshold.
    • Re:Web, schmeb by eviltypeguy (Score:3) Monday April 26 2004, @05:34PM
    • Re:Web, schmeb by SphericalCrusher (Score:2) Monday April 26 2004, @08:58PM
    • Re:Web, schmeb by next1 (Score:1) Monday April 26 2004, @09:30PM
    • 1 reply beneath your current threshold.
  • Three cheers for LAMP (Score:2, Insightful)

    by Neil Blender (555885) <neilblender@gmail.com> on Monday April 26 2004, @03:32PM (#8976083)
    Linux, Apache, Mysql, and Perl. They changed the world forever.
  • Good! (Score:1, Troll)

    by JaxWeb (715417) on Monday April 26 2004, @03:35PM (#8976128)
    (http://jax.hopto.org/ | Last Journal: Wednesday May 12 2004, @11:28AM)
    I find there are a lot of books and resources which each Perl, or teach SQL, but don't teach you how to use Perl, or use SQL. For example, it is perfectly possible to read a book, learn Perl, and not be able to actually use it for anything useful (in regard to websites). Not many books that I've seen have addresses this. My personal knowledge of Perl for use in webpages is scraped together. Perldoc.com [perldoc.com] helps a lot, however. Books like this seem useful as a starting ground. PHP is gaining a lot of ground on PHP (It's overtaken it, I hear). This may be because it is more suited to suited to web development, or it may be more because all it does is web development: As soon as you know PHP, you know how to make a website using PHP. Most Slashdot readers will be past this point in learning a language I should imagine, so, without reading anymore than this book review, I might suggest it wouldn't be worth buying, but this is certainly the sort of book which should be on the bookselves in shops. A lot more helpful than 101 books about how to use IOSTREAMs in C++.
    • Re:Good! by rainman_bc (Score:1) Monday April 26 2004, @03:38PM
    • Re:Good! by Anonymous Coward (Score:1) Monday April 26 2004, @03:39PM
    • Re:Good! by wawannem (Score:2) Monday April 26 2004, @03:40PM
    • Re:Good! by Daniel Dvorkin (Score:3) Monday April 26 2004, @03:41PM
      • Re:Good! by mrdogi (Score:1) Monday April 26 2004, @04:10PM
        • Re:Good! by Daniel Dvorkin (Score:2) Monday April 26 2004, @06:21PM
    • 2 replies beneath your current threshold.
  • Perl is very flexible (Score:1, Funny)

    by Anonymous Coward on Monday April 26 2004, @03:37PM (#8976148)
    It could be programmed to tell you when you forget a closing </I> tag.
  • Perl / MySQL CMS solution. (Score:4, Informative)

    by Archangel Michael (180766) on Monday April 26 2004, @03:37PM (#8976156)
    (Last Journal: Wednesday September 22 2004, @11:13AM)
    I have been using a MySQL / Perl solution called WebGUI [plainblack.com] for quite a while
    now. It is a full CMS system that is truly open source and cross
    platform, running on *nix, Windows and MacOS.

    It truly is powerful yet very easy to use. Plenty of features such as Submissions system, Bulletin Board, Calendar, Syndicated Content and much more.

    If you are looking for such a solution, feel free to give it a try.
  • If you're familiar with DBI... (Score:3, Informative)

    by tcopeland (32225) * <tom.infoether@com> on Monday April 26 2004, @03:39PM (#8976191)
    (http://tomcopeland.blogs.com/)
    ...and you've got a Ruby [ruby-lang.org] app to write, you'll be happy to know that Ruby/DBI [rubyforge.org] is available.

    It's being actively developed - a FrontBase release just happened a few days ago - and it supports a big list [rubyforge.org] of databases.
  • I'm going to have to get my copy.. (Score:3, Informative)

    by Metallic Matty (579124) on Monday April 26 2004, @03:39PM (#8976194)
    This will be an excellent addition to the O'Reilly books on Perl I already have.

    The whole love or hate thing in the article intrigues me I might add. I love both MySQL and Perl. Why? Well, you can't beat MySQL for its cheapness facor. Let's face it, most people don't need some professional job, myself included. And as far as Perl goes, well, anyone who's used it significantly can understand how great it is for practical answers on the fly.
  • by Anonymous Coward on Monday April 26 2004, @03:41PM (#8976223)
    ...until I discovered poking myself with a sharp stick.
  • old book? (Score:5, Informative)

    by inf0c0m (83209) on Monday April 26 2004, @03:41PM (#8976227)
    (http://pezdispenser.net/~inf0c0m)
    does anyone else realize that this book is exteremly old?

    Paperback, August 2001

    also.... on the same bn site

    A new copy is not available from Barnes & Noble.com at this time.
    • 1 reply beneath your current threshold.
  • One whole chapter? (Score:3, Interesting)

    by oneiros27 (46144) on Monday April 26 2004, @03:43PM (#8976246)
    (http://www.annoying.org/)
    Even seasoned (hardened?) programmers may learn new tricks or methodologies from the second chapter of this book.
    I don't know about you, but one whole chapter seems to be little reason to purchase a book.

    As there are already books such as Programming the Perl DBI and Web Development with Apache and Perl, is the niche that this book is trying to fill actually worth it? Would I be better off reading Writing CGI Applications with Perl and The Official Guide to Programming with CGI.pm?

    Personally, I haven't read a single one of them, so I'd really love to know. (one of these days, I'll actually read the copy of Practical mod_perl that's been collecting dust on my shelf.)
  • Authors other books... (Score:3, Informative)

    by agwis (690872) on Monday April 26 2004, @03:49PM (#8976300)
    I personally won't use Perl for backend programming on a website but if I had to I would probably buy this book based on the fact that it is authored by Paul DuBois.

    When I first started out with MySQL I bought the book titled 'MySQL' written by DuBois. Since then, I've obtained a couple of other books about it and still find myself referring to his most often.

    Too bad it isn't MySQL and (PHP|Python|Java). Who uses Perl in web programming anymore?

    *dons flame retardant suit*

    -Pat
  • by CaptainPinko (753849) on Monday April 26 2004, @03:50PM (#8976306)

    Nice. I'm planning on learning how to tie scripting (have decided on Perl yet but it's a contender) and databases this summer anyway. This book might make the decision as to what to use for me.



    However, for those just picking up Perl for the first time I recommend the free ebook Picking Up Perl, and the [ebb.org] ActiveState Perl Interpreter [activestate.com] for Windows (this was a while ago-- if you are using Linux it probably aleraday has Perl installed). And then as it was Windows I was learning Perl on I used OpenPerl IDE [sourceforge.net]. For Linux I recommend using Kate and Konsole.



    Not trying to be off-topic here but I figure someone reading this may want to try out what this Perl thing is.



    Disclaimer: Not a Perl fan at all, I actually perfer Python, but to each their own and as any Perl hacker can appreciate TIMTOWTDI! ;)

  • Choice Quote (Score:1, Funny)

    by Eberlin (570874) on Monday April 26 2004, @03:58PM (#8976405)
    "if you are planning on putting together a website, using MySQL and Perl that MySQL & Perl for the Web will aid immensely in that development."

    However if you are putting together a basket and require that this be done while not being mentally "all there" and submerged in seawater, "Underwater Basketweaving for the Mildly Retarded" will aid immensely in your project.

    I mean c'mon, can't we infer the subject matter from the book title? I'll admit that there are some obscure ones out there that you can't tell but this one just seems to be a no-brainer.
  • one thing perl did right (Score:4, Insightful)

    by jd142 (129673) on Monday April 26 2004, @03:59PM (#8976419)
    (http://slashdot.org/)
    One thing that Perl has going for it that PHP doesn't is that it has correctly set up the database connection functions. Once you connect to a data source, all of the commands you use to interact with that connection are the same, whether you are using mysql, postgresql, or just a csv file. This means that you can change backend databases trivially, merely by changing one line of code.

    With php, the commands for connecting to a database and running a query change, sometimes drastically, depending on the database you are using. For example, until recently if you had a query to run on a mysql backend, you did mysql_query($query) but for a postgres it was pg_exec($query). That is changing at least so now it's pg_query($query) but it still makes changing backends a large search, replace, and hope nothing breaks task.
  • Why actually choose MySQL? (Score:5, Interesting)

    by jesterzog (189797) on Monday April 26 2004, @04:04PM (#8976480)
    (http://www.windy.gen.nz/ | Last Journal: Wednesday January 05 2005, @03:37PM)

    Arguably there are different choices for different needs in web development (PostgreSQL, PHP, Java, etc.), but there is no argument that if you are planning on putting together a website, using MySQL and Perl that MySQL & Perl for the Web will aid immensely in that development.

    Maybe so, but I still have trouble figuring out why MySQL is given so much credibility in the first place.

    In the previous story about MySQL [slashdot.org], I posted a comment asking what it actually did that other databases (including the also-free PostgreSQL) didn't do at least as well, or better. The main responses seemed to include:

    • MySQL being the only DB supported for an application that someone wanted.
    • People already being very familiar with MySQL's strange ways of doing things [sql-info.de] that are inconsistent with every other respected database, not to mention SQL standards.
    • No other free databases having reliable Windows builds. (A Windows build of Postgres is on the way, but not yet fully complete.)
    • ISP's only providing a MySQL server.
    • Simply not knowing anything else due to past experience.

    The Windows build issue seems quite reasonable, but the other reasons imply that the main reason MySQL is so popular is simply due to lock-in. People use it because they have to, or because they're not familiar with the alternatives --- not necessarily because it's actually better for the task-at-hand.

    Perhaps MySQL is such a common name that people haven't heard of better alternatives out there. Presumably the book that this story reviews, which gives it even more publicity, is yet another reason that someone might consider MySQL without even thinking about alternatives.

    Can anyone tell me if I've missed anything, though? Besides the typical lock-in reasons for using MySQL, does it actually do anything better than other databases as any sort of killer feature?

    If not, and if you're looking to start learning about a database and actually have a choice, it seems that you're much better off looking at an alternative database.... whether it be a free one such as Postgres, or one of the big ones such as Oracle or SQL Server. At the very least, you'd get a more reliable database than MySQL, a more portable database than MySQL, and even postgres (just as free) offers a wealth of additional -- often useful and important -- features such as stored procedures and more complete data integrity. You'll probably also become much more familiar with correct SQL syntax ... for what it's worth.

    • Re:Why actually choose MySQL? by Thorizdin (Score:3) Monday April 26 2004, @04:26PM
      • Speed? by kpharmer (Score:2) Monday April 26 2004, @07:35PM
    • Re:Why actually choose MySQL? by njdj (Score:3) Monday April 26 2004, @04:29PM
      • 1 reply beneath your current threshold.
    • Re:Why actually choose MySQL? (Score:4, Interesting)

      by iwadasn (742362) on Monday April 26 2004, @04:49PM (#8977024)
      Something I think I'll point out. If you want a little toy database, consider HSQL. It's about as good of a database as MySQL (give or take), but it's written in Java (runs on anything), is about 300k or so in size, takes all of ten seconds to set up, and is actually much more SQL compliant than MySQL.

      If a tiny easy to use database is all that you need, HSQL is for you. The one real gotcha though is that it can't handle datasets larger than 1/2 a GB. That's way too small for real database servers, but more than enough for most websites, even many commercial ones, I imagine.

      In addition, HSQL can run within your java apps, which is really nice. I usually go for a dual pronged approach. use HSQL to handle all the file BS that you app might need (various config parameters, a small data cache that can be sifted efficiently in lots of different ways, other nastiness) and as (small) test databases to try a new idea.

      For real DB work though, trade up to Postgres, and be sure to get 7.4, the 7.3.x line has a lot of crippling bugs.

      The one real gripe I have about Postgres, is god, these people are in love with Hash joins. Any really good database should avoid hash joins like the plague unless it can guarantee that all the data that could possibly be returned by a subquery will fit into RAM. Postgres often wildly mis-estimates the size of a sub query, decides to hash it, and then gets killed when the query returns 100,000 rows, rather than 100.

      A real database using a hash join when it doesn't know that it can take the whole table into RAM (if needed) is just begging to get run over. This is one of the few things that can really knock out an otherwise good database, and really should be considered more carefully. Hashjoins are for small reference data tables (few thousand rows), and should not be used unless you're guaranteed to be surprised.

      HSQL of course doesn't have this problem, because it doesn't mess around with these "big" tables that are all the rage nowadays.

      [ Parent ]
    • Re:Why actually choose MySQL? by GabboFlabbo (Score:1) Monday April 26 2004, @05:26PM
    • Re:Why actually choose MySQL? by ajs (Score:2) Monday April 26 2004, @05:32PM
    • It was lack of advertisement for me... by gimpboy (Score:1) Monday April 26 2004, @05:46PM
    • Re:Why actually choose MySQL? by killjoe (Score:2) Monday April 26 2004, @06:03PM
  • Perl synonymous? (Score:3, Insightful)

    by Laptop Dancer (572075) on Monday April 26 2004, @04:09PM (#8976535)
    Perl (also love it or hate it) was almost synonymous with website programming. Arguably there are different choices for different needs in web development..
    I'm willing to argue vociferously with that!
  • Perl, the Web, and Rapid development (Score:3, Insightful)

    by kellan1 (23372) on Monday April 26 2004, @04:55PM (#8977085)
    (http://www.protest.net)
    While the idea of a 3 year old book on web development appeals to the poetry in my soul, I think it is misleading. In the last few years the Perl dev community has been making really significant progress in enabling rapid development methodologies, in particularly using tools like Class::DBI

    A book which claims to detail how to do web development with Perl and MySQL and doesn't address the following issues is painfully out of date:

    * Class::DBI [class-dbi.com]
    * SPOPS [sourceforge.net]
    * Kake's How to avoid writing code [perl.com]

    With the Perl Foundation funded work on Maypole [simon-cozens.org] being the most recent efforts in this direction.
  • wtf? (Score:2)

    by glwtta (532858) on Monday April 26 2004, @06:35PM (#8978055)
    (http://slashdot.org/)
    A story about Perl and MySQL? Why not also mention that it runs best on FreeBSD, especially if it is written in vi?
  • I recommend HTML::Embperl (embedded perl).

    Makes it trivial to create web-based apps. If you use Apache::Session, then state maintenence is a simple matter of populating an element in a hash. Makes web development really fast and modular, and mostly XSS-proof (it's sometimes a pain to make embedded perl actually create something like a link if you refer to it in a variable, unless you really think about it).

    http://perl.apache.org/embperl/

    Use it with mod_perl, some sort of database, and a bunch of your own modules (preloaded in your apache config, of course), and you'll have a high-speed, easily-maintained, dynamic site in no time.
  • I'm a little confused... (Score:3, Insightful)

    by shaitand (626655) * on Monday April 26 2004, @07:40PM (#8978526)
    (http://www.ganjablogger.com/ | Last Journal: Thursday January 05 2006, @05:36PM)
    It's just the alternatives I suppose that have me truely confused.

    A fully featured website (which needs it all), has several layers, at most:

    The client-side dynamic content, javascript, vbscript, etc

    The middle-ground dynamic content,
    SSI's, PHP, ASP

    And the backend,
    Perl, C/C++, Java, (insert any true, full blown, fully featured, programming language here, which none of the above are).

    There are places where these overlap, there are number of things you could do in Perl, PHP, ASP, or with SSI for instance, which it should be done with is a matter of efficientcy of course and preference when it's just as fast at 100,000 simultaneous connections either way (even if you only expect 5). But something like PHP is not a replacement for Perl anymore than Perl is for PHP.

    It's apples and oranges guys, if you want to compare something go with the SQL database flames, at least there you are comparing pretty much the same thing to pretty much the same thing. And there that same thing and generally used for the same purposes.
  • I run Uberhacker.com [uberhacker.com]. The site is a PHP and SQL security challenge [uberhacker.com] with forums [uberhacker.com] on the subject. The site also includes some tutorials [uberhacker.com] on programming securely in PHP and SQL.
  • Why mysql? OR perl for that matter? (Score:3, Informative)

    by kuzb (724081) on Monday April 26 2004, @10:41PM (#8979833)

    IMO Perl is rapidly losing steam due to the enormous popularity of PHP. PHP is easier to learn, faster to master and less confusing to begin with. Not to mention, PHP's online documentation is really hard to beat sporting many easy to follow examples, a very functional layout, and features (such as the http://php.net/ search) that i'm pretty sure i've only seen mysql.com adopt.

    Granted, PHP is not great for everything, but for small to medium websites (and arguably large websites as well, I know of some corporations that use PHP, see bravenet.com [bravenet.com], one of the largest providers of ready-to-run webmaster tools. They use PHP quite extensively.). For rapid application development, it's a dream.

    As we come closer to PHP5 (which is RC2 now) we're also seeing the integration of sqlite as an option which may appeal to people who just want to write small blogs and other applications which simply do not demand the need of mammoths like mysql or postgresql. This means less headache for budding programmers, and easier migration of applications since sqlite does not require an SQL server.

    • 1 reply beneath your current threshold.
  • Nice Book (Score:1)

    by dumbledoor (774815) on Tuesday April 27 2004, @12:26AM (#8980623)
    I have this one.
    You need to know perl basics to begin using this though. Just reading Learning Perl would do.
    Great book for beginners (that's me). Covers a broad range of web apps.
  • another review (Score:1)

    by kwoff (516741) on Thursday April 29 2004, @07:49AM (#9005985)
    I also posted a review on Perl Monks [thepen.com] when the book came out. It still isn't in his list of reviews, though. :/
  • Re:guffaw (Score:3, Insightful)

    by Neil Blender (555885) <neilblender@gmail.com> on Monday April 26 2004, @03:36PM (#8976135)
    "Website programming".

    Tee-hee. I still laugh when I see that phrase.


    Heh, not every website is a 50 line PHP hack made by a kid. You can do extremely powerful things with a website and those things can require complex programming skills. And that programming can be done in Perl.
    [ Parent ]
  • Re:Huh? (Score:2, Insightful)

    by stratjakt (596332) on Monday April 26 2004, @03:47PM (#8976275)
    (Last Journal: Sunday November 11, @09:31AM)
    It translates roughly to this (my dingbat is rusty, please forgive me);

    Blah blah blah buzzword buzzword buzzword spacefiller spacefiller blah blah this submission is now longer.
    [ Parent ]
  • by consumer (9588) on Monday April 26 2004, @03:48PM (#8976290)
    PHP is understood by more people, meaning there are more existing projects that you can implement or just borrow code from.

    I'd love to know where you got that statistic from. My guess is "nowhere" or "my friends like PHP." PHP is popular within a certain community of designers who became programmers, but I strongly suspect that Perl has a wider base of users if you look at programmers as a whole.

    As for your comment about borrowing code, there is really no language out there that has been as successful at sharing code in a resuable way as Perl with its CPAN system. Borrowing PHP code usually means copy, paste, modify. This problem is exacerbated by the fact that PHP seems to make all functions global within a single namespace, so you have no way of knowing if someone else is stepping on your function name.

    [ Parent ]
  • Re:USE ASP! (Score:3, Interesting)

    by I confirm I'm not a (720413) on Monday April 26 2004, @03:50PM (#8976310)
    (Last Journal: Friday January 30 2004, @03:41PM)

    ASP's not a scripting language, it's a technology. The language in this implementation is PerlScript, which is pretty much - wait for it - Perl. You don't specify how this implementation of ASP makes PHP "look like a kids' [sic] toy" but I've used two implementations of ASP - ChiliSoft (now SunONE) and Microsoft's - and PHP compares very favourably to both. I'd be surprised if apache-asp differed significantly.

    [ Parent ]
  • Re:Huh? (Score:2)

    by Decaff (42676) on Monday April 26 2004, @03:57PM (#8976394)
    there is no argument that... using MySQL and Perl will aid immensely in that development

    Translation: either ignorance or flamebait.

    You don't use phrases like 'no argument' without expecting an argument.
    [ Parent ]
    • 1 reply beneath your current threshold.
  • by Etyenne (4915) on Monday April 26 2004, @04:07PM (#8976513)
    HELLO ? PEAR ?
    [ Parent ]
  • by Monkey Angst (577685) on Monday April 26 2004, @04:19PM (#8976648)
    (http://www.spinzonecomics.com/)
    And, I hate to say it, but installing PHP is one of my least favorite things to do, along with stabbing my eyes out with a rusty knife.

    Installing PHP = not so easy.
    Learning PHP -- now that's where its strengths lie. I don't know much about the strengths and weaknesses of PHP vs. Perl as programming languages, but the learning curve for PHP is much lower.

    PHP is understood by more people than Perl?!? Since when did PHP take these large grounds in popularity to overtake the most popular scripting language in history.

    Well, Perl may be used by more people, but I wouldn't be surprised if more people understand PHP.

    [ Parent ]
    • 1 reply beneath your current threshold.
  • by shaitand (626655) * on Monday April 26 2004, @07:21PM (#8978398)
    (http://www.ganjablogger.com/ | Last Journal: Thursday January 05 2006, @05:36PM)
    That's good and well, there's only one problem with it.

    Perl isn't exactly in competition with php, they have different purposes and are used for different things. Might as well start comparing perl to SSI's. True they overlap, and there are many things you could do in either but generally, if it's the front, you want php, if it's the back, you want perl.

    Perhaps your perl backend might output a little html/php but it's certainly not going to be the other way around ;)

    Perl is great for cgi's, php is great for dymanic web content, cgi's were never good for that.

    PHP is actually an counter to something more like SSI's, or ASP
    [ Parent ]
  • Re:Huh? (Score:1)

    by slagish666 (607934) on Tuesday April 27 2004, @01:06PM (#8986646)
    "but there is no argument that if you are planning on putting together a website, using MySQL and Perl that MySQL & Perl for the Web will aid immensely in that development"

    Translation please?

    The book would be helpful in creating a website.

    [ Parent ]
  • 20 replies beneath your current threshold.