Book reviews Object-OrientatedProgrammingwithPHP5-PHP source code

Source: Internet
Author: User
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.
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.