I need a single example for the following patterns that illustrate its uses and advantages :
- Adapter pattern
-
facade pattern
-
Read-Only Interface pattern
- Abstraction-Occurrence pattern
I am asking this question because I am still confused about the advantage of the use of these patterns. For example, one of the important advantages of the facade pattern is that it decreases the dependencies between classes, which is not clear to me as I don't know any example that implements this pattern. Also, I know that we use the abstraction occurrence pattern so that we make one class that hold the common information between related objects and we make another class that holds the occurrences of these objects , but I still can't figure out what is the advantage of doing so, because we still can make a single class that can create these related objects ?
Aucun commentaire:
Enregistrer un commentaire