Mastering PHP Design Patterns

Junade Ali

  • 出版商: Packt Publishing
  • 出版日期: 2016-09-30
  • 售價: $1,970
  • 貴賓價: 9.5$1,872
  • 語言: 英文
  • 頁數: 270
  • 裝訂: Paperback
  • ISBN: 1785887130
  • ISBN-13: 9781785887130
  • 相關分類: PHPDesign Pattern
  • 海外代購書籍(需單獨結帳)

相關主題

商品描述

Key Features

  • Learn about advanced design patterns in PHP 7
  • Understand enhanced architectural patterns
  • Learn to implement reusable design patterns to address common recurring problems

Book Description

Design patterns are a clever way to solve common architectural issues that arise during software development. With an increase in demand for enhanced programming techniques and the versatile nature of PHP, a deep understanding of PHP design patterns is critical to achieve efficiency while coding.

This comprehensive guide will show you how to achieve better organization structure over your code through learning common methodologies to solve architectural problems. You'll also learn about the new functionalities that PHP 7 has to offer.

Starting with a brief introduction to design patterns, you quickly dive deep into the three main architectural patterns: Creational, Behavioral, and Structural popularly known as the Gang of Four patterns. Over the course of the book, you will get a deep understanding of object creation mechanisms, advanced techniques that address issues concerned with linking objects together, and improved methods to access your code.

You will also learn about Anti-Patterns and the best methodologies to adopt when building a PHP 7 application. With a concluding chapter on best practices, this book is a complete guide that will equip you to utilize design patterns in PHP 7 to achieve maximum productivity, ensuring an enhanced software development experience.

What you will learn

  • Recognize recurring problems in your code with Anti-Patterns
  • Uncover object creation mechanisms using Creational Patterns
  • Use Structural design patterns to easily access your code
  • Address common issues encountered when linking objects using the splObserver classes in PHP 7
  • Achieve a common style of coding with Architectural Patterns
  • Write reusable code for common MVC frameworks such as Zend, Laravel, and Symfony
  • Get to know the best practices associated with design patterns when used with PHP 7

About the Author

Junade Ali was a technical lead at some of the UK's leading digital agencies and has also worked using PHP in mission-critical road-safety systems. He loves pushing PHP to its innovative limits. Having started his career as a web development apprentice, he still remains engaged in the academic computer science community.

Junade, an avid contributor to the PHP community, has also spoken at PHPTek and the Lead Developer Conference. In addition to this, Junade was interviewed by Cal Evans for Voices of the ElePHPant, and he has appeared on the PHP Roundtable. In this spirit, Junade is proud of his local PHP user group: PHPWarks. Currently, Junade works at CloudFlare as a polymath, and helps make the Internet more secure and faster.

Outside of development, Junade has an interest in law and political campaigns and is a published author on constitutional law.

Table of Contents

  1. Why "Good PHP Developer" Isn't an Oxymoron
  2. Anti-Patterns
  3. Creational Design Patterns
  4. Structural Design Patterns
  5. Behavioral Design Patterns
  6. Architectural Patterns
  7. Refactoring
  8. How to Write Better Code

商品描述(中文翻譯)


主要特點



  • 學習 PHP 7 中的高級設計模式

  • 了解增強的架構模式

  • 學習實現可重用的設計模式以解決常見的重複問題


書籍描述


設計模式是解決軟體開發過程中常見架構問題的巧妙方法。隨著對增強程式設計技術的需求增加以及 PHP 的多功能性,深入了解 PHP 設計模式對於編碼效率至關重要。


這本全面的指南將向您展示如何通過學習常見的方法來解決架構問題,從而實現更好的程式碼組織結構。您還將了解 PHP 7 提供的新功能。


從簡要介紹設計模式開始,您將迅速深入探討三種主要的架構模式:創建型、行為型和結構型,也被稱為四人幫模式。在本書的過程中,您將深入了解對象創建機制、解決對象連接問題的高級技術以及改進的程式碼訪問方法。


您還將了解反模式以及在構建 PHP 7 應用程序時採用的最佳方法。本書以最佳實踐的結尾,是一本完整的指南,將使您能夠在 PHP 7 中利用設計模式實現最大的生產力,確保提升軟體開發體驗。


您將學到什麼



  • 通過反模式識別程式碼中的重複問題

  • 使用創建型模式揭示對象創建機制

  • 使用結構型設計模式輕鬆訪問程式碼

  • 使用 PHP 7 中的 splObserver 類解決連接對象時遇到的常見問題

  • 通過架構模式實現共同的編碼風格

  • 為常見的 MVC 框架(如 Zend、Laravel 和 Symfony)編寫可重用的程式碼

  • 了解在使用 PHP 7 時與設計模式相關的最佳實踐


關於作者


Junade Ali 曾是英國領先的數字代理公司的技術主管,並在使用 PHP 開發關鍵的道路安全系統時也有相關經驗。他喜歡將 PHP 推向創新的極限。他的職業生涯始於網頁開發學徒,他仍然參與學術計算機科學社區的活動。


Junade 是 PHP 社區的積極貢獻者,也曾在 PHPTek 和 Lead Developer Conference 上發表演講。此外,Junade 還接受了 Cal Evans 對於 Voices of the ElePHPant 的採訪,並出現在 PHP Roundtable 上。在這種精神下,Junade 為他的當地 PHP 用戶組 PHPWarks 感到自豪。目前,Junade 在 CloudFlare 擔任多才多藝的職位,幫助使互聯網更安全和更快速。


在開發之外,Junade 對法律和政治運動有興趣,並且是憲法法律方面的發表作者。


目錄



  1. 為什麼「優秀的 PHP 開發者」不是一個自相矛盾的詞

  2. 反模式

  3. 創建型設計模式

  4. 結構型設計模式

  5. 行為型設計模式

  6. 架構模式

  7. 重構

  8. 如何撰寫更好的程式碼