Design Patterns Proxy Pattern - Design Patterns

What is Design Patterns Proxy Pattern?

In proxy pattern, a division represents functionality of another class. This kind of design pattern comes under structural pattern.
In proxy pattern, we build object having original object to line its functionality to external world.


We are available to make an Image interface and concrete classes implementing the Image interface. Proxy Image is a proxy class to decrease memory footprint of Real Image object loading.

ProxyPatternDemo, our demo class, will use Proxy Image to get an Image entity to load and display as it requirements.

Step 1

Create an interface.

Step 2

Create concrete classes implementing the similar interface.

Step 3

Use the Proxy Image to get entity of Real Image class when necessary.

Step 4

Verify the output.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

Design Patterns Topics