Skip to main content
  • Book
  • © 2016

PHP Objects, Patterns, and Practice

Apress

Authors:

  • Helps readers develop elegant and rock-solid systems through mastery of three key elements: object fundamentals, design principles, and development best practice

  • PHP Objects, Patterns, and Practice has been fully updated for PHP 7

  • It is a practical book full of example code.

Buy it now

Buying options

eBook USD 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Other ways to access

This is a preview of subscription content, log in via an institution to check for access.

Table of contents (24 chapters)

  1. Front Matter

    Pages i-xxvii
  2. Objects

    1. Front Matter

      Pages 1-1
    2. PHP: Design and Management

      • Matt Zandstra
      Pages 3-8
    3. PHP and Objects

      • Matt Zandstra
      Pages 9-13
    4. Object Basics

      • Matt Zandstra
      Pages 15-46
    5. Advanced Features

      • Matt Zandstra
      Pages 47-97
    6. Object Tools

      • Matt Zandstra
      Pages 99-131
    7. Objects and Design

      • Matt Zandstra
      Pages 133-153
  3. Patterns

    1. Front Matter

      Pages 155-155
    2. What Are Design Patterns? Why Use Them?

      • Matt Zandstra
      Pages 157-163
    3. Some Pattern Principles

      • Matt Zandstra
      Pages 165-178
    4. Generating Objects

      • Matt Zandstra
      Pages 179-209
    5. Patterns for Flexible Object Programming

      • Matt Zandstra
      Pages 211-233
    6. Performing and Representing Tasks

      • Matt Zandstra
      Pages 235-276
    7. Enterprise Patterns

      • Matt Zandstra
      Pages 277-326
    8. Database Patterns

      • Matt Zandstra
      Pages 327-373
  4. Practice

    1. Front Matter

      Pages 375-375
    2. Good (and Bad) Practice

      • Matt Zandstra
      Pages 377-383
    3. PHP Standards

      • Matt Zandstra
      Pages 385-398

About this book

Aided by three key elements: object fundamentals, design principles, and best practices, you'll learn how to develop elegant and rock solid systems using PHP.



The 5th edition of this popular book has been fully updated for PHP 7, including replacing the PEAR package manager with Composer, and new material on Vagrant and PHP standards. It provides a solid grounding in PHP's support for objects, it builds on this foundation to instill core principles of software design and then covers the tools and practices needed to develop, test and deploy robust code.



PHP Objects, Patterns, and Practice begins by covering PHP's object-oriented features. It introduces key topics including class declaration, inheritance, reflection and much more.

The next section is devoted to design patterns. It explains the principles that make patterns powerful. The book covers many of the classic design patterns and includes chapters on enterprise and database patterns.


The last segment of the book covers the tools and practices that can help turn great code into a successful project. The section shows how to manage multiple developers and releases with git, how to manage builds and dependencies with Composer. It also explores strategies for automated testing and continuous integration.
 


What You'll Learn
  • Work with object fundamentals: writing classes and methods, instantiating objects, creating powerful class hierarchies using inheritance.
  • Master advanced object-oriented features, including static methods and properties, managing error conditions with exceptions, and creating abstract classes and interfaces.
  • Learn about the new object-oriented features introduced by PHP 7 and why they matter for your code.
  • Understand and use design principles to deploy objects and classes effectively in your projects.
  • Discover a set of powerful patterns that you can deploy in your own projects.
  • Guarantee a successful project including unit testing; version control, build, installation and package management; and continuous integration.




Who This Book is For



This book is suitable for anyone with at least a basic knowledge of PHP who wants to use its object-oriented features in their projects. 


Those who already know their interfaces from their abstracts may well still find it hard to use these features in their systems. They will benefit from the book's emphasis on design. They will learn how to choose and combine the participants of a system; how to read design patterns and how to use them in their code. 


Finally this book is for PHP coders who want to learn about the practices and tools (version control, testing, continuous integration, etc) that can make projects safe, elegant and stable.



Authors and Affiliations

  • Liverpool, United Kingdom

    MATT ZANDSTRA

About the author

Matt Zandstra has worked as a web programmer, consultant, and writer for over two decades. He is the author of SAMS Teach Yourself PHP in 24 Hours (three editions) and a contributor to DHTML Unleashed. He has written articles for Linux Magazine, Zend, IBM DeveloperWorks, and php|architect Magazine, among others. Matt was a senior developer/tech lead at Yahoo and API tech lead at LoveCrafts. Matt works as a consultant advising companies on their architectures and system management, and also develops systems primarily with PHP, and Java. Matt also writes fiction.


Bibliographic Information

Buy it now

Buying options

eBook USD 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Other ways to access