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


The Rust Programming Language, 2nd Ed

Author: Steve Klabnik and Carol Nichols
Publisher: No Starch Press
Date: June 2023
Pages: 560
ISBN: 978-1718503106
Print: 1718503105
Kindle: B0B7QTX8LL
Audience: Systems programmers
Rating: 4.8
Reviewer: Mike James

There's a new edition of what has become the standard text on Rust. Has it matured along with [ ... ]



Professional Scrum Development with Azure DevOps

Author: Richard Hundhausen
Publisher: Microsoft Press
Pages: 432
ISBN: 978-0136789239
Print: 0136789234
Kindle: B08F5HCNJ7
Audience: Developers interested in Scrum
Rating: 5
Reviewer: Kay Ewbank

This is a book designed for teams using Scrum and Azure DevOps together for developing complex product [ ... ]


More Reviews

 

 

 

Last Updated ( Tuesday, 03 September 2013 )