Book review object-orientated Programming with PHP5

Source: Internet
Author: User
Tags spl pear

Suddenly received Packt publishing mail, the content is about "object-orientated programming with PHP5" book review.
I have never done reviews before, and I apologize to the readers for the unreasonable structure of the content of the comments.

Content
A brief overview of the book's Chapters is:
Object-oriented (OOP) and programming (PS: should be process-oriented bar) (what is OOP?) , why OOP? , the difference between the two, etc.)
Start OOP (Objects (encapsulation), inheritance, polymorphism, etc.)
Advanced OOP (using PHP functions, exceptions, iterations, etc.)
Design Patterns Patterns (strategy, Singleton, Adapter, Observer, decorator etc) (not translated here)
Reflection and Unit Test (PHPUNIT)
Standard PHP Library (known as SPL)
OOP database (mysqli, PDO, data persistence layer abstraction LAYERS-PEAR::MDB2, ADODB and Active record)
OOP and XML (SimpleXML, XPath, Dom)
Mvc/frameworks
For primary/middle level developers


Support
The appropriate introduction of SPL (Standard PHP Library)
Introduced PDO, PEAR::MDB2, AdoDB and Mysqli
The main object-oriented design pattern is introduced.
Describes MVC and frameworks (framework)

against
only 250 pages
not deep enough
many grammatical errors, hoping to correct them when publishing.
There are a lot of spelling mistakes (e.g. S/mehod ()/method ())
Some examples are bad (see below)
10 pages to talk about the PHPUnit API, and in the end, using the framework to develop a project, I feel that a part of the space should be used to make a major framework, such as Zend or Codeignitor. Having said that, I think the book is good, especially to learn how to solve the problem, which will be very helpful to the middle-level developers.


code instance
to make this book more interesting, the fourth chapter introduces a number of major design patterns. One of the decorator patterns is as follows:
 
$post = new post (),
$comment = new comment ();
$post->filter ();
$com Ment->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.