Object-Oriented Programming with PHP5
From the Back Cover
In this book, you'll learn:
- to understand the OOP features of PHP clearly
- to write manageable code
- some of the most widely used Design Patterns in PHP
- Model-View-Controller (MVC) pattern
- to create objects and defining their properties and methods
- to use the new MySQL API also known as MySQLi
- about the huge repository named the Standard PHP Library
- to design your own unit tests successfully by using PHPUnit
This book will help you to understand the core object-oriented programming concepts with PHP. PHP is one of the most popular languages for web application development, and PHP5 supports OOP very well. This book will help you to master core OOP features in PHP as well as advanced topics like Design Patterns including Model-View-Controller (MVC), and Unit Testing. It includes suggestions to help you to write good code. Moreover this book provides comprehensive documentation and working examples on the Standard PHP Library (SPL), which are hard to find elsewhere. It will really help you to leverage PHP’s OOP features to write manageable applications with ease.
The book covers all the general concepts of OOP then shows you how to make use of OOP in PHP5, with the aid of an ample number of examples.
Who is this book for?This book is intended for beginners as well as intermediate users of PHP5.
Programming with PHP5 book starts from the A-B of the object-oriented
programming and its relation to PHP. Then it goes on covering many
topics of OOP like elements of OOP PHP, design patterns, reflection and
unit testing, PHP libraries and databases. It is written in a light way
to read and uses a friendly manner towards the reader.
Still the book has some shortcomings. The author does not go into detail when revealing a topic. There are also some inaccuracies in the example code used. The database section covers some key examples, such as PDO, ADODB and MDB2, and touches on the ActiveRecord pattern, but uses four pages to list the RDBMSs that ADODB supports and then only spends a page and a half on ActiveRecord, failing to explain either of its concepts or advantages in any detail.
On the bright side, the chapter on unit testing uses some well chosen examples to provide a demonstration of how code can be tested and how that allows for refactoring without fear of regressions. The reasons for unit testing are clear as is basic usage of PHPUnit.
All things considered, the book includes a wide
range of topics that could give one direction and ideas. We consider it
suitable for programmers who have a basic understanding of PHP, but are
new to OOP.