A repository for practicing Gang of Four design patterns
Q: Who are the Gang of Four (GoF)?
A: These badasses: Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. They literally wrote the book on design patterns.
Q: What are design patterns?
A: In this context, a design pattern is a healthy solution to a common problem in Object Oriented Programming.
Q: What is the purpose of this repository?
A: This repository exists to expose developers to the concept of design patterns, to encourage building demos as practice, and to develop healthy learning techniques for working professionals.
- Pick a design pattern from here. Consider doing the same one others are doing. The more perspectives we have per pattern, the better.
- Write a small, unique demonstration of the pattern. Try to come up with a real-world scenario. Try to limit the contents of the example to the pattern itself.
- Complete your work on your own branch.
- Your demonstration should be a test suite (e.g. xunit) or test app (e.g. a console app). No need for multiple projects.
- Your demonstration must be its own project. Use the following naming conventions:
- PatternName.DeveloperName.Description (e.g. Strategy.Jarrod.TaskScheduler)
- Reflect on your experience. This is the most important component of this exercise. Write and include a readme.md in your main project. Consider your reflection to be a living document of your understanding of the concept. It should include (but not be limited to):
- Purpose: In your own words, describe the pattern and how your example works.
- Application: Think about how you would recognize a potential use case. Maybe include an example from a time when it would have been useful in your work.
- Review (experience): Review your experience of practicing the pattern. For example:
- Did you have trouble coming up with an example?
- Did you have trouble understanding the purpose of the pattern when you started out? What about afterwards?
- How good are the materials that you utilized while learning the pattern?
- Does the pattern actually apply to your problem set?
- Review (pattern): Review the pattern itself. For example:
- How useful is the pattern? With what caveats?
- How well does it accomplish its purpose?
- How does this pattern relate to others you've learned?
- Do you think you will use it in the future? Why or why not?
- Submit a pull request for your example.
- Review and test others' projects.
- design patterns: design pattern origins
- criticism: fair and balanced
- software design pattern: general overview
- dofactory.com: a complete resource with structural and real-world examples
- oodesign.com: a nice complimentary resource with unique explanations and examples
- sourcemaking.com: a nice complimentary resource that provides great context for patterns