swen 383 software design principles & patterns the proxy...
TRANSCRIPT
![Page 1: SWEN 383 Software Design Principles & Patterns The Proxy Patternswen-383/slides/instructor-specific/Martinez/Week1… · PowerPoint Presentation Author: Hawker, J. Scott Created Date:](https://reader034.vdocuments.us/reader034/viewer/2022051606/601d622b71064b7bd6634708/html5/thumbnails/1.jpg)
SWEN 383 Software Design Principles & PatternsThe Proxy Pattern
![Page 2: SWEN 383 Software Design Principles & Patterns The Proxy Patternswen-383/slides/instructor-specific/Martinez/Week1… · PowerPoint Presentation Author: Hawker, J. Scott Created Date:](https://reader034.vdocuments.us/reader034/viewer/2022051606/601d622b71064b7bd6634708/html5/thumbnails/2.jpg)
*
Basic Proxy
![Page 3: SWEN 383 Software Design Principles & Patterns The Proxy Patternswen-383/slides/instructor-specific/Martinez/Week1… · PowerPoint Presentation Author: Hawker, J. Scott Created Date:](https://reader034.vdocuments.us/reader034/viewer/2022051606/601d622b71064b7bd6634708/html5/thumbnails/3.jpg)
*
Overview
Joe and Mary want to sign a contract.
Joe is in Canada.
Mary is in Argentina.
![Page 4: SWEN 383 Software Design Principles & Patterns The Proxy Patternswen-383/slides/instructor-specific/Martinez/Week1… · PowerPoint Presentation Author: Hawker, J. Scott Created Date:](https://reader034.vdocuments.us/reader034/viewer/2022051606/601d622b71064b7bd6634708/html5/thumbnails/4.jpg)
*
Overview
Joe asks Sandy to be a proxy for Mary.
Mary asks Pedro to be a proxy for Joe.
![Page 5: SWEN 383 Software Design Principles & Patterns The Proxy Patternswen-383/slides/instructor-specific/Martinez/Week1… · PowerPoint Presentation Author: Hawker, J. Scott Created Date:](https://reader034.vdocuments.us/reader034/viewer/2022051606/601d622b71064b7bd6634708/html5/thumbnails/5.jpg)
*
Overview
Joe “agrees with” Sandy as Mary’s stand-in.
Mary “agrees with” Pedro as Joe’s stand-in.
![Page 6: SWEN 383 Software Design Principles & Patterns The Proxy Patternswen-383/slides/instructor-specific/Martinez/Week1… · PowerPoint Presentation Author: Hawker, J. Scott Created Date:](https://reader034.vdocuments.us/reader034/viewer/2022051606/601d622b71064b7bd6634708/html5/thumbnails/6.jpg)
*
Overview
Joe “agrees with” Sandy as Mary’s stand-in.
Mary “agrees with” Pedro as Joe’s stand-in.
![Page 7: SWEN 383 Software Design Principles & Patterns The Proxy Patternswen-383/slides/instructor-specific/Martinez/Week1… · PowerPoint Presentation Author: Hawker, J. Scott Created Date:](https://reader034.vdocuments.us/reader034/viewer/2022051606/601d622b71064b7bd6634708/html5/thumbnails/7.jpg)
*
Overview
Joe and Mary now have a legal contract.
![Page 8: SWEN 383 Software Design Principles & Patterns The Proxy Patternswen-383/slides/instructor-specific/Martinez/Week1… · PowerPoint Presentation Author: Hawker, J. Scott Created Date:](https://reader034.vdocuments.us/reader034/viewer/2022051606/601d622b71064b7bd6634708/html5/thumbnails/8.jpg)
*
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
![Page 9: SWEN 383 Software Design Principles & Patterns The Proxy Patternswen-383/slides/instructor-specific/Martinez/Week1… · PowerPoint Presentation Author: Hawker, J. Scott Created Date:](https://reader034.vdocuments.us/reader034/viewer/2022051606/601d622b71064b7bd6634708/html5/thumbnails/9.jpg)
*
Basic Proxy
What is the primary design issue
addressed by the Proxy pattern?
![Page 10: SWEN 383 Software Design Principles & Patterns The Proxy Patternswen-383/slides/instructor-specific/Martinez/Week1… · PowerPoint Presentation Author: Hawker, J. Scott Created Date:](https://reader034.vdocuments.us/reader034/viewer/2022051606/601d622b71064b7bd6634708/html5/thumbnails/10.jpg)
*
Proxy vs. Adapter
![Page 11: SWEN 383 Software Design Principles & Patterns The Proxy Patternswen-383/slides/instructor-specific/Martinez/Week1… · PowerPoint Presentation Author: Hawker, J. Scott Created Date:](https://reader034.vdocuments.us/reader034/viewer/2022051606/601d622b71064b7bd6634708/html5/thumbnails/11.jpg)
*
Proxy vs. Adapter
How are proxies and adapters similar?
![Page 12: SWEN 383 Software Design Principles & Patterns The Proxy Patternswen-383/slides/instructor-specific/Martinez/Week1… · PowerPoint Presentation Author: Hawker, J. Scott Created Date:](https://reader034.vdocuments.us/reader034/viewer/2022051606/601d622b71064b7bd6634708/html5/thumbnails/12.jpg)
*
Proxy vs. Adapter
How are proxies and adapters different?
![Page 13: SWEN 383 Software Design Principles & Patterns The Proxy Patternswen-383/slides/instructor-specific/Martinez/Week1… · PowerPoint Presentation Author: Hawker, J. Scott Created Date:](https://reader034.vdocuments.us/reader034/viewer/2022051606/601d622b71064b7bd6634708/html5/thumbnails/13.jpg)
*
Virtual Proxy
![Page 14: SWEN 383 Software Design Principles & Patterns The Proxy Patternswen-383/slides/instructor-specific/Martinez/Week1… · PowerPoint Presentation Author: Hawker, J. Scott Created Date:](https://reader034.vdocuments.us/reader034/viewer/2022051606/601d622b71064b7bd6634708/html5/thumbnails/14.jpg)
*
Virtual Proxy
What is the purpose of a virtual proxy?Lazy Loading..
![Page 15: SWEN 383 Software Design Principles & Patterns The Proxy Patternswen-383/slides/instructor-specific/Martinez/Week1… · PowerPoint Presentation Author: Hawker, J. Scott Created Date:](https://reader034.vdocuments.us/reader034/viewer/2022051606/601d622b71064b7bd6634708/html5/thumbnails/15.jpg)
*
![Page 16: SWEN 383 Software Design Principles & Patterns The Proxy Patternswen-383/slides/instructor-specific/Martinez/Week1… · PowerPoint Presentation Author: Hawker, J. Scott Created Date:](https://reader034.vdocuments.us/reader034/viewer/2022051606/601d622b71064b7bd6634708/html5/thumbnails/16.jpg)
*
Remote Proxy
![Page 17: SWEN 383 Software Design Principles & Patterns The Proxy Patternswen-383/slides/instructor-specific/Martinez/Week1… · PowerPoint Presentation Author: Hawker, J. Scott Created Date:](https://reader034.vdocuments.us/reader034/viewer/2022051606/601d622b71064b7bd6634708/html5/thumbnails/17.jpg)
*
Remote Proxy
What is the purpose of a Remote
proxy?
![Page 18: SWEN 383 Software Design Principles & Patterns The Proxy Patternswen-383/slides/instructor-specific/Martinez/Week1… · PowerPoint Presentation Author: Hawker, J. Scott Created Date:](https://reader034.vdocuments.us/reader034/viewer/2022051606/601d622b71064b7bd6634708/html5/thumbnails/18.jpg)
*
Remote Proxy
How does a Remote proxy work?
![Page 19: SWEN 383 Software Design Principles & Patterns The Proxy Patternswen-383/slides/instructor-specific/Martinez/Week1… · PowerPoint Presentation Author: Hawker, J. Scott Created Date:](https://reader034.vdocuments.us/reader034/viewer/2022051606/601d622b71064b7bd6634708/html5/thumbnails/19.jpg)
*
Remote Proxy
How might a remote proxy be used
in a browser that manipulates
information on a web server?
![Page 20: SWEN 383 Software Design Principles & Patterns The Proxy Patternswen-383/slides/instructor-specific/Martinez/Week1… · PowerPoint Presentation Author: Hawker, J. Scott Created Date:](https://reader034.vdocuments.us/reader034/viewer/2022051606/601d622b71064b7bd6634708/html5/thumbnails/20.jpg)
*
Remote Proxy
How might a remote proxy be used
in a browser that manipulates
information on a web server?
Node A Node B
![Page 21: SWEN 383 Software Design Principles & Patterns The Proxy Patternswen-383/slides/instructor-specific/Martinez/Week1… · PowerPoint Presentation Author: Hawker, J. Scott Created Date:](https://reader034.vdocuments.us/reader034/viewer/2022051606/601d622b71064b7bd6634708/html5/thumbnails/21.jpg)
*
A(proxy)
A A B
The MAGIC SAUCE!
![Page 22: SWEN 383 Software Design Principles & Patterns The Proxy Patternswen-383/slides/instructor-specific/Martinez/Week1… · PowerPoint Presentation Author: Hawker, J. Scott Created Date:](https://reader034.vdocuments.us/reader034/viewer/2022051606/601d622b71064b7bd6634708/html5/thumbnails/22.jpg)
*
Protection Proxy
![Page 23: SWEN 383 Software Design Principles & Patterns The Proxy Patternswen-383/slides/instructor-specific/Martinez/Week1… · PowerPoint Presentation Author: Hawker, J. Scott Created Date:](https://reader034.vdocuments.us/reader034/viewer/2022051606/601d622b71064b7bd6634708/html5/thumbnails/23.jpg)
*
![Page 24: SWEN 383 Software Design Principles & Patterns The Proxy Patternswen-383/slides/instructor-specific/Martinez/Week1… · PowerPoint Presentation Author: Hawker, J. Scott Created Date:](https://reader034.vdocuments.us/reader034/viewer/2022051606/601d622b71064b7bd6634708/html5/thumbnails/24.jpg)
*
Protection Proxy
What is the purpose of a protection
proxy?
![Page 25: SWEN 383 Software Design Principles & Patterns The Proxy Patternswen-383/slides/instructor-specific/Martinez/Week1… · PowerPoint Presentation Author: Hawker, J. Scott Created Date:](https://reader034.vdocuments.us/reader034/viewer/2022051606/601d622b71064b7bd6634708/html5/thumbnails/25.jpg)
*
Protection Proxy
How could a Protection Proxy be
used to control access to the object
representing a blog article?