- Descriptions that you should have to understand a Design Pattern
- Normally PD is described by UML. Here’s an example. Lines are some kind of relationship. boxes represent classes or interfaces and include important fields.
Apply a Pattern
Practice
- Do a coding exercise or kata
- Write tests to verify that you understand
- Repeat several times with variations
- Practice on real code in a separate branch - then delete it
In Real Code
- Follow Refactoring Fundamentals course
- Make sure you have test coverage
- Do the work in a separate branch - use a pull request or similar tool to merge
- Verify behavior is consistent after completing the refactoring
- Be prepared to delete and start over if the result isn’t better than the original
What is a Pattern?
- It solves a problem
- It is a proven concept
- The solution is not obvious
- It describes a relationship
- It has a significant human component