Duration
5 days
What you will learn
This course was designed for participants who wants to explore more on PHP programming advanced topics such as Object Oriented PHP, Error Handling, Unit Testing, Caching, Distributed Applications, Performance Tuning, Profiling etc.
Prerequisites
Experiences in developing PHP applications will be beneficial.
Course Content
Implementation and Development Methodologies
- Coding Styles
- Choosing a Style That Is Right for You
- Naming Symbols
- Avoiding Confusing Codes
- Documentation
- Object-Oriented Programming Through Design Patterns
- Introduction to OO Programming
- A Brief Introduction to Design Patterns
- Overloading
- Error Handling
- Handling Errors
- Handling External Errors
- Exceptions
- When to Use Exceptions
- Implementing with PHP: Templates and the Web
- Smarty
- Writing Your Own Template Solutions
- Implementing with PHP: Standalone Scripts
- Introduction to the PHP CLI
- Handling I/O
- Parsing Command-Line Arguments
- Writing Daemons
- Unit Testing
- An Introduction to Unit Testing
- Writing Inline and Out-of-Line Unit Tests
- Additional Features in PHPUnit
- Test-Driven Design
- Unit Testing in a Web Environment
- Managing the Development Environment
- Change Control
- Managing Packaging
- Designing a Good API
- Design for Refactoring and Extensibility
- Defensive Coding
Caching
- External Performance Tuning
- Language-Level Tunings
- Cache-Friendly PHP Applications
- Content Compression
- Data Component Caching
- Caching Issues
- Recognizing Cacheable Data Components
- Choosing the Right Strategy: Hand-Made or Prefab Classes
- Output Buffering
- In-Memory Caching
- DMB-Based Caching
- Shared Memory Caching
- Cookie-Based Caching
- Integrating Caching into Application Code
- Computational Reuse
- Caching Reused Data Inside a Request
- Caching Reused Data Between Requests
- Computational Reuse Inside PHP
Distributed Applications
- Interacting with Databases
- Understanding How Databases and Queries Work
- Database Access Pattern
- Tuning Database Access
- User Authentication and Session Security
- Simple Authentication Schemes
- Registering Users
- Maintaining Authentication
- Single Signon
- Session Handling
- Client-Side Sessions
- Server-Side Sessions
- Building a Distributed Environment
- What is Cluster?
- Clustering Design Essentials
- Caching in a Distributed Environment
- Scaling Databases
- RPC: Interacting with Remote Services
- XML-RPC
- SOAP
- SOAP and XML-RPC Compared
Performance
- Application Benchmarks: Testing an Entire Application
- Passive Identification of Bottlenecks
- Load Generators
- Profiling
- What is Needed in a PHP Profiler
- A Smorgasbord of Profilers
- Installing and Using APD
- A Tracing Example
- Profiling a Larger Application
- Spotting General Inefficiencies
- Removing Superfluous Functionality
- Synthetic Benchmarks: Evaluating Code Blocks and Functions
- Benchmarking Basics
- Building a Benchmarking Harness
- Benchmarking Examples
Programme scope, delivery arrangements and suitability are confirmed during enquiry.