PHP and MySQL for Dynamic Web Sites

Author: Larry Ulman
Publisher:Peachpit Press; 4th Ed, 2011
Pages: 696
ISBN: 978-0321784070
Aimed at: Web developers
Rating: 4
Pros: Some useful practical solutions with plenty of examples
Cons: Introductory chapters jump between levels; object-oriented techniques introduced as an afterthought
Reviewed by: Kay Ewbank

While the previous edition of this book was aimed at PHP 6, this 4th Edition seems to jump back by covering PHP 5.3.

Author: Larry Ulman
Publisher:Peachpit Press; 4th Ed, 2011
Pages: 696
ISBN: 978-0321784070
Aimed at: Web developers
Rating: 4
Pros: Some useful practical solutions with plenty of examples
Cons: Introductory chapters jump between levels; object-oriented techniques introduced as an afterthought
Reviewed by: Kay Ewbank

This must be one of the few books that jumps back a version in the language it covers, as the previous edition was aimed at PHP 6, whereas this version has gone back to PHP 5.3, the current stable version. The problem the author had was that he wrote the previous edition on the basis that PHP 6 was just around the corner, and it has never appeared.

The book kicks off with three chapters on PHP, and as so often with programming books, it’s tricky knowing what knowledge should be assumed in the reader. Ulman takes the view that you need to start from the very basics of what a variable is, what strings are, and other fundamentals. There’s a chapter on programming with PHP that introduces conditionals and operators, arrays and loops, and a final chapter on PHP that actually gets on to the elements of creating dynamic web sites that are the tricky bits such as creating sticky forms.

Banner

The next section of the book covers MySQL, and this is written in rather more detail than the PHP part. As with the PHP part of the book, the material starts off very basic at the level of ‘there are three basic column types in MySQL, text, numbers and dates’. There’s a chapter that dashes through writing basic SQL, and another that gives a fairly poor introduction to database normalization. A final chapter on MySQL looks at different types of table joins, optimizing queries and performing transactions.

With both the PHP and MySQL sections, I think the best summary is that if you didn’t understand them before reading this book, I’m not sure you’d understand them afterwards.

The final section of the book explains looks at how PHP and MySQL work when used together, starting with how you actually get MySQL results into PHP, and going through ideas such as cookies and sessions, security methods, and jQuery, and ending with a look at three examples - a message board, user registration, and e-commerce in the form of a shopping cart. This is undoubtedly the most useful part of the book, and the author seems to be clearer in his explanations when covering practical ideas.

The one new chapter in this edition is a short object-oriented primer. This is just 14 pages long, and mainly consists of examples from elsewhere in the book written in an object-oriented style. The author says he covers object-oriented programming in another book, but it does seem a missed opportunity.

One unusual thing about the book is the layout; it’s laid out in two columns, and while longer code examples are laid out using the entire page width, there’s a lot of code embedded in the text that suffers from having to fit into the two-column layout. Picking an example more or less at random, a single line of code changing a radio button is split across seventeen lines of text. Another point where the layout seemed less than ideal was that helpful tips run throughout the book, and some do contain useful information. However, they seemed to be lumped together rather randomly, so there would be three or four pages with no tips, then an entire column of six or eight tips that seemed to be presented together just to save space.

Overall, I think this would be a useful book to have on your shelf as part of a library. I certainly wouldn’t want to learn PHP or MySQL from it, but the chapters on using them together when designing websites are practical and useful. There are lots of examples that you can use to work out where you’re going wrong, and the author is well known for being helpful with reader queries on the forums of his website.

Banner


3D Printing: Build Your Own 3D Printer and Print Your Own 3D Objects

Author:James Floyd Kelly
Publisher: Que
Pages: 192
ISBN: 978-0789752352
Audience: Newcomers to 3D printing
Rating: 3
Reviewer: Harry Fairhead

3D printing is still all the rage and there are lots of people who could be enticed to get involved. Is this a good place to start?



SQL and Relational Theory

Author: C.J. Date
Publisher: O'Reilly, 2009
Pages: 428
ISBN: 978-0596523060
Audience: SQL Developers
Rating: 3
Reviewer: Joe Celko

Subtitled “How to Write Accurate SQL Code”, this book is part of a “Theory in Practice” series.

Here one database legend writes about another one. This is more than [ ... ]


More Reviews

 
 

   
RSS feed of book reviews only
I Programmer Book Reviews
RSS feed of all content
I Programmer Book Reviews
Copyright © 2014 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.