‘Setting up a Development Server’ recommends and illustrates the use of AMPSS to set a computer as a development machine – however, to quote the author on his GitHub page, “As of 2022, I no-longer recommend the AMPPS web server stack” (because of stability problems) and recommends the use of MAMP (http://mamp.info) instead. Personally, I put my trust in the meta-packages of Ubuntu Linux as it is my preferred way of keeping software properly patched. Finally, it concludes on the role of Code Editors and IDEs.
PHP is covered in the next 5 chapters. ‘Introduction to PHP’ is accessible even to people who haven’t coded before, using a matchbox metaphor to illustrate variables and arrays. ‘Expressions and Control Flow in PHP’ gently introduces its topic, including operator precedence and associativity. Control flow is illustrated using roads as a metaphor. ‘PHP Functions and Objects’ gives a good plain English introduction to functions but for classes it only deals with syntax so making life difficult for a novice coder. It covers the syntax well enough but it could have considered function design, class design, SOLID principles. It wouldn’t have had to cover these topics in detail – just mentioning that they exist and references to suitable websites or books would have been helpful. ‘PHP Arrays’ is straightforward, covering arrays and some of the support that is provided for them – including the occasional reference to online documentation. ‘Practical PHP’ covers some highlights of PHP –
sprintf, Date and Time functions, and basic file handling.
‘Introduction to MySQL’ does what it says. While it is a good introduction, it would have benefited from a further reading section. ‘Mastering MySQL’ is an ambitious title. It introduces the reader to database design – covering using normalisation and where not to use it, different types of table relationships, transactions, understanding queries with EXPLAIN as well as backing up and restoring databases. ‘What’s New in PHP 8 and MySQL’ brings this book up to date with technologies which were released while the book was being prepared. ‘Accessing MySQL Using PHP’ introduces the reader to using PDO (PHP Data Objects). PDO can not only access MySQL databases but others as well. It is a bit of a challenging chapter because the main example has to use HTML forms which get covered in the next chapter.
‘HTML Form Handling’ is quite intense, covering the display and server side processing of HTML forms along with the careful sanitsation of user input and HTML5 enhancements.
‘Using Asynchronous Communication’ is an introduction to the topic, again, further references would have been helpful.
‘Introduction to jQuery’, ‘Introduction to jQuery Mobile’, ‘Introduction to React’ delve even deeper into front-end development. Note – this is a large topic and I have only scratched the surface of it.
‘Introduction to HTML5’ brings the reader up to speed on the new facilities supported. It would have been helpful if an earlier chapter had specified how much HTML knowledge is required before reading this book. HTML5 is discussed widely – with chapters dedicated to HTML5 canvases, audio and video content, rounded off with ‘Other HTML5 features’.
The final chapter, ‘Bringing it all together’, provides a simple social networking project as a final example. I got Andy Burgess, a friend who is experienced in this sort of thing, to look at this project. He found in functions.php the use of a deprecated (and in PHP 8.0 removed) function
get_magic_quotes_gpc() and had to remove that call to get the site to work. This has been noted under errata (Unconfirmed errata) on the book’s website.
The author clearly knows a lot about this topic. This book introduces the reader to this topic, building on a kernel of assumed knowledge and experience. Any beginner reading this book will need additional help. It serves to get the studious reader to a certain level of competence. A Bibliography is sorely lacking. At the end of chapters, a short list of questions is presented to the reader with answers at the back of the book – I found this useful for tracking my progress through the book.
Ultimately, this book broadened my understanding of the Apache/MySQL/PHP software stack. It has whetted my appetite for a more comprehensive work on PHP.