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


Algorithms: Absolute Beginner's Guide

Author: Kirupa Chinnathambi
Publisher: Addison-Wesley
Date: November 2023
Pages: 416
ISBN: 978-0138222291
Print: 0138222290
Kindle: B0CCTZ37DQ
Audience: General
Rating: 4.5
Reviewer: Kay Ewbank

Subtitled 'a practical introduction to data structures and algorithms in JavaScript', this book is split into tw [ ... ]



Quick Start Guide to Large Language Models

Author:  Sinan Ozdemir
Publisher:  Addison-Wesley
Pages: 288
ISBN: 978-0138199197
Print: 0138199191
Kindle: B0CCTZMFWF
Audience: LLM Beginners
Rating: 5
Reviewer: Mike James
We all want to know about LLMs, but how deep should you go?


More Reviews

 

 

 

Last Updated ( Tuesday, 03 September 2013 )