{"id":76023,"date":"2024-05-06T13:17:39","date_gmt":"2024-05-06T17:17:39","guid":{"rendered":"https:\/\/bangla.sitestree.com\/?p=76023"},"modified":"2024-05-06T13:21:08","modified_gmt":"2024-05-06T17:21:08","slug":"proxy-pattern","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=76023","title":{"rendered":"Proxy Pattern"},"content":{"rendered":"<p><strong>Proxy Pattern:<\/strong><\/p>\n<p><strong>\u201cProxy<\/strong> is a structural design pattern that lets you provide a substitute or placeholder for another object. A proxy controls access to the original object, allowing you to perform something either before or after the request gets through to the original object.<strong>\u201d<\/strong><\/p>\n<p><strong>\u201c<\/strong>A credit card is a proxy for a bank account, which is a proxy for a bundle of cash. Both implement the same interface: they can be used for making a payment. A consumer feels great because there\u2019s no need to carry loads of cash around. A shop owner is also happy since the income from a transaction gets added electronically to the shop\u2019s bank account without the risk of losing the deposit or getting robbed on the way to the bank.<strong>\u201d<\/strong><\/p>\n<p><strong>Click on the images to see them clearly.<\/strong><\/p>\n<p><a href=\"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/05\/image-12.png\" rel=\"attachment wp-att-76024\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/05\/image-12.png?resize=750%2C750\" alt=\"\" title=\"image-12-png\" width=\"750\" height=\"750\" class=\"alignnone size-full wp-image-76024\" \/><\/a><\/p>\n<p><strong>\u201c<\/strong>In the above <a href=\"https:\/\/en.wikipedia.org\/wiki\/Unified_Modeling_Language\" title=\"Unified Modeling Language\">UML<\/a> <a href=\"https:\/\/en.wikipedia.org\/wiki\/Class_diagram\" title=\"Class diagram\">class diagram<\/a>, the <code>Proxy<\/code> class implements the <code>Subject<\/code> interface so that it can act as substitute for <code>Subject<\/code> objects. It maintains a reference (<code>realSubject<\/code>) to the substituted object (<code>RealSubject<\/code>) so that it can forward requests to it (<code>realSubject.operation()<\/code>).<strong>\u201d<\/strong><\/p>\n<p><strong>UML Class Diagram<\/strong><\/p>\n<p><a href=\"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/05\/image-13.png\" rel=\"attachment wp-att-76025\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/05\/image-13.png?resize=750%2C750\" alt=\"\" title=\"image-13-png\" width=\"750\" height=\"750\" class=\"alignnone size-full wp-image-76025\" \/><\/a><\/p>\n<p><strong><a href=\"https:\/\/refactoring.guru\/design-patterns\/proxy\">https:\/\/refactoring.guru\/design-patterns\/proxy<\/a><\/strong><\/p>\n<p><strong><a href=\"https:\/\/en.wikipedia.org\/wiki\/Proxy_pattern\">https:\/\/en.wikipedia.org\/wiki\/Proxy_pattern<\/a> <\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Proxy Pattern: \u201cProxy is a structural design pattern that lets you provide a substitute or placeholder for another object. A proxy controls access to the original object, allowing you to perform something either before or after the request gets through to the original object.\u201d \u201cA credit card is a proxy for a bank account, which &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=76023\">Continue reading<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1962,182],"tags":[],"class_list":["post-76023","post","type-post","status-publish","format-standard","hentry","category-java-design-patterns","category---blog","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":65679,"url":"http:\/\/bangla.sitestree.com\/?p=65679","url_meta":{"origin":76023,"position":0},"title":"Creating and Consuming XML Web Services #Misc .Net","author":"Author-Check- Article-or-Video","date":"July 11, 2021","format":false,"excerpt":"Brought from our old-site (this short note can be as old as 2007): http:\/\/salearningschool.com\/displayArticle.php?table=Articles&articleID=1120&title=Creating%20and%20Consuming%20XML%20Web%20Services visual studio .net -> File Menu -> new project -> Visual Basic\/C# projects ->ASP.Net Web Service -> The project will get created Some Files as created: AssemblyInfo.cs\/vb: sharing and reuse in the CLR, Web.config, service1.asmx, service1.asmx.cs\/vb\u2026","rel":"","context":"In &quot;C# - Misc&quot;","block_context":{"text":"C# - Misc","link":"http:\/\/bangla.sitestree.com\/?cat=1973"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":69394,"url":"http:\/\/bangla.sitestree.com\/?p=69394","url_meta":{"origin":76023,"position":1},"title":"Creating and Consuming XML Web Services #24","author":"Author-Check- Article-or-Video","date":"August 20, 2021","format":false,"excerpt":"visual studio .net -> File Menu -> new project -> Visual Basic\/C# projects -> ASP.Net Web Service -> The project will get created Some Files as created: AssemblyInfo.cs\/vb: sharing and reuse in the CLR, Web.config, service1.asmx, service1.asmx.cs\/vb Create web service methods in the asmx.vb\/cs files. A sample web-service method is\u2026","rel":"","context":"In &quot;C# - Misc&quot;","block_context":{"text":"C# - Misc","link":"http:\/\/bangla.sitestree.com\/?cat=1973"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":66328,"url":"http:\/\/bangla.sitestree.com\/?p=66328","url_meta":{"origin":76023,"position":2},"title":"Accessing EJBS from Servlet #Java Short Notes","author":"Author-Check- Article-or-Video","date":"July 18, 2021","format":false,"excerpt":"EJBs can be used to create enterprise applications like banking systems. Clients will interact with such systems for operations like: withdraw cash, transfer cash, pay bills When clients directly access EJBs it poses concerns such as: security risks, firewall blocking, EJB architecture becomes transparent to the clients Servlets can act\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":67450,"url":"http:\/\/bangla.sitestree.com\/?p=67450","url_meta":{"origin":76023,"position":3},"title":"Hibernate: Basic Concepts #Java Short Notes","author":"Author-Check- Article-or-Video","date":"July 22, 2021","format":false,"excerpt":"Hibernate Object Relational Mapping Software ORM qualities: Pure relational, Light object mapping, Medium object mapping, Full object mapping ORM Metadata: ORM metadata provides support for mapping between classes and tables, properties and columns, associations and foreign keys, Java types and SQL types. Full Object Mapping: Supports advanced object modeling: composition,\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":78393,"url":"http:\/\/bangla.sitestree.com\/?p=78393","url_meta":{"origin":76023,"position":4},"title":"Java Design Patterns Simplified","author":"Sayed","date":"August 24, 2025","format":false,"excerpt":"From AI Tools\/OpenAI\/Internet \" Here\u2019s a short, copyright-free version suitable for Facebook or a blog post: Java Design Patterns Simplified Design patterns are proven solutions to common programming problems. They make code more reusable, flexible, and easier to maintain. 1\ufe0f\u20e3 Creational Patterns \u2013 How objects are created.Examples: Singleton, Factory, Builder,\u2026","rel":"","context":"In &quot;Anything JAVA&quot;","block_context":{"text":"Anything JAVA","link":"http:\/\/bangla.sitestree.com\/?cat=1975"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":24369,"url":"http:\/\/bangla.sitestree.com\/?p=24369","url_meta":{"origin":76023,"position":5},"title":"What are some advanced host settings for DNN? #Root","author":"Author-Check- Article-or-Video","date":"April 7, 2021","format":false,"excerpt":"What are some advanced host settings for DNN? Friendly URL Settings Proxy Settings SMTP Server Settings Performance Settings Jquery Settings CDN Settings dddd Client Resource Mgmt Membership Login IP Search Settings From: http:\/\/sitestree.com\/?p=3266 Categories:RootTags:DNN, dot net nuke Post Data:2016-01-23 22:46:07 Shop Online: https:\/\/www.ShopForSoul.com\/ (Big Data, Cloud, Security, Machine Learning): Courses:\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/76023","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=76023"}],"version-history":[{"count":1,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/76023\/revisions"}],"predecessor-version":[{"id":76026,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/76023\/revisions\/76026"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=76023"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=76023"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=76023"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}