{"id":76018,"date":"2024-05-06T13:08:27","date_gmt":"2024-05-06T17:08:27","guid":{"rendered":"https:\/\/bangla.sitestree.com\/?p=76018"},"modified":"2024-05-06T13:21:08","modified_gmt":"2024-05-06T17:21:08","slug":"java-facade-design-pattern","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=76018","title":{"rendered":"Java: Facade Design Pattern"},"content":{"rendered":"<p><strong>Fa\u00e7ade Pattern<\/strong><\/p>\n<p>\u201cFacade is a structural design pattern that provides a simplified interface to a library, a framework, or any other complex set of classes.\u201d<\/p>\n<p>\u201cWhen you call a shop to place a phone order, an operator is your facade to all services and departments of the shop. The operator provides you with a simple voice interface to the ordering system, payment gateways, and various delivery services.\u201d<\/p>\n<p><strong>For a clear view, click on the images (images are from Wikipedia)<\/strong><\/p>\n\n\t\t<style type=\"text\/css\">\n\t\t\t#gallery-1 {\n\t\t\t\tmargin: auto;\n\t\t\t}\n\t\t\t#gallery-1 .gallery-item {\n\t\t\t\tfloat: left;\n\t\t\t\tmargin-top: 10px;\n\t\t\t\ttext-align: center;\n\t\t\t\twidth: 33%;\n\t\t\t}\n\t\t\t#gallery-1 img {\n\t\t\t\tborder: 2px solid #cfcfcf;\n\t\t\t}\n\t\t\t#gallery-1 .gallery-caption {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\t\t\t\/* see gallery_shortcode() in wp-includes\/media.php *\/\n\t\t<\/style>\n\t\t<div id='gallery-1' class='gallery galleryid-76018 gallery-columns-3 gallery-size-thumbnail'><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='http:\/\/bangla.sitestree.com\/?attachment_id=76019'><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/05\/image-9.png?resize=150%2C150\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='http:\/\/bangla.sitestree.com\/?attachment_id=76020'><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/05\/image-10.png?resize=150%2C150\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" srcset=\"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/05\/image-10.png?resize=150%2C150 150w, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/05\/image-10.png?zoom=2&amp;resize=150%2C150 300w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='http:\/\/bangla.sitestree.com\/?attachment_id=76021'><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/05\/image-11.png?resize=150%2C150\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" srcset=\"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/05\/image-11.png?resize=150%2C150 150w, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/05\/image-11.png?zoom=2&amp;resize=150%2C150 300w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a>\n\t\t\t<\/dt><\/dl><br style=\"clear: both\" \/>\n\t\t<\/div>\n\n<p><strong>Ref: <a href=\"https:\/\/refactoring.guru\/design-patterns\/facade\">https:\/\/refactoring.guru\/design-patterns\/facade<\/a><\/strong><\/p>\n<p><strong><a href=\"https:\/\/en.wikipedia.org\/wiki\/Facade_pattern\">https:\/\/en.wikipedia.org\/wiki\/Facade_pattern<\/a> <\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Fa\u00e7ade Pattern \u201cFacade is a structural design pattern that provides a simplified interface to a library, a framework, or any other complex set of classes.\u201d \u201cWhen you call a shop to place a phone order, an operator is your facade to all services and departments of the shop. The operator provides you with a simple &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=76018\">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-76018","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":78393,"url":"http:\/\/bangla.sitestree.com\/?p=78393","url_meta":{"origin":76018,"position":0},"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":76023,"url":"http:\/\/bangla.sitestree.com\/?p=76023","url_meta":{"origin":76018,"position":1},"title":"Proxy Pattern","author":"Sayed","date":"May 6, 2024","format":false,"excerpt":"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\u2026","rel":"","context":"In &quot;Java Design Patterns and OOP&quot;","block_context":{"text":"Java Design Patterns and OOP","link":"http:\/\/bangla.sitestree.com\/?cat=1962"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/05\/image-13.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":78425,"url":"http:\/\/bangla.sitestree.com\/?p=78425","url_meta":{"origin":76018,"position":2},"title":"Factory Design Pattern: Examples in Java","author":"Sayed","date":"August 28, 2025","format":false,"excerpt":"Observe the code below: ShapeFactory factory = new ShapeFactory(); Shape shape1 = factory.getShape(\"circle\"); Shape shape2 = factory.getShape(\"square\"); Shape shape3 = factory.getShape(\"rectangle\"); shape1.draw(); shape2.draw(); shape3.draw(); We wanted to create objects such as shape1, shape2, and shape 3. We did not directly (create and) call the class for the required objects. We\u2026","rel":"","context":"In &quot;Java Design Patterns and OOP&quot;","block_context":{"text":"Java Design Patterns and OOP","link":"http:\/\/bangla.sitestree.com\/?cat=1962"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":76014,"url":"http:\/\/bangla.sitestree.com\/?p=76014","url_meta":{"origin":76018,"position":3},"title":"Java : Decorator Design pattern","author":"Sayed","date":"May 6, 2024","format":false,"excerpt":"Decorator Design pattern: Decorator is a structural design pattern that lets you attach new behaviors to objects by placing these objects inside special wrapper objects that contain the behaviors. Example: Assume: A notifier class\/object can send only email messages. But the application at a later time may want to use\u2026","rel":"","context":"In &quot;Java Design Patterns and OOP&quot;","block_context":{"text":"Java Design Patterns and OOP","link":"http:\/\/bangla.sitestree.com\/?cat=1962"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/05\/image-8.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/05\/image-8.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/05\/image-8.png?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/05\/image-8.png?resize=700%2C400 2x"},"classes":[]},{"id":66312,"url":"http:\/\/bangla.sitestree.com\/?p=66312","url_meta":{"origin":76018,"position":4},"title":"Java Design Patterns and Examples #Java Short Notes","author":"Author-Check- Article-or-Video","date":"July 18, 2021","format":false,"excerpt":"J2EE core design patterns: Click on a pattern rectangle to explore Data Access Object Transfer Object From: http:\/\/sitestree.com\/?p=4934 Categories:Java Short NotesTags: Post Data:2007-06-04 16:27:01 Shop Online: https:\/\/www.ShopForSoul.com\/ (Big Data, Cloud, Security, Machine Learning): Courses: http:\/\/Training.SitesTree.com In Bengali: http:\/\/Bangla.SaLearningSchool.com http:\/\/SitesTree.com 8112223 Canada Inc.\/JustEtc: http:\/\/JustEtc.net (Software\/Web\/Mobile\/Big-Data\/Machine Learning) Shop Online: https:\/\/www.ShopForSoul.com\/ Medium: https:\/\/medium.com\/@SayedAhmedCanada","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":22529,"url":"http:\/\/bangla.sitestree.com\/?p=22529","url_meta":{"origin":76018,"position":5},"title":"Resources Checked Recently on PHP, OOP, OOD, Java, Angular, Bootstrap, Design Patterns #Root #By Sayed Ahmed #Misc. Reading","author":"Author-Check- Article-or-Video","date":"March 15, 2021","format":false,"excerpt":"Resources Checked Recently on PHP, OOP, OOD, Java, Angular, Bootstrap, Design Patterns http:\/\/www.fluffycat.com\/PHP-Design-Patterns\/PHP-Job-Interview-Questions\/ http:\/\/php.net\/manual\/en\/language.oop5.object-comparison.php http:\/\/www.programmerinterview.com\/index.php\/design-pattern-questions\/design-pattern-interview-questions-and-answers\/ https:\/\/www.glassdoor.co.in\/Interview\/canada-software-developer-interview-questions-SRCH_IL.0,6_IN3_KO7,25.htm http:\/\/www.tutorialspoint.com\/design_pattern\/decorator_pattern.htm http:\/\/www.fluffycat.com\/PHP-Design-Patterns\/ http:\/\/programmers.stackexchange.com\/questions\/7055\/what-is-the-most-frequently-used-design-pattern http:\/\/salearningschool.com\/displayArticle.php?table=Articles&articleID=893 http:\/\/salearningschool.com\/displayArticle.php?table=Articles&articleID=987 Abstract Factory: https:\/\/sourcemaking.com\/design_patterns\/abstract_factory\/php\/2 Decorator Pattern: http:\/\/www.tutorialspoint.com\/design_pattern\/decorator_pattern.htm Singleton: http:\/\/stackoverflow.com\/questions\/8776788\/best-practice-on-php-singleton-classes http:\/\/stackoverflow.com\/questions\/203336\/creating-the-singleton-design-pattern-in-php5\/203359#203359 https:\/\/ttmm.io\/tech\/making-singletons-safe-in-php\/ Java http:\/\/salearningschool.com\/displayArticle.php?table=Articles&articleID=858 http:\/\/stackoverflow.com\/questions\/9948008\/what-is-sapi-and-when-would-you-use-it Cookie - securing Cookie http:\/\/blog.teamtreehouse.com\/how-to-create-totally-secure-cookies http:\/\/salearningschool.com\/displayArticle.php?table=Articles&articleID=1357&title=PHP%20Security%20-%20Guidelines https:\/\/www.quora.com\/What-is-the-difference-between-htmlentities-and-htmlspecialchars-in-PHP http:\/\/stackoverflow.com\/questions\/46483\/htmlentities-vs-htmlspecialchars Prevent CSRF in PHP http:\/\/stackoverflow.com\/questions\/1780687\/preventing-csrf-in-php PHP Security Package:\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\/76018","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=76018"}],"version-history":[{"count":1,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/76018\/revisions"}],"predecessor-version":[{"id":76022,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/76018\/revisions\/76022"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=76018"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=76018"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=76018"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}