the proxy design pattern oleksandra sopova feb, 2014
Post on 17-Jan-2018
221 Views
Preview:
TRANSCRIPT
The PROXY Design Pattern
Oleksandra SopovaFeb, 2014
Remote method invocation
Back to our GumballMachine remote proxy
In our dating service we want :- make sure that a customer can set his own information while preventing others from altering it-allow just the opposite with the HotOrNot ratings: we want the other customers to be able to set the rating, but not that particular customer
Big Picture: creating a dynamic Proxy for the PersonBeanStep one: creating Invocation Handlers
The Proxy Zoo
SummaryThe Proxy pattern introduces a level of indirection when accessing an object.
•A remote proxy can hide the fact that an object resides in a different address Space.
•A virtual proxy can perform optimizations such as creating an object on Demand.
•Both protection proxies and smart references allow additional housekeeping tasks when an object is accessed.
References
•Head First Design Patterns by Eric Freeman, Elisabeth Robson, Bert Bates, Kathy Sierra • Design Patterns: Elements of Reusable Object-Oriented Software by Erich Gamma , Richard Helm, Ralph Johnson, John Vlissides• Design Patterns by Andriy Buday • RMI (Remote Method Invocation)http://habrahabr.ru/post/74639/
THANK YOU FOR YOUR ATTENTION
top related