Slashdot Mirror


MySQL and Perl for the Web

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.

13 of 244 comments (clear)

  1. Perl is very flexible by Anonymous Coward · · Score: 1, Funny

    It could be programmed to tell you when you forget a closing tag.

  2. Re:Good! by Daniel+Dvorkin · · Score: 2, Funny

    I find there are a lot of books and resources which each HTML, or teach Slashdot posting, but don't teach you how to close your HTML tags, or use the Preview button ...

    Oh, hell, you know the rest. ;)

    --
    The correlation between ignorance of statistics and using "correlation is not causation" as an argument is close to 1.
  3. I used to enjoy coding in Perl… by Anonymous Coward · · Score: 5, Funny

    ...until I discovered poking myself with a sharp stick.

    1. Re:I used to enjoy coding in Perl… by Anonymous Coward · · Score: 3, Funny
      You know you've been coding in Perl too long when...
      • It starts to look like line noise.
      • You start copying line noise into your perl scripts.
      • The scripts still work.
  4. Comment removed by account_deleted · · Score: 3, Funny

    Comment removed based on user account deletion

  5. Re:Pathologically Eclectic Rubbish Lister by Daniel+Dvorkin · · Score: 5, Funny

    I can think of nothing more likely to start a flamewar on /. than singing the praises of Perl and MySQL in the same story.

    <1/2 g>

    --
    The correlation between ignorance of statistics and using "correlation is not causation" as an argument is close to 1.
  6. Choice Quote by Eberlin · · Score: 1, Funny

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

  7. Re:Web, schmeb by Etyenne · · Score: 5, Funny

    It well-known indeed that the plural of anecdote is data.

    --
    :wq
  8. Re:Pathologically Eclectic Rubbish Lister by Etyenne · · Score: 2, Funny

    I was expecting the Python zealots to overwhelm this discussion with their usual snobbism of Perl, but for some reasons the PHP fanboys are the one making the most noise. It will be interesting to see where this will lead.

    --
    :wq
  9. Re:Web, schmeb by Anonymous Coward · · Score: 1, Funny

    Perhaps that is because people are doing complex things with perl while the PHP users are doing this:

    <?PHP echo 'Welcome to my leet haxoring page, you have been ownzored' ?>
    <?PHP header("Location: http://www.goatse.cx/") ?>

  10. Re:Three cheers for LAMP by Monkey+Angst · · Score: 5, Funny
    Hitler also changed the world forever. What's your point?

    How the hell do you Godwin a thread about a Perl book?
    --
    stripShow - Where WordPress meets webcomics
  11. Rooting by ryantate · · Score: 4, Funny

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

  12. Should have been... by Anonymous Coward · · Score: 1, Funny

    *dons flaming retard suit*