Pro PHP Refactoring

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Many businesses and organizations depend on older high-value PHP software that risks abandonment because it is impossible to maintain. The reasons for this may be that the software is not well designed; there is only one developer (the one who created the system) who can develop it because he didn’t use common design patterns and documentation; or the code is procedural, not object-oriented. With this book, you’ll learn to identify problem code and refactor it to create more effective applications using test-driven design.

What you’ll learn

  • What refactoring is and why you need to refactor code
  • What test-driven design is and why you need to test your code
  • How to write unit and functional tests with PHPUnit and Selenium Remote Control (RC)
  • How to detect “bad smells” in PHP code, and refactor them using test-driven design
  • How to refactor a large procedural application affected by many bad smells

Who this book is for

This book is for PHP developers, businesses, and developers relying on legacy PHP apps.

Table of Contents

  1. Introduction 
  2. Finding “Bad Smells” in Code  
  3. Introduction to Refactoring  
  4. Principles and Rules 
  5. Test-First Development  
  6. Refactoring Tools 
  7. Structuring Behavior  
  8. Changing Class Responsibilities 
  9. Dealing with Data Rationalization  
  10. Reducing to Essential Conditional Executions
  11. Simplifying Method Calls 
  12. Simplifying Generalization Relationships 
  13. Legacy Code  
  14. Regression Tests  
  15. Refactoring with Patterns

Author(s): Francesco Trucchia, Jacopo Romei
Series: Expert's Voice in Open Source
Edition: 1
Publisher: Apress
Year: 2010

Language: English
Pages: 360