The Proxy pattern Gang of Four description is provided in this video as: Provide a surrogate or placeholder for another object to control access to it. Reynald simplifies the definition as: Provides objects that references other objects for their functionality. He then describes the class diagram for the pattern and provides a real-world example along with its class diagram.
- [Instructor] So, according to the Gang of Four,…the intent for the proxy pattern…is to provide a surrogate or placeholder for another object…to control access to it.…So, what does that really mean?…Simply said, it provides objects that references…other objects for their functionality.…Let's go ahead and take a look at the class diagram.…Now at the middle in the top,…we have a subject, and that defines the common interface…for RealSubject and Proxy so that the proxy can be used…anywhere a real subject is expected.…
At the bottom left-hand side, we have our real subject,…and that defines the real object that the proxy represents.…And to the right of that is the proxy,…which maintains a reference that lets the proxy…access the real subject.…Now to make sense of this,…we're going to demonstrate the proxy pattern…or a math object that's represented…by a calculate proxy object.…That is, where's going to have a proxy that points…to math functionalities…such as addition, subtraction, and multiplication,…but the client won't know about it.…
Author
Released
5/9/2017- Why use design patterns?
- Prototype pattern
- Bridge pattern
- Façade pattern
- Flyweight pattern
- Proxy pattern
- Memento pattern
- State pattern
- Strategy pattern
- Template Method pattern
Skill Level Intermediate
Duration
Views
Related Courses
-
Python: Design Patterns
with Jungwoo Ryoo1h 59m Intermediate -
C# Design Patterns: Part 1
with Reynald Adolphe1h 22m Intermediate -
C# Design Patterns: Part 2
with Reynald Adolphe1h 26m Intermediate
-
Introduction
-
Welcome51s
-
What you should know1m 31s
-
Using the exercise files1m 14s
-
-
1. Design Patterns Overview
-
Why use design patterns?1m 27s
-
2. ProtoType
-
Prototype pattern explained1m 28s
-
-
3. Bridge
-
Bridge pattern explained2m 6s
-
-
4. Façade
-
Façade pattern explained2m 4s
-
Walk through Façade pattern2m 40s
-
-
5. Flyweight
-
6. Proxy
-
Proxy pattern explained1m 33s
-
Walk through Proxy pattern1m 28s
-
-
7. Memento
-
Memento pattern explained1m 41s
-
Walk through Memento5m 16s
-
-
8. State
-
State pattern explained1m 35s
-
-
9. Strategy
-
Strategy pattern explained1m 39s
-
-
10. Template Method
-
Walk through Template Method1m 49s
-
Conclusion
-
Next steps1m
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Proxy pattern explained