I find it difficult to learn both Design Pattern and UML since there are different ways to describe the same pattern which make me unsure what is the single source of truth.
Take Iterator pattern for example, here are just a few diagrams that I saw from well-known sites:
1 WIKIPEDIA
https://en.wikipedia.org/wiki/Iterator_pattern
2 TUTORIALS POINT
https://www.tutorialspoint.com/design_pattern/iterator_pattern.htm
3 REFACTORING GURU
https://refactoring.guru/design-patterns/iterator
4 OODESIGN
https://www.oodesign.com/iterator-pattern.html
5 HOWTODOINJAVA
https://howtodoinjava.com/design-patterns/behavioral/iterator-design-pattern/
What confuses me the most is how arrow symbols are used to describe the relationship between these classes. Sometimes they are generalization, sometimes interface realization, directed association or dependency. Even composition is also used...
I wonder what would be the best way for me to get my head around all this.
Aucun commentaire:
Enregistrer un commentaire