Author: Jono Bacon
Format: Paperback: 528 pages
Publisher: Prentice Hall PTR; Bk&CD-Rom edition (November 14, 2006)
ISBN: 0132239973
Review by James Pyles
December 10, 2006
I recently reviewed the book that launched Prentice Hall's Negus Live Linux Series for Linux Magazine. Live Linux CDs is an excellent introduction to the wide variety of ways Linux Live CDs can be used (they're not just for Windows users to 'test drive' Linux anymore). I was curious however to see what a series of books based on live CDs would look like. Enter 'Practical PHP and MySQL'.
Jono Bacon (co-author of The Official Ubuntu Book and Linux Desktop Hacks) has taken an interesting approach in writing this book. The premise is to use a Linux live CD to teach the readers how to build eight specific web applications. How he does this is unique.
The vast majority of this book must be used with the accompanying CD. The CD contains a modified live version of Ubuntu 6.06 which includes XAMPP. XAMPP provides a 'complete PHP, Apache, MySQL Web development environment'. The CD also includes all of the code and other data required to build the eight projects outlined in the book (Blogs, Discussion Forums, Shopping Carts, and so on). The interesting thing is that you don't even take the CD out of the cardboard wallet until Chapter 3.
Chapter 1 is literally a beginner's introduction to PHP, MySQL, and dynamic web design. The chapter is brief at only 9 pages so don't expect to learn a great deal about these concepts. The chapter seems to exist just to give the reader a bit of a taste of the subject matter before moving on.
Chapter 2 lets you get your hands on PHP and MySQL by way of XAMPP. You still leave the CD where it is and install XAMPP on either your Windows or Linux computer following Bacon's instructions. The reader then goes through a series of elementary exercises in PHP to familiarize them with basic syntax, variables, functions, loops and the like. Next, you fire up MyPHPAdmin and create a simple MySQL database. Finally, you connect to MySQL in PHP and are (more or less) ready to go.
Chapter 3 tells you how to get access to the tools on the CD. The rest of the book addresses each of the individual projects and requires that you insert the live CD and reboot your machine (assuming that the BIOS is set to look to boot from the optical drive first). The CD contains all of the tools and data necessary to assist the novice web developer in getting a web application up and running fast.
This is the book's strength. If you want your own web calendar or FAQ page set up quickly and you don't have time to learn how PHP and MySQL work and 'roll your own', this book is a great boon. The down side is that in the process, you don't actually get to learn all that much about PHP and MySQL. You learn just enough to become acquainted and then jump into the meat of the matter. Depending on your goals for this book, that's either a good or bad thing.
I'm very picky about how tasks and lists are written. I spend a good deal of time in my 'day job' trying to write, clear and concise instructions that my audience (a group of software developers) can understand and make use of in their day-to-day activities. While I don't doubt Bacon has a good background in the subject matter, I sometimes found it hard to follow his directions and there were times that a 'right at the starting gate' newbie would have gotten lost.
There seemed to be steps missing in some instructions or Bacon would tell the reader to perform an action ('Now run the script') without previously explaining how this was done. I can't say that he expected his audience to already know such basic information because he seemed to be writing for the extremely new web designer. In fact, Appendix A is a primer for webpage design and introduces the reader to CSS. Not something you should have to mention much about to someone at least familiar with web development.
I like the idea of using a live CD to provide an environment suitable to teach certain methods such as web design but the book seemed incomplete. If the audience is someone who needs to be told what PHP, MySQL, and CSS are, they will need more complete information before they will be able to make this work. They will certainly need more than two chapters of background before getting off the ground and making their own news or auction sites (sure...they might pull it off using the CD, but if anything went wrong, what would they do about it?).
Bacon gets an 'A for effort' and I really do like the premise of this series, but the book could have been better. It will give the newbie reader an introduction into PHP and MySQL basics but not enough to be able to use these tools with any real competance by the end of the book. If you want to get a web app up and running in a hurry, this book will show you how. If you want to learn 'practical' PHP and MySQL, you'll need to get a few more sources of information.