PHP Advanced and Object-Oriented Programming (3e)

Author: Larry Ullman
Publisher: Peachpit Press
Pages: 504
ISBN: 978-0321832184
Audience: Intermediate PHP programmers
Rating: 4
Reviewer: Ian Elliot

PHP isn't the first language you think about in connection with object-oriented ideas but it has supported objects for some time. 

This particular book is a mixture of practical concerns and using the object-oriented approach to programming. It puts together what you might call advanced aspects of the PHP language with some details of implementing a web site in an advanced sort of way and finally tackles the whole object-oriented approach expressed in PHP. 

The first chapter starts out with a collection of advanced PHP techniques - multidimensional arrays, advanced use of functions, Heredoc and printf. Whether you consider these advanced depends on you knowledge of PHP. They are well explained and there are plenty of examples.

Chapters 2 and 3 are all about building a web application using a modular design. This isn't all pure PHP it also involves the web server and the database. It is good practical stuff but perhaps out of place if you are looking for a book on advanced PHP and object oriented ideas. 

 

Banner

 

As far as the object oriented material goes this starts at chapter 4 with basic OOP theory - class, constructors, using $this and so on ending with a quick look at UML. The next two chapters 5 and 6 carry on with a fairly standard account of OOP in PHP - inheritance, overriding, static, abstract classes, interfaces, traits and type hinting. These three chapters form a fairly self contained tutorial on how to do objects in PHP. 

Chapter 7 introduces the standard design patterns - singleton, factory, composite and strategy. How useful the standard patterns are in PHP and web site design isn't obvious but every programmer should know about them.

 

 

From here the book is a more or less random collection of topics with an object oriented orientation. Chapter 8 is about using existing classes - mostly the exception class and PDO. Chapter 9 presents an example of building a CMS using object oriented techniques. Chapter 10 is on networking including using sockets, IP geolocaton and cURL.  Chapter 11 is on using the server - file compression, cron and mcrypt. Chapter 12 is a tutorial on using the PHP from the command line and Chapter 13 is on XML processing using PHP.

The final chapter is about debugging. This covers the use of xdebug, but not in connection with any IDE such as Eclipse or Netbeans, say. If you are serious about "advanced PHP" then using an IDE and an integrated debugger is the way to go. Admittedly this would means that the book would have to either choose an IDE or clutter things up with showing how it works with different choices but it would be worth it. Adopting an IDE and configuring it to work with a remote testing installation, using sources control and a debugger is the single biggest improvement in productivity you can achieve.

This is a nice book of PHP examples and discussion loosely organized around a core that deals with object-oriented PHP. The book isn't complete and it won't solve all of your problems but it is a good read and full of lots of ideas that you might have not encountered before.

If you already know object-oriented programming the book will only be marginally less useful as you still need to learn the PHP way of doing things. It certainly isn't suitable for the beginner and you need to be fairly sure of your PHP as a procedural language to get the best from the book. 

If you are ready to learn the object-oriented aspects of PHP then this is a good book to get started with, but it doesn't take you all the way. However, it is a good transition between practical coding and thinking about the theory of coding. 

 

Banner


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: [ ... ]



Managing Humans 2nd Ed

Author: Michael Lopp
Publisher: Apress
Pages: 281
ISBN: 978-1430243144
Audience: Aspiring managers
Rating: 3.5
Reviewed by: Sue Gee

Billed as "Biting and Humorous Tales of a Software Engineering Manager". Does it live up to expectations?


More Reviews

 

 

 

Last Updated ( Tuesday, 03 September 2013 )
 
 

   
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.