Presentation is loading. Please wait.

Presentation is loading. Please wait.

The PROXY Design Pattern Oleksandra Sopova Feb, 2014.

Similar presentations


Presentation on theme: "The PROXY Design Pattern Oleksandra Sopova Feb, 2014."— Presentation transcript:

1 The PROXY Design Pattern Oleksandra Sopova Feb, 2014

2

3

4 Remote method invocation

5

6

7

8 Back to our GumballMachine remote proxy

9

10

11

12

13

14

15

16

17

18

19

20 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

21 Big Picture: creating a dynamic Proxy for the PersonBean Step one: creating Invocation Handlers

22

23

24 The Proxy Zoo

25 Summary The 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.

26 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/

27 THANK YOU FOR YOUR ATTENTION


Download ppt "The PROXY Design Pattern Oleksandra Sopova Feb, 2014."

Similar presentations


Ads by Google