PHP Objects Patterns and Practice, Fourth Edition is revised and updated throughout. The book begins by covering PHP's object-oriented features. It introduces key topics including class declaration, inheritance, reflection and much more. These provide the fundamentals of the PHP's support for objects. It also introduces some principles of design. This edition introduces new object relevant features such as traits, reflection extension additions, callable type hinting, improvements to exception handling, and many smaller language enhancements.
The next section is devoted to design patterns. These describe common problems and their solutions. The section describes the design principles that make patterns powerful. It 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 build and install using Phing and PEAR. It also explores strategies for automated testing and build.
In addition to discussing the latest developments in build, test, and continuous integration, this section keeps pace with best practice in version control by focusing on Git, increasingly the developer's system of choice.
Taken together these three elements: object fundamentals, design principles, and best practice will help the reader develop elegant and rock solid systems.
PHP Objects and Patterns:
Describes and demonstrates PHP's built-in object-oriented features
Breaks down the principles of object-oriented design, explaining key design patterns using practical examples.
Discusses the tools and practices necessary for developing, testing and deploying exemplary applications.
What you'll learn
Learn to 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.
Understand and use design principles to deploy objects and classes effectively in your projects.
Learn about design patterns, their purpose, structure and the underlying principles that govern them.
Discover a set of powerful patterns that you can deploy in your own projects
Learn about the tools and practices that can 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 projects. 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.
Table of contents
- Title Page
- Contents at a Glance
- About the Author
- About the Technical Reviewer
- CHAPTER 1: PHP: Design and Management
- CHAPTER 2: Objects
- CHAPTER 3: Object Basics
CHAPTER 4: Advanced Features
- Static Methods and Properties
- Constant Properties
- Abstract Classes
- Late Static Bindings: The static Keyword
- Handling Errors
- Final Classes and Methods
- Working with Interceptors
- Defining Destructor Methods
- Copying Objects with __clone( )
- Defining String Values for Your Objects
- Callbacks, Anonymous Functions and Closures
- CHAPTER 5: Object Tools
- CHAPTER 6: Objects and Design
- CHAPTER 7: What Are Design Patterns? Why Use Them?
- CHAPTER 8: Some Pattern Principles
- CHAPTER 9: Generating Objects
- CHAPTER 10: Patterns for Flexible Object Programming
- CHAPTER 11: Performing and Representing Tasks
- CHAPTER 12: Enterprise Patterns
- CHAPTER 13: Database Patterns
- CHAPTER 14: Good (and Bad) Practice
- CHAPTER 15: An Introduction to PEAR and Pyrus
- CHAPTER 16: Generating Documentation with phpDocumentor
- CHAPTER 17: Version Control with Git
- CHAPTER 18: Testing with PHPUnit
- CHAPTER 19: Automated Build with Phing
- CHAPTER 20: Continuous Integration
- CHAPTER 21: Objects, Patterns, Practice
- APPENDIX A: Bibliography
- APPENDIX B: A Simple Parser
- Title: PHP Objects, Patterns, and Practice, Fourth Edition
- Release date: December 2013
- Publisher(s): Apress
- ISBN: 9781430260318
You might also like
PHP in Action: Objects, Design, Agility
To keep programming productive and enjoyable, state-of-the-art practices and principles are essential. Object-oriented programming and design …
The PHP Workshop
Cut through the noise and get real results with a step-by-step approach to learning PHP programming …
Grokking Algorithms is a friendly take on this core computer science topic. In it, you'll learn …
Head First Design Patterns, 2nd Edition
You know you don’t want to reinvent the wheel, so you look to design patterns—the lessons …