Sitemap
Concept && Coding - by Shrayansh

Concept && Coding - by Shrayansh

Software engineer with 9+ year of experience. Java + Springboot YT: Concept && Coding - by shrayansh

Member-only story

LLD: Proxy Design Pattern (Structural)

2 min readOct 29, 2025

--

Definition

The Proxy Design Pattern provides a representative or placeholder for another object(real complex object) to control access to it.

Use cases of the Proxy Pattern

  • Access Control: Restricts access to sensitive operations based on user permissions.
  • Performance Optimization: Delays resource-intensive operations like expensive object creation until necessary (lazy loading).
  • Pre/post processing: Performs additional operations before and after forwarding the request to the actual object, like adding cross-cutting concerns like audit traces (logging & monitoring), without modifying core business logic.
  • Caching: Can cache results to improve performance.

Class Diagram

Press enter or click to view image in full size
Press enter or click to view image in full size
  1. Subject Interface (EmployeeDao)
  • Defines the common interface for both EmployeeDaoImpl and EmployeeDaoProxy.
  • Ensures the proxy can be used anywhere the real object is expected

2. Real Subject (EmployeeDaoImpl)

  • Contains the actual…

--

--

Concept && Coding - by Shrayansh
Concept && Coding - by Shrayansh

Written by Concept && Coding - by Shrayansh

Software engineer with 9+ year of experience. Java + Springboot YT: Concept && Coding - by shrayansh