Q&A
- How is Façade different compared to the Proxy pattern?
Façade shares some common characteristics of the Proxy pattern. However, Façade does not need to have the same interface as the service objects or subsystems it tries to encapsulate.
- How is Decorator different compared to the Proxy pattern?
Both patterns are fairly similar but they have different functionalities and responsibilities. Decorator is used by the client to wrap an object and can be added or removed at runtime. With Proxy, the client does not usually have this flexibility as it is usually hidden from the client. This means that the client can only interface with the proxy and has limited control over the underlying object instance.
- How is Bridge different compared to the Adapter pattern?
Adapter is used on an existing app to make some incompatible classes work together. This means that you can write Adapters on top of existing programs. Bridge, however, needs more design up front as you...