Skip to content
This repository was archived by the owner on Oct 25, 2022. It is now read-only.

Latest commit

 

History

History
16 lines (14 loc) · 614 Bytes

File metadata and controls

16 lines (14 loc) · 614 Bytes

實戰 PHP 重構與模式

線上投影片: http://www.slideshare.net/jaceju/refactoring-with-patterns-in-php

說明

  • 00_orig : 原始程式碼
  • 01_extract_method : 以 Extract Method 重構
  • 02_model_order : 將 DAO 封裝至 Model 中
  • 03_constant : 將全域常數改為類別常數
  • 04_chain_of_responsibility : 以 Chain of Responsibility 模式重構
  • 05_switch : 將 if ... elseif ... else 改為 switch
  • 06_strategy : 以 Strategy 模式重構
  • 07_extract_method_again : 再次對程式碼做 Extract Method 重構
  • 08_template_method : 以 Template Method 模式重構