Slashdot Mirror


PHP and MySQL Web Development

PHPee writes ""Learn the concepts and build the applications..." - PHP and MySQL Web Development is a well-written web developer's guide to using these open source products to create dynamic websites quickly and easily. This book covers everything you need to design, build and debug your own website from the ground up. Special attention is paid real-world issues, like database normalization and site security. Overall, a great reference for beginner and more advanced programmers alike." Read on for the rest of his review. PHP and MySQL Web Development author Luke Welling & Laura Thomson pages 896 publisher Sams rating 9/10 reviewer PHPee ISBN 0672317842 summary From hello world to e-commerce in under 900 pages...

The authors of the book (Luke Welling and Laura Thomson) do a great job of introducing new programmers to the world of PHP and MySQL. The book is divided into five sections which take the beginner programmer through many lessons in solid, secure web programming.

Part One Starting with the "PHP Crash Course," the reader quickly learns the syntax and language constructs of PHP. The following five chapters focus on topics such as arrays, string manipulation, writing functions and object-oriented PHP. This provides a solid foundation in PHP before moving on to the intricacies of MySQL. This section is very hands-on, using realistic examples, which could be expanded upon as skills progress.

Part Two The following section focuses on MySQL, starting by explaining the advantages of a relational database vs. a flat file storage system. The book assumes no knowledge of databases, explaining simple terms such as tables, columns, rows, etc. It then progresses on to the fun stuff, like designing databases for the web and normalization.

Particular attention is placed on MySQL's privilege system, including proper use of the GRANT/REVOKE commands to give/take away rights for database users. This section is quite detailed and offers a lot more information than I expected. The various column types and associated keywords are also examined in great detail, providing the reader with a solid understanding of MySQL's main features.

Part Three Part Three of the book examines the issues associated with running an e-commerce site. This section is nicely done, looking at common mistakes and how to avoid them. These include things like server security, data backups, keeping detailed logs and dealing with other threats, such as crackers, denial of service attacks and destruction of data. Authentication methods and encryption schemes are also thoroughly covered.

Part Four This section of the book expands on part one, delving into some more advanced PHP techniques, such as interacting with the file system, using network and protocol functions and generating images on the fly with the gd library.

This section also looks at PHP's powerful session functions, including using sessions with authentication and the use of cookies.

Part Five This is by far the most exciting section of the book. Here the reader is presented with seven real-world examples that utilize most of the issues presented throughout the book. These practical projects are presented in an easy to follow manner. The basic problem is presented, and then a solution is proposed. The authors take you from start to finish, outlining the database design, necessary files and functions and show you how to tie it all together. They are also very good at pointing out possible enhancements or alterations, hopefully inspiring the reader to develop their skills and create something beyond the scope of the book.

The seven projects are as follows:
  • User authentication and personalization
  • Shopping cart
  • Content management system
  • Web-based email service
  • Mailing list manager
  • Web forums
  • Generating personalized documents in PDF format


Each of the projects has a real-life application, and can easily be modified to fit the needs of almost any website. The shopping cart application is quite complete, and could serve as a basic cart as-is. The web-based email service incorporates the IMAP and POP3 protocols in an easy to understand manner. And the web forums project discusses the complexity involved in creating a threaded discussion board. It even refers to slashdot as a "fantastic example of a popular website that uses discussion boards" :)

Other info: There are a few minor typos and errors in the book, but nothing to get angry at the authors about. Most of them are quite negligible, but may still create some frustration for beginners. (For example, they make reference to a function isempty(), which does not exist in PHP. The real function is simply named empty()...) Small errors like this may create some confusion, but the errata listed on the author's website are quite helpful, yet not all-inclusive.

The appendices do a good job of showing you how to install apache, PHP and MySQL to get up and running under both Linux and Windows. The book also comes with a CD that contains a PDF version of the entire text, all code examples, and copies of PHP and MySQL so you can set up your own development environment at home.

Overall The book is targeted toward intermediate to advanced programmers, but I'd suspect it would be more useful to the beginner to intermediate group. However, the book is organized in a way that accommodates beginners and more advanced users. If you have previous programming experience, you can probably skip some of the early chapters and jump straight into the larger projects. It's a handy reference book, nonetheless. This book covers almost everything you need to know to learn how to use PHP and MySQL to create dynamic, database-driven websites in no time at all. It does an excellent job presenting some real life projects, and the emphasis on security and clean code is consistent throughout the entire book.

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

4 of 223 comments (clear)

  1. Remember a couple days ago. by aerojad · · Score: 0, Offtopic

    Just as long as people are taught to apply a 6 month old patch so their SQL isn't being pinged into oblivion :)

    --

    SecondPageMedia - Wha
  2. Re:slashdotted slashdot? by dcuny · · Score: 1, Offtopic
    If anything, it's more likely caused by the SQL Slammer worm.

    I was initially going to link to this or this article, but the first included this memorable quote:

    We like to think of most corporations as hard candies with a soft chewy center," Rouland said.

    Mmmmmm... Soft, chewy center...

  3. Perl's modules are easier to install by zabouti · · Score: 0, Offtopic
    I actually like php much more than perl for web programming, but when you're working on a server where you don't have control over how php is compiled, you can't add functionality. With perl, you can install modules in user space and keep working.

    I found this problem when I wanted to use the cURL library with php on iServer.

    --
    Besta é tu si você não viver nesse mundo!
  4. Moderators: cut-and-paste job ! by androse · · Score: 0, Offtopic
    This is a cut and paste job. The properly formatted original may be this one, but I'm pretty shure I have read the "It rivals SmallTalk" idiotic comment earlier.

    Cheers