線上投影片: 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 模式重構