the proxy design pattern oleksandra sopova feb, 2014
TRANSCRIPT
![Page 1: The PROXY Design Pattern Oleksandra Sopova Feb, 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062317/5a4d1b0b7f8b9ab05998b3b4/html5/thumbnails/1.jpg)
The PROXY Design Pattern
Oleksandra SopovaFeb, 2014
![Page 2: The PROXY Design Pattern Oleksandra Sopova Feb, 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062317/5a4d1b0b7f8b9ab05998b3b4/html5/thumbnails/2.jpg)
![Page 3: The PROXY Design Pattern Oleksandra Sopova Feb, 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062317/5a4d1b0b7f8b9ab05998b3b4/html5/thumbnails/3.jpg)
![Page 4: The PROXY Design Pattern Oleksandra Sopova Feb, 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062317/5a4d1b0b7f8b9ab05998b3b4/html5/thumbnails/4.jpg)
Remote method invocation
![Page 5: The PROXY Design Pattern Oleksandra Sopova Feb, 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062317/5a4d1b0b7f8b9ab05998b3b4/html5/thumbnails/5.jpg)
![Page 6: The PROXY Design Pattern Oleksandra Sopova Feb, 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062317/5a4d1b0b7f8b9ab05998b3b4/html5/thumbnails/6.jpg)
![Page 7: The PROXY Design Pattern Oleksandra Sopova Feb, 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062317/5a4d1b0b7f8b9ab05998b3b4/html5/thumbnails/7.jpg)
![Page 8: The PROXY Design Pattern Oleksandra Sopova Feb, 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062317/5a4d1b0b7f8b9ab05998b3b4/html5/thumbnails/8.jpg)
Back to our GumballMachine remote proxy
![Page 9: The PROXY Design Pattern Oleksandra Sopova Feb, 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062317/5a4d1b0b7f8b9ab05998b3b4/html5/thumbnails/9.jpg)
![Page 10: The PROXY Design Pattern Oleksandra Sopova Feb, 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062317/5a4d1b0b7f8b9ab05998b3b4/html5/thumbnails/10.jpg)
![Page 11: The PROXY Design Pattern Oleksandra Sopova Feb, 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062317/5a4d1b0b7f8b9ab05998b3b4/html5/thumbnails/11.jpg)
![Page 12: The PROXY Design Pattern Oleksandra Sopova Feb, 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062317/5a4d1b0b7f8b9ab05998b3b4/html5/thumbnails/12.jpg)
![Page 13: The PROXY Design Pattern Oleksandra Sopova Feb, 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062317/5a4d1b0b7f8b9ab05998b3b4/html5/thumbnails/13.jpg)
![Page 14: The PROXY Design Pattern Oleksandra Sopova Feb, 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062317/5a4d1b0b7f8b9ab05998b3b4/html5/thumbnails/14.jpg)
![Page 15: The PROXY Design Pattern Oleksandra Sopova Feb, 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062317/5a4d1b0b7f8b9ab05998b3b4/html5/thumbnails/15.jpg)
![Page 16: The PROXY Design Pattern Oleksandra Sopova Feb, 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062317/5a4d1b0b7f8b9ab05998b3b4/html5/thumbnails/16.jpg)
![Page 17: The PROXY Design Pattern Oleksandra Sopova Feb, 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062317/5a4d1b0b7f8b9ab05998b3b4/html5/thumbnails/17.jpg)
![Page 18: The PROXY Design Pattern Oleksandra Sopova Feb, 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062317/5a4d1b0b7f8b9ab05998b3b4/html5/thumbnails/18.jpg)
![Page 19: The PROXY Design Pattern Oleksandra Sopova Feb, 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062317/5a4d1b0b7f8b9ab05998b3b4/html5/thumbnails/19.jpg)
![Page 20: The PROXY Design Pattern Oleksandra Sopova Feb, 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062317/5a4d1b0b7f8b9ab05998b3b4/html5/thumbnails/20.jpg)
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
![Page 21: The PROXY Design Pattern Oleksandra Sopova Feb, 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062317/5a4d1b0b7f8b9ab05998b3b4/html5/thumbnails/21.jpg)
Big Picture: creating a dynamic Proxy for the PersonBeanStep one: creating Invocation Handlers
![Page 22: The PROXY Design Pattern Oleksandra Sopova Feb, 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062317/5a4d1b0b7f8b9ab05998b3b4/html5/thumbnails/22.jpg)
![Page 23: The PROXY Design Pattern Oleksandra Sopova Feb, 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062317/5a4d1b0b7f8b9ab05998b3b4/html5/thumbnails/23.jpg)
![Page 24: The PROXY Design Pattern Oleksandra Sopova Feb, 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062317/5a4d1b0b7f8b9ab05998b3b4/html5/thumbnails/24.jpg)
The Proxy Zoo
![Page 25: The PROXY Design Pattern Oleksandra Sopova Feb, 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062317/5a4d1b0b7f8b9ab05998b3b4/html5/thumbnails/25.jpg)
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.
![Page 26: The PROXY Design Pattern Oleksandra Sopova Feb, 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062317/5a4d1b0b7f8b9ab05998b3b4/html5/thumbnails/26.jpg)
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/
![Page 27: The PROXY Design Pattern Oleksandra Sopova Feb, 2014](https://reader035.vdocuments.mx/reader035/viewer/2022062317/5a4d1b0b7f8b9ab05998b3b4/html5/thumbnails/27.jpg)
THANK YOU FOR YOUR ATTENTION