Apress Access

Pro PHP Refactoring

By Francesco Trucchia , Jacopo Romei

  • eBook Price: $34.99
Buy eBook Buy Print Book
With this book, you'll learn to identify problem code and refactor it to create more effective applications using test-driven design.

Full Description

  • Add to Wishlist
  • ISBN13: 978-1-4302-2727-4
  • User Level: Intermediate to Advanced
  • Publication Date: July 6, 2010
  • Available eBook Formats: EPUB, MOBI, PDF

Related Titles

  • Go Recipes
  • Building APIs with Node.js
  • Pro MEAN Stack Development
  • Learn CakePHP, Second Edition
  • PHP Development Tool Essentials
  • Practical Laravel 5
  • Lumen Programming Guide
  • Building Embedded Systems
Full Description

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

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

If you think that you've found an error in this book, please let us know by emailing to editorial@apress.com . You will find any confirmed erratum below, so you can check if your concern has already been addressed.
No errata are currently published


    1. PHP for Absolute Beginners


      View Book

    2. Pro PHP Security


      View Book

    3. Beginning PHP and MySQL


      View Book

    4. PHP Solutions


      View Book