Content deleted Content added
No edit summary Tags: Mobile edit Mobile web edit |
m →External links: HTTP to HTTPS for SourceForge |
||
(8 intermediate revisions by 6 users not shown) | |||
Line 9:
that describe how to solve recurring design problems to design flexible and reusable object-oriented software, that is, objects that are easier to implement, change, test, and reuse.
===What problems can the Proxy design pattern solve?
Source:<ref>{{cite web|title=The Proxy design pattern - Problem, Solution, and Applicability|url=http://w3sdesign.com/?gr=s07&ugr=proble|website=w3sDesign.com|access-date=2017-08-12}}</ref> * The access to an object should be controlled.
* Additional functionality should be provided when accessing an object.
Line 19:
Define a separate <code>Proxy</code> object that
* can be used as a substitute for another object (<code>Subject</code>), and
* implements additional functionality to control the access to this subject.
This makes it possible to work through a <code>Proxy</code> object to perform additional functionality when accessing a subject
To act as a substitute for a subject, a proxy must implement the <code>Subject</code> interface. Clients can't tell whether they work with a subject or its proxy.
See also the UML class and sequence diagram below.
Line 73 ⟶ 72:
{{Commons category}}
* {{cite web |last1=Geary |first1=David |date=2002-02-22 |df=mdy |url=https://www.infoworld.com/article/2074068/take-control-with-the-proxy-design-pattern.html |title=Take control with the Proxy design pattern |work=[[JavaWorld]] |access-date=2020-07-20}}
* [
* {{webarchive |url=https://web.archive.org/web/20120311202925/http://www.netobjectives.com/PatternRepository/index.php?title=AdapterVersusProxyVersusFacadePatternComparison |title=Adapter vs. Proxy vs. Facade Pattern Comparison}}
* [https://sourcemaking.com/design_patterns/proxy Proxy Design Pattern]
|