mercredi 8 décembre 2021

why does proxy pattern uses the realSubject class instead of composing the Subject interface

The two patterns' uml shotted from book Design Patterns Elements of Resuable Object-Oriented Software are listed below:

Proxy pattern uml :

enter image description here

Decorator pattern uml:

enter image description here

my question is why does proxy pattern use the realSubject class instead of composing the Subject interface just like the decorator pattern does.

Aucun commentaire:

Enregistrer un commentaire