Advanced PHP Programming (Paperback) (進階 PHP 程式設計)

George Schlossnagle

  • 出版商: SAMS
  • 出版日期: 2004-02-20
  • 售價: $2,180
  • 貴賓價: 9.5$2,071
  • 語言: 英文
  • 頁數: 672
  • 裝訂: Paperback
  • ISBN: 0672325616
  • ISBN-13: 9780672325618
  • 相關分類: PHP
  • 海外代購書籍(需單獨結帳)

買這商品的人也買了...

相關主題

商品描述

 

Over the past three years PHP has evolved from being a niche language used to add dynamic functionality to small sites to a powerful tool making strong inroads into large-scale, business-critical Web systems.

The rapid maturation of PHP has created a skeptical population of users from more traditional "enterprise" languages who question the readiness and ability of PHP to scale, as well as a large population of PHP developers without formal computer science backgrounds who have learned through the hands-on experimentation while developing small and midsize applications in PHP.

While there are many books on learning PHP and developing small applications with it, there is a serious lack of information on "scaling" PHP for large-scale, business-critical systems. Schlossnagle¿s Advanced PHP Programming fills that void, demonstrating that PHP is ready for enterprise Web applications by showing the reader how to develop PHP-based applications for maximum performance, stability, and extensibility.

Table of Contents:

Introduction.

I. IMPLEMENTATION AND DEVELOPMENT METHODOLOGIES.

1. Coding Styles.

Choosing a Style That Is Right for You. Naming Symbols. Avoiding Confusing Code. Documentation. Further Reading.

2. Object-Oriented Programming through Design Patterns.

Introduction to OO Programming. A Brief Introduction to Design Patterns. Overloading. Further Reading.

3. Error Handling.

Handling Errors. Handling External Errors. Exceptions. When to Use Exceptions. Further Reading.

4. Implementing with PHP: Templates and the Web.

Smarty. Writing Your Own Template Solution. Further Reading.

5. Implementing with PHP: Standalone Scripts.

Introduction to the PHP Command-Line Interface (CLI). Handling Input/Output (I/O). Parsing Command-Line Arguments. Creating and Managing Child Processes. Writing Daemons. Combining What You've Learned: Monitoring. Services Further Reading.

6. 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. Further Reading.

7. Managing the Development Environment.

Change Control. Managing Packaging. Further Reading.

8. Designing a Good API.

Design for Refactoring and Extensibility. Defensive Coding. Further Reading.

II. CACHING.

9. External Performance Tunings.

Language-Level Tunings. Cache-Friendly PHP Applications. Content Compression. Further Reading.

10. Data Component Caching.

Caching Issues. Recognizing Cacheable Data Components. Choosing the Right Strategy: Hand-Made or Prefab Classes. Output Buffering. In-Memory Caching. DBM-Based Caching. Shared Memory Caching. Cookie-Based Caching. Integrating Caching into Application Code. Further Reading.

11. Computational Reuse.

Introduction by Example: Fibonacci Sequences. Caching Reused Data Inside a Request. Caching Reused Data Between Requests. Computational Reuse Inside PHP. Further Reading.

III. DISTRIBUTED APPLICATIONS.

12. Interacting with Databases.

Understanding How Databases and Queries Work. Database Access Patterns. Tuning Database Access. Further Reading.

13. User Authentication and Session Security.

Simple Authentication Schemes. Registering Users. Maintaining Authentication: Ensuring That You Are Still Talking to the Same Person. Single Signon. Further Reading.

14. Session Handling.

Client-Side Sessions. Server-Side Sessions.

15. Building a Distributed Environment.

What Is a Cluster? Clustering Design Essentials. Caching in a Distributed Environment. Scaling Databases. Further Reading.

16. RPC: Interacting with Remote Services.

XML-RPC. SOAP. SOAP and XML-RPC Compared. Further Reading.

IV. PERFORMANCE.

17. Application Benchmarks: Testing an Entire Application.

Passive Identification of Bottlenecks. Load Generators. Further Reading.

18. 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. Further Reading.

19. Synthetic Benchmarks: Evaluating Code Blocks and Functions.

Benchmarking Basics. Building a Benchmarking Harness. Benchmarking Examples.

V. EXTENSIBILITY.

20. PHP and Zend Engine Internals.

How the Zend Engine Works: Opcodes and Op Arrays. Variables. Functions. Classes. The PHP Request Life Cycle. Further Reading.

21. Extending PHP: Part I.

Extension Basics. An Example: The Spread Client Wrapper. Further Reading.

22. Extending PHP: Part II.

Implementing Classes. Writing Custom Session Handlers. The Streams API. Further Reading.

23. Writing SAPIs and Extending the Zend Engine.

SAPIs. Modifying and Introspecting the Zend Engine. Homework.

Index.

商品描述(中文翻譯)

在過去的三年中,PHP從一種用於為小型網站添加動態功能的專業語言演變為一種強大的工具,並在大規模、業務關鍵的Web系統中取得了重要地位。

PHP的快速成熟創造了一群懷疑論者,他們來自傳統的“企業”語言,質疑PHP的可擴展性和能力,同時也有一大批沒有正式計算機科學背景的PHP開發人員,他們通過實踐和開發小型和中型應用程序來學習PHP。

儘管有很多關於學習PHP和開發小型應用程序的書籍,但在“擴展”PHP以應對大規模、業務關鍵系統方面,卻缺乏相關信息。Schlossnagle的《高級PHP編程》填補了這一空白,通過展示如何開發PHP應用程序以實現最佳性能、穩定性和可擴展性,證明了PHP已經準備好用於企業Web應用程序。

目錄:

引言。

I. 實施和開發方法論。

1. 編碼風格。

選擇適合自己的風格。命名符號。避免混淆的代碼。文檔。進一步閱讀。

2. 通過設計模式實現面向對象編程。

面向對象編程介紹。設計模式簡介。重載。進一步閱讀。

3. 錯誤處理。

處理錯誤。處理外部錯誤。異常。何時使用異常。進一步閱讀。

4. 使用PHP實現:模板和Web。

Smarty。編寫自己的模板解決方案。進一步閱讀。

5. 使用PHP實現:獨立腳本。

PHP命令行界面(CLI)介紹。處理輸入/輸出(I/O)。解析命令行參數。創建和管理子進程。編寫守護進程。結合所學:監控。進一步閱讀。

6. 單元測試。

單元測試簡介。內聯和獨立單元測試的編寫。PHPUnit中的其他功能。測試驅動設計。Web環境中的單元測試。進一步閱讀。

7. 管理開發環境。

變更控制。管理打包。進一步閱讀。

8. 設計良好的API。

為重構和可擴展性設計。防禦性編程。進一步閱讀。

II. 緩存。

9. 外部性能調整。

語言層面的調整。友好緩存的PHP應用程序。內容壓縮。進一步閱讀。

10. 數據組件緩存。

緩存問題。識別可緩存的數據組件。選擇合適的策略:手工製作或預製類。輸出緩衝。內存緩存。基於DBM的緩存。共享內存緩存。基於Cookie的緩存。將緩存集成到應用程序代碼中。進一步閱讀。

11. 計算重用。

通過示例介紹:斐波那契數列。緩存計算。