SWEN 383 Software Design Principles & Patterns The Proxy Pattern - - PowerPoint PPT Presentation

swen 383 software design principles patterns the proxy
SMART_READER_LITE
LIVE PREVIEW

SWEN 383 Software Design Principles & Patterns The Proxy Pattern - - PowerPoint PPT Presentation

SWEN 383 Software Design Principles & Patterns The Proxy Pattern Basic Proxy * Overview Joe and Mary want to sign a contract. Joe is in Canada. Mary is in Argentina. * Overview Joe asks Sandy to be a proxy for Mary. Mary asks Pedro to


slide-1
SLIDE 1

SWEN 383 Software Design Principles & Patterns The Proxy Pattern

slide-2
SLIDE 2

*

Basic Proxy

slide-3
SLIDE 3

*

Overview

Joe and Mary want to sign a contract. Joe is in Canada. Mary is in Argentina.

slide-4
SLIDE 4

*

Overview

Joe asks Sandy to be a proxy for Mary. Mary asks Pedro to be a proxy for Joe.

slide-5
SLIDE 5

*

Overview

Joe “agrees with” Sandy as Mary’s stand-in. Mary “agrees with” Pedro as Joe’s stand-in.

slide-6
SLIDE 6

*

Overview

Joe “agrees with” Sandy as Mary’s stand-in. Mary “agrees with” Pedro as Joe’s stand-in.

slide-7
SLIDE 7

*

Overview

Joe and Mary now have a legal contract.

slide-8
SLIDE 8

*

Health-care proxy

Joe needs to make health care decisions for his mother Jane’s surgery. The had a previous agreement through a Health-care proxy

slide-9
SLIDE 9

*

Basic Proxy

What is the primary design issue addressed by the Proxy pattern?

slide-10
SLIDE 10

*

Proxy vs. Adapter

slide-11
SLIDE 11

*

Proxy vs. Adapter

How are proxies and adapters similar?

slide-12
SLIDE 12

*

Proxy vs. Adapter

How are proxies and adapters different?

slide-13
SLIDE 13

*

Virtual Proxy

slide-14
SLIDE 14

*

Virtual Proxy

What is the purpose of a virtual proxy?

Lazy Loading..

slide-15
SLIDE 15

*

slide-16
SLIDE 16

*

Remote Proxy

slide-17
SLIDE 17

*

Remote Proxy

What is the purpose of a Remote proxy?

slide-18
SLIDE 18

*

Remote Proxy

How does a Remote proxy work?

slide-19
SLIDE 19

*

Remote Proxy

How might a remote proxy be used in a browser that manipulates information on a web server?

slide-20
SLIDE 20

*

Remote Proxy

How might a remote proxy be used in a browser that manipulates information on a web server?

Node A Node B

slide-21
SLIDE 21

*

A(proxy) A  A  B

The MAGIC SAUCE!

slide-22
SLIDE 22

*

Protection Proxy

slide-23
SLIDE 23

*

slide-24
SLIDE 24

*

Protection Proxy

What is the purpose of a protection proxy?

slide-25
SLIDE 25

*

Protection Proxy

How could a Protection Proxy be used to control access to the object representing a blog article?