Questions tagged [proxy-pattern]

A design pattern that provides a placeholder for another object to control access, reduce cost, and reduce complexity. One of the Gang of Four's structural design patterns.

A Proxy may

  • Provide a surrogate or placeholder for another object to control access to it.
  • Use an extra level of indirection to support distributed, controlled, or intelligent access.
  • Add a wrapper and delegation to protect the real component from undue complexity.

This is one of the Gang of Four's structural , first published in Gamma et al.'s book "Design Patterns: Elements of Reusable Object-Oriented Software".

More information is available on Wikipedia.

130 questions
0
votes
1 answer

What is the ISubject and Operation() of the code in proxy design pattern?

I want to know base using the code below what is the: 1. ISubject and Operation() 2. realSubject: RealSubject and 3. Operation() realSubject.Operation() on the UML diagram of Proxy design pattern link //Payment.java import java.math.*; import…
0
votes
1 answer

How to use Proxy Pattern with MVC

As part of a larger school project I have an application design using MVC pattern and now have a new requirement to add a remote monitoring station. It seems the proxy pattern is best for the remote monitor but... Does it make sense to hook the…
0
votes
1 answer

what is the code for main class in proxy design pattern?

Please help me to create the main class of this proxy design pattern? //Filename:Payment.java import java.math.*; import java.rmi.*; public interface Payment extends Remote{ public void purchase(PaymentVO payInfo, BigDecimal price) …
Mae Zi
  • 13
  • 1
  • 2
  • 8
0
votes
1 answer

Implementation of Proxy Design Pattern

I look the Proxy Pattern in the Wikipedia site : http://en.wikipedia.org/wiki/Proxy_pattern I understand the program in one computer. But i ask me questions about the realization in 2 computers. in reality, in "real life", i suppose that : 1)…
Thomas
  • 89
  • 1
  • 11
0
votes
1 answer

Proxy-Pattern with multiple interfaces

I use instanceof to test for capabilitys. interface Animal{} class AnimalImpl{} class Cage{ public Animal animal; } If i have a Cage cage with a Animal and like to add a Proxy for Fly and Run to the Animal interface Fly{} interface Run{} I do…
Grim
  • 1,938
  • 10
  • 56
  • 123
0
votes
1 answer

Proxy Design Pattern : Disadvantages

I was going through one of the Articles on Proxy pattern. Read the Comments After the Explanation In this article there are few downsides mentioned for Proxy Patterns, but I am not able to understand: 1) The downside here is 'magic' could be…
Sunny Gupta
  • 6,929
  • 15
  • 52
  • 80
0
votes
1 answer

How to dynamically implement proxy pattern in flex action script?

I need to implement a proxy pattern for flex action script. The source object contains 40-50 methods, and may keep increasing, so I hope I could avoid implementing individual methods in the source object. I remember in java, I could use reflection…
BlueDolphin
  • 9,765
  • 20
  • 59
  • 74
-1
votes
1 answer

Is EF Lazy Loading a real Proxy Pattern?

I know EF use Proxy Pattern to implement lazy loading. 1.Stand Proxy Pattern: In the proxy pattern,[Proxy] will not be inherited from [RealSubject]. 2.EF In lazy loading,[Proxy] class will be inherited from [RealSubject]. So this is not exact the…
-2
votes
1 answer

What is the difference between a Data Transfer Object (DTO) and a proxy object?

I just do not see the difference between the two.
-2
votes
1 answer

Proxy pattern - why to implement interface from real object class?

I do not understand why do I have to implement the interface in Proxy Pattern target object to represent. I think at it as the common use of an interface, which is implemented by proxy class, which will provide to get real object class info and show…
Noomak
  • 371
  • 5
  • 19
1 2 3
8
9