Das Proxy-Pattern bietet einen Platzhalter oder Stellvertreter für ein anderes Objekt, um den Zugriff darauf zu steuern. Der Proxy hat die gleiche Schnittstelle wie das echte Objekt, fügt aber Verhalten hinzu — wie Lazy Loading, Zugriffskontrolle, Caching oder Logging — bevor er an dieses delegiert.
Was das Proxy-Pattern tut
PROXY → an object that STANDS IN for another, controlling access to it:
→ same interface as the real object (clients use it transparently)
→ adds behavior BEFORE/AROUND delegating to the real object
→ controls WHEN and HOW the real object is accessed
→ "a stand-in that adds control/behavior"
