Related Titles
- Full Description
-
This book takes you beyond the PHP basics to the enterprise development practices used by professional programmers. Updated for PHP 5.3 with new sections on closures, namespaces, and continuous integration, this edition will teach you about object features such as abstract classes, reflection, interfaces, and error handling. Youll also discover object tools to help you learn more about your classes, objects, and methods.
Then youll move into design patterns and the principles that make patterns powerful. Youll learn both classic design patterns and enterprise and database patterns with easy-to-follow examples.
Finally, youll discover how to put it all into practice to help turn great code into successful projects. Youll learn how to manage multiple developers with Subversion, and how to build and install using Phing and PEAR. Youll also learn strategies for automated testing and building, including continuous integration.
Taken together, these three elementsobject fundamentals, design principles, and best practiceswill help you develop elegant and rock-solid systems.
What youll learn
- Learn to work with object fundamentals: writing classes and methods, instantiating objects, and creating powerful class hierarchies using inheritance.
- Master advanced object-oriented features, including static methods and properties.
- Learn how to manage error conditions with exceptions, and create abstract classes and interfaces.
- Understand and use design principles to deploy objects and classes effectively in your projects.
- Learn about design patterns, their purpose and 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. These users will benefit from the books 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
-
Table of Contents
- PHP: Design and Management
- PHP and Objects
- Object Basics
- Advanced Features
- Object Tools
- Objects and Design
- What Are Design Patterns? Why Use Them?
- Some Pattern Principles
- Generating Objects
- Patterns for Flexible Object Programming
- Performing and Representing Tasks
- Enterprise Patterns
- Database Patterns
- Good (and Bad) Practice
- An Introduction to PEAR and Pyrus
- Generating Documentation with phpDocumentor
- Version Control with Subversion
- Testing with PHPUnit
- Automated Build with Phing
- Continuous Integration
- Objects, Patterns, Practice
- Source Code/Downloads
- Errata
-
If you think that you've found an error in this book, please let us know about it. You will find any confirmed erratum below, so you can check if your concern has already been addressed.
On page 74:This is how it is now:
namespace main;
use com\getinstance\util;
util\Debug::helloWorld();
...
namespace main;
use com\getinstance\util\Debug;
util\Debug::helloWorld();
But the last line of this code should be
Debug::helloWorld();
There is not need of "util\Debug::helloWorld();" since in the "use" there is already the comple path and class.
On page 3185:Note the page # is the Kindle location (sorry couldn't find a page number.
This is the marklogic code sample, in chapter 11, the interpreter pattern.
In the getKey() method of the abstract Expression class, the first line says
if ( !asset($this->key)) {
maybe it's because it's early in the morning, but I went looking for the PHP asset function before realizing this should say
if (!isset($this->key)) {






