Pro PHP: Patterns, Frameworks, Testing and More

Book description

Taking care to focus solely on those topics that will have the most impact on experienced PHP developers, Pro PHP is written for readers seeking to take their understanding of both PHP and sound software development practices to the next level. Advanced object-oriented features, documentation, debugging, software patterns, and the Standard PHP Library are just a few of the topics covered in extensive detail.

Author and noted PHP expert Kevin McArthur also examines emerging practices and trends such as the MVC architecture as applied to PHP, with special emphasis placed upon the increasingly popular Zend Framework.

With Ajax and web services crucial to the success of today's web applications, the book concludes with several chapters covering JSON, the SOAP extension, and advanced web services topics.

If you're seeking to go beyond the basics, Pro PHP is the book for you.

Table of contents

  1. Title Page
  2. Dedication
  3. Contents at a Glance
  4. Contents
  5. About the Author
  6. About the Technical Reviewer
  7. Acknowledgments
  8. Introduction
    1. Who Should Read This Book
    2. How This Book Is Organized
    3. Contacting the Author
  9. PART 1: OOP and Patterns
    1. CHAPTER 1: Abstract Classes, Interfaces, and Programming by Contract
      1. Abstract Classes
      2. Interfaces
      3. The instanceof Operator
      4. Programming by Contract
      5. Just the Facts
    2. CHAPTER 2: Static Variables, Members, and Methods
      1. Static Variables
      2. Static Usage in Classes
      3. The Static Debate
      4. Just the Facts
    3. CHAPTER 3: Singleton and Factory Patterns
      1. Responsibility and the Singleton Pattern
      2. The Factory Pattern
      3. Just the Facts
    4. CHAPTER 4: Exceptions
      1. Implementing Exceptions
      2. Logging Exceptions
      3. Exception Overhead
      4. Error Coding
      5. Type Hinting and Exceptions
      6. Rethrowing Exceptions
      7. Just the Facts
    5. CHAPTER 5: What's New in PHP 6
      1. PHP Installation
      2. Unicode in PHP 6
      3. Namespaces
      4. Late Static Binding
      5. Dynamic Static Methods
      6. Ternary Assignment Shorthand (ifsetor)
      7. XMLWriter Class
      8. Just the Facts
  10. PART 2: Testing and Documentation
    1. CHAPTER 6: Documentation and Coding Conventions
      1. Coding Conventions
      2. PHP Comments and Lexing
      3. PHPDoc
      4. DocBook
      5. Just the Facts
    2. CHAPTER 7: Reflection API
      1. Introducing the Reflection API
      2. Parsing Reflection-Based Documentation Data
      3. Extending the Reflection API
      4. Just the Facts
    3. CHAPTER 8: Testing, Deployment, and Continuous Integration
      1. Subversion for Version Control
      2. PHPUnit for Unit Testing
      3. Phing for Deployment
      4. Xinc, the Continuous Integration Server
      5. Xdebug for Debugging
      6. Just the Facts
  11. PART 3: The Standard PHP Library (SPL)
    1. CHAPTER 9: Introduction to SPL
      1. SPL Fundamentals
      2. Iterators
      3. Array Overloading
      4. The Observer Pattern
      5. Serialization
      6. SPL Autoloading
      7. Object Identification
      8. Just the Facts
    2. CHAPTER 10: SPL Iterators
      1. Iterator Interfaces and Iterators
      2. Real-World Iterator Implementations
      3. Just the Facts
    3. CHAPTER 11: SPL File and Directory Handling
      1. File and Directory Information
      2. Iteration of Directories
      3. SPL File Object Operations
      4. Just the Facts
    4. CHAPTER 12: SPL Array Overloading
      1. Introducing ArrayAccess
      2. Introducing ArrayObject
      3. Building an SPL Shopping Cart
      4. Using Objects As Keys
      5. Just the Facts
    5. CHAPTER 13: SPL Exceptions
      1. Logic Exceptions
      2. Runtime Exceptions
      3. Bad Function and Method Call Exceptions
      4. Domain Exceptions
      5. Range Exceptions
      6. Invalid Argument Exceptions
      7. Length Exceptions
      8. Overflow Exceptions
      9. Underflow Exceptions
      10. Just the Facts
  12. PART 4: The Model-View-Controller (MVC) Pattern
    1. CHAPTER 14: MVC Architecture
      1. Why Use MVC?
      2. MVC Application Layout
      3. Criteria for Choosing an MVC Framework
      4. Roll Your Own MVC Framework
      5. Just the Facts
    2. CHAPTER 15: Introduction to the Zend Framework
      1. Setting Up the Zend Framework
      2. Creating Controllers, Views, and Models
      3. Adding Functionality
      4. Just the Facts
    3. CHAPTER 16: Advanced Zend Framework
      1. Managing Configuration Files
      2. Setting Site-Wide View Variables
      3. Sharing Objects
      4. Error Handling
      5. Application Logging
      6. Caching
      7. Authorizing Users
      8. Using JSON with PHP
      9. Customizing Routes
      10. Managing Sessions
      11. Sending Mail
      12. Creating PDF Files
      13. Integrating with Web Services
      14. Just the Facts
    4. CHAPTER 17: The Zend Framework Applied
      1. Module and Model Setup
      2. The Request Cycle
      3. Creating Plug-ins
      4. Creating Helpers
      5. Implementing Access Control
      6. Using a Two-Step View
      7. Just the Facts
  13. PART 5: Web 2.0
    1. CHAPTER 18: Ajax and JSON
      1. JSON and PHP
      2. JSON and JavaScript
      3. Some Ajax Projects
      4. Just the Facts
    2. CHAPTER 19: Introduction to Web Services with SOAP
      1. Introduction to the PHP Web Services Architecture
      2. Introduction to WSDL
      3. Introduction to SOAP
      4. Using the PHP SOAP Extension
      5. A Real-World Example
      6. Just the Facts
    3. CHAPTER 20: Advanced Web Services
      1. Complex Types
      2. Authentication
      3. Sessions
      4. Objects and Persistence
      5. Binary Data Transmission
      6. Just the Facts
    4. CHAPTER 21: Certificate Authentication
      1. Public Key Infrastructure Security
      2. Setting Up Client Certificate Authentication
      3. PHP Authentication Control
      4. Just the Facts
  14. Index

Product information

  • Title: Pro PHP: Patterns, Frameworks, Testing and More
  • Author(s): Kevin McArthur
  • Release date: March 2008
  • Publisher(s): Apress
  • ISBN: 9781590598191