design patterns


the steps in refactoring, from the book: "Refactoring: Improving the Design of Existing Code" by Martin Fowler:

  • Identify the code in need of refactoring.
  • Have test coverage for the code.
  • Work in small steps.
  • Run your tests after each step. Code and test in quick iterations — which is much easier
  • in an interpreted language like PHP as compared with compiled languages.
  • Use refactoring to make your more readable and to improve performance.