Ec (2); suddenly received Packtpublishing mail, content is about & rdquo; Object-OrientatedProgrammingwithPHP5 & ldquo; book reviews. I have never done a book review before. I am sorry for the unreasonable structure of the comment style. A brief overview of the content. The chapters in this book are: Object-oriented (OOP) and programming (PS: should it be process-oriented) (what is OOP ?, Why OOP ?, Two scripts ec (2);
Suddenly I received an email from Packt publishing about "Object-Orientated Programming with PHP5.
I have never done a book review before. I am sorry for the unreasonable structure of the comment style.
Content
In brief, the chapters in this book are:
Object-oriented (OOP) and programming (PS: should it be process-oriented) (what is OOP ?, Why OOP ?, Differences between the two)
Start OOP (Object (encapsulation), inheritance, polymorphism, etc)
Advanced OOP (using PHP functions, exceptions, iterations, etc)
Design Patterns (Strategy, Singleton, Adapter, Observer, Decorator etc)
Reflection and unit testing (phpUnit)
Standard PHP Library (famous SPL)
OOP database (MySQLi, PDO, data persistence layer runtime action layers-PEAR: MDB2, ADODB and Active Record)
OOP and XML (SimpleXML, xpath, Dom)
MVC/Frameworks
For beginners/middle-level developers
Supported
Introduction to SPL (Standard PHP Library)
Introduction to PDO, PEAR: MDB2, AdoDB and MySQLi
The main object-oriented design modes are introduced.
Introduced MVC and frameworks (framework)
Objection
Only Page 250
In-depth
Many syntax errors are expected to be corrected during Publishing.
There are many spelling mistakes (e.g. s/Mehod ()/Method ())
Some examples are poor (see below)
I will talk about the PHPUnit API on a ten-page basis. At the end, I will talk about developing a project using the framework. I think we should use some of the sections to share a major framework, such as zend or codeignitor. Even so, I think this book is still good, especially to learn how to solve problems, which will be of great help to junior and intermediate developers.
Code instance
To make this book more interesting, Chapter 4 describes many major design patterns. In one decorator mode, some code is as follows:
$ Post = new Post ();
$ Comment = new Comment ();
$ Post-> filter ();
$ Comment-> filter ();
If ($ BBCodeEnabled = false & $ EmoticonEnabled = false ){
$ PostContent = $ post-> getContent ();
$ CommentContent = $ comment-> getContent ();
}
Elseif ($ BBCodeEnabled = true & $ EmoticonEnabled = false ){
$ Bb = new BBCodeParser ($ post );
$ PostContent = $ bb-> getContent ();
$ Bb = new BBCodeParser ($ comment );
$ CommentContent = $ bb-> getContent ();
}
Elseif ($ BBCodeEnabled = false & $ EmoticonEnabled = true ){
$ Em = new EmoticonParser ($ post );
// Etc.
}