CSC/ECE 517 Fall 2012/ch2b 1w61 ps: Difference between revisions
No edit summary |
|||
(57 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
=Facade | =Facade design pattern= | ||
==Scope== | |||
This purpose of this wiki is to provide a "directory" of sites that talk about the Facade design pattern. This page describes the contents of various websites that describe the Facade pattern. A comparison of the sites based on several factors is also provided. In addition to this, several links to online video tutorials are also provided to help the reader understand the pattern better. | |||
==Introduction== | ==Introduction== | ||
[http://en.wikipedia.org/wiki/GOF GoF] definition for facade design pattern is, "Provide a unified interface to a set of interfaces in a subsystem. Facade Pattern defines a higher-level interface that makes the subsystem easier to use." | [http://en.wikipedia.org/wiki/GOF GoF] definition for facade design pattern is, "Provide a unified interface to a set of interfaces in a subsystem. Facade Pattern defines a higher-level interface that makes the subsystem easier to use." | ||
The following list of sites and online videos provide information about the Facade pattern, including the implementation. | |||
==Directory of Sites== | ==Directory of Sites== | ||
=== 1. [http://en.wikipedia.org/wiki/Facade_pattern Facade pattern (Wikipedia)]=== | === 1. [http://en.wikipedia.org/wiki/Facade_pattern Facade pattern (Wikipedia)]=== | ||
=== 2. [http://java.dzone.com/articles/design-patterns-uncovered-1 Design Patterns | This page talks about the usage of the facade pattern. There is also a code example in Java describing the pattern. | ||
Although this page attempts to describe the facade pattern and also has a code example, there is very limited content on the pattern itself. This page does not specify the advantages and disadvantages of using this pattern. Also, there is no mention of the scenarios in which this pattern could be used. A comparison with other similar patterns like Adapter is also missing. | |||
=== 2. [http://java.dzone.com/articles/design-patterns-uncovered-1 Design Patterns at java.dzone.com]=== | |||
This article is well-structured and starts with a real world example of the facade pattern. It also specifies similarities with the Adapter pattern in it's description. It also tells the reader when to use this pattern along with a sequence diagram of the pattern. Finally, it provides a facade pattern code example in Java. This example also has comments to help the reader in understanding the code. The disadvantages of using this pattern are also described towards the end of the article. | |||
=== 3. [http://sourcemaking.com/design_patterns/facade Facade Patterns at sourcemaking.com] === | |||
This article separates the description into several well defined sections which provide a good overall understanding to the reader. The article starts with the need for this pattern and then goes on to describe the pattern pattern with an simple real life example. It also provides a 'Checklist' to guide the developer in implementing the pattern. Subtle differences between Adapter and Facade pattern are also mentioned. A very attractive part of this article is that there are code examples provides for different languages like C#, C++, Delphi, Java and PHP. | |||
=== 4. [http://thecafetechno.com/tutorials/design-patterns/facade-pattern-in-java/ Facade Pattern Tutorial at thecafetechno.com]=== | |||
This page describes the need for using the facade pattern. It also has a good code example for the pattern which is easy to understand. An important section of this article is that it gives several scenarios where the facade pattern could be used. The conclusion describes the advantages of the pattern. An important section that is missing is a comparison with other similar patterns. | |||
=== 5. [http://www.blackwasp.co.uk/Facade.aspx Blackwasp.co.uk]=== | |||
This article describes the ideal usage of the facade pattern and the advantages of this pattern. It also gives a real world example where this pattern is used which gives the reader a better idea about the pattern. There is a generic UML diagram and code example for implementing this pattern. One of the shortcomings of this article is that it doesn't use a practical example for the implementation and only gives a very generic, high-level implementation. | |||
=== 6. [http://userpages.umbc.edu/~tarr/dp/lectures/Facade.pdf Lecture Notes on Facade Pattern]=== | |||
This document starts with the Intent for using the Facade pattern. It then goes on to describe the motivation and applicability for the pattern. The benefits and liabilities have also been mentioned towards the end. Although there is a real world example listed in this document, this document does not attempt to explain this example. Also, there is no code implementation present for this example. | |||
=== 7. [http://www.dofactory.com/Patterns/PatternFacade.aspx#_self2 Facade Pattern at dofactory.com]=== | |||
This page describes a very concise introduction to the Facade pattern. The author explains a brief overview of the pattern and it's usage using UML diagrams. The highlight of the article is a with an explanatory example and then a much more detailed real world example. | |||
=== 8. [http://www.theperlreview.com/Articles/v0i4/facade.pdf Facade Pattern at theperlreview.com] === | |||
This paper is a scholarly article from the e-magazine "The Perl Review" [http://www.theperlreview.com/] by Brian D. Foy. The article entails how the facade pattern is used to promote reusability and to use facades as objects. The article illustrates two different types of implementing the facade pattern - adhoc facades and apriori facades. There are sufficient examples to explain each subsection and all the code samples are in Perl. | |||
=== 9. [http://www.programmersheaven.com/2/Tutorial-Design-Patterns-Structural-Facade Structural Facades]=== | |||
This is an extremely well detailed article that covers a wide variety of aspects ranging from technical definitions to actual real world implications of the facade pattern. It explains the pattern's complexities and intricacies with the help of well defined UML diagrams and actual pseudo-code to convey the idea as lucidly as possible. The article also provides with downloads of sample VB projects using the facade pattern. | |||
=== 10. [http://www.netobjectivestest.com/PatternRepository/index.php?title=TheFacadePattern The Facade Pattern]=== | |||
This article details the Facade pattern and how it fixes real world problems like code in legacy system. It explains with lucid diagrams and illustrations how refactoring old, legacy code are fixed with facades. However, the only shortcoming is that it doesn't have actual code blocks to explain the concepts. | |||
== Video tutorials on Facade pattern == | |||
=== 1. [http://www.youtube.com/watch?v=wFOCmN5zNHA JAVA: Facade Design Pattern by Zane Academy] === | |||
This video talks about the Facade design pattern along with the UML diagram and facade pattern implementation examples from the JDK. It also talks about the advantages and the scenarios in which this pattern can be used. | |||
=== 2. [http://www.youtube.com/watch?v=WLjvNpP6yeQ&feature=related Facade pattern by Mike Abyss]=== | |||
This video explains the Facade pattern in detail along with a walk through of the code example. The link to the code is also provided in the video description. | |||
=== 3. [http://mrbool.com/facade-design-pattern-course-c-4-0-lesson-23/18691 Facade Design Pattern - Course C# 4.0 by Ayad Boudiah] === | |||
This video is from a series of design patterns tutorials using coded samples in C#. It is a step by step screencast that tries to explain the actual working of the facade pattern with a simple example. | |||
=== 4. [https://www.youtube.com/watch?v=B1Y8fcYrz5o Facade Design Pattern by Derek Banas] === | |||
This video describes a step by step approach to implement the facade pattern with the help of a real world bank account example. The narrator has provided with links to the code in the description. | |||
==Comparison == | ==Comparison == | ||
=== '''Comparison of Directory of Sites''' === | |||
{| class="wikitable sortable" style="font-size: 120%; text-align: center; width: auto;" | |||
|- | |||
! Sites|Sites | |||
! Simplicity | |||
! Content Structure | |||
! Comparison with related patterns | |||
! Usage Guidance | |||
! Coded Examples | |||
! Real World Examples | |||
! Advantages and Disadvantages | |||
|- | |||
! [http://en.wikipedia.org/wiki/Facade_pattern #1] | |||
! **** | |||
! *** | |||
! ** | |||
! *** | |||
! ***** | |||
! **** | |||
! | |||
|- | |||
! [http://java.dzone.com/articles/design-patterns-uncovered-1 #2] | |||
! **** | |||
! **** | |||
! ***** | |||
! **** | |||
! **** | |||
! **** | |||
! ***** | |||
|- | |||
! [http://sourcemaking.com/design_patterns/facade #3] | |||
! ***** | |||
! ***** | |||
! ***** | |||
! **** | |||
! ***** | |||
! ***** | |||
! ***** | |||
|- | |||
! [http://thecafetechno.com/tutorials/design-patterns/facade-pattern-in-java/ #4] | |||
! **** | |||
! *** | |||
! *** | |||
! **** | |||
! ***** | |||
! ***** | |||
! ***** | |||
|- | |||
! [http://www.blackwasp.co.uk/Facade.aspx #5] | |||
! ***** | |||
! *** | |||
! **** | |||
! **** | |||
! *** | |||
! | |||
! ***** | |||
|- | |||
! [http://userpages.umbc.edu/~tarr/dp/lectures/Facade.pdf #6] | |||
! ***** | |||
! ***** | |||
! **** | |||
! **** | |||
! *** | |||
! *** | |||
! ***** | |||
|- | |||
! [http://www.dofactory.com/Patterns/PatternFacade.aspx#_self2 #7] | |||
! **** | |||
! **** | |||
! *** | |||
! *** | |||
! | |||
! ***** | |||
! ***** | |||
|- | |||
! [http://www.theperlreview.com/Articles/v0i4/facade.pdf #8] | |||
! ***** | |||
! **** | |||
! | |||
! **** | |||
! ***** | |||
! ***** | |||
! ***** | |||
|- | |||
! [http://www.programmersheaven.com/2/Tutorial-Design-Patterns-Structural-Facade #9] | |||
! **** | |||
! ** | |||
! *** | |||
! **** | |||
! **** | |||
! **** | |||
! **** | |||
|- | |||
! [http://www.netobjectivestest.com/PatternRepository/index.php?title=TheFacadePattern #10] | |||
! ***** | |||
! ***** | |||
! **** | |||
! **** | |||
! **** | |||
! **** | |||
! ***** | |||
|} | |||
=== '''Comparison of Videos''' === | |||
{| class="wikitable sortable" style="font-size: 120%; text-align: center; width: auto;" | |||
|- | |||
! Sites|Videos | |||
! Language | |||
! Simplicity | |||
! Content Structure | |||
! Usage Guidance | |||
! Coded Examples | |||
! Real World Examples | |||
|- | |||
! [http://www.youtube.com/watch?v=wFOCmN5zNHA #1] | |||
! Java | |||
! ***** | |||
! **** | |||
! **** | |||
! *** | |||
! **** | |||
|- | |||
! [http://www.youtube.com/watch?v=WLjvNpP6yeQ&feature=related #2] | |||
! C# | |||
! ***** | |||
! **** | |||
! ***** | |||
! **** | |||
! ***** | |||
|- | |||
! [http://mrbool.com/facade-design-pattern-course-c-4-0-lesson-23/18691 #3] | |||
! C# | |||
! **** | |||
! ***** | |||
! *** | |||
! **** | |||
! **** | |||
|- | |||
! [https://www.youtube.com/watch?v=B1Y8fcYrz5o #4] | |||
! Java | |||
! ***** | |||
! **** | |||
! ***** | |||
! ***** | |||
! ***** | |||
|} | |||
== References== | == References== | ||
# http://en.wikipedia.org/wiki/GOF | # http://en.wikipedia.org/wiki/GOF | ||
# http://www.theperlreview.com/ | |||
# http://en.wikipedia.org/wiki/Facade_pattern | |||
# http://userpages.umbc.edu/~tarr/dp/lectures/ | |||
# http://www.dofactory.com/Default.aspx | |||
# http://www.headfirstlabs.com/books/hfdp/ |
Latest revision as of 01:21, 23 November 2012
Facade design pattern
Scope
This purpose of this wiki is to provide a "directory" of sites that talk about the Facade design pattern. This page describes the contents of various websites that describe the Facade pattern. A comparison of the sites based on several factors is also provided. In addition to this, several links to online video tutorials are also provided to help the reader understand the pattern better.
Introduction
GoF definition for facade design pattern is, "Provide a unified interface to a set of interfaces in a subsystem. Facade Pattern defines a higher-level interface that makes the subsystem easier to use."
The following list of sites and online videos provide information about the Facade pattern, including the implementation.
Directory of Sites
1. Facade pattern (Wikipedia)
This page talks about the usage of the facade pattern. There is also a code example in Java describing the pattern. Although this page attempts to describe the facade pattern and also has a code example, there is very limited content on the pattern itself. This page does not specify the advantages and disadvantages of using this pattern. Also, there is no mention of the scenarios in which this pattern could be used. A comparison with other similar patterns like Adapter is also missing.
2. Design Patterns at java.dzone.com
This article is well-structured and starts with a real world example of the facade pattern. It also specifies similarities with the Adapter pattern in it's description. It also tells the reader when to use this pattern along with a sequence diagram of the pattern. Finally, it provides a facade pattern code example in Java. This example also has comments to help the reader in understanding the code. The disadvantages of using this pattern are also described towards the end of the article.
3. Facade Patterns at sourcemaking.com
This article separates the description into several well defined sections which provide a good overall understanding to the reader. The article starts with the need for this pattern and then goes on to describe the pattern pattern with an simple real life example. It also provides a 'Checklist' to guide the developer in implementing the pattern. Subtle differences between Adapter and Facade pattern are also mentioned. A very attractive part of this article is that there are code examples provides for different languages like C#, C++, Delphi, Java and PHP.
4. Facade Pattern Tutorial at thecafetechno.com
This page describes the need for using the facade pattern. It also has a good code example for the pattern which is easy to understand. An important section of this article is that it gives several scenarios where the facade pattern could be used. The conclusion describes the advantages of the pattern. An important section that is missing is a comparison with other similar patterns.
5. Blackwasp.co.uk
This article describes the ideal usage of the facade pattern and the advantages of this pattern. It also gives a real world example where this pattern is used which gives the reader a better idea about the pattern. There is a generic UML diagram and code example for implementing this pattern. One of the shortcomings of this article is that it doesn't use a practical example for the implementation and only gives a very generic, high-level implementation.
6. Lecture Notes on Facade Pattern
This document starts with the Intent for using the Facade pattern. It then goes on to describe the motivation and applicability for the pattern. The benefits and liabilities have also been mentioned towards the end. Although there is a real world example listed in this document, this document does not attempt to explain this example. Also, there is no code implementation present for this example.
7. Facade Pattern at dofactory.com
This page describes a very concise introduction to the Facade pattern. The author explains a brief overview of the pattern and it's usage using UML diagrams. The highlight of the article is a with an explanatory example and then a much more detailed real world example.
8. Facade Pattern at theperlreview.com
This paper is a scholarly article from the e-magazine "The Perl Review" [1] by Brian D. Foy. The article entails how the facade pattern is used to promote reusability and to use facades as objects. The article illustrates two different types of implementing the facade pattern - adhoc facades and apriori facades. There are sufficient examples to explain each subsection and all the code samples are in Perl.
9. Structural Facades
This is an extremely well detailed article that covers a wide variety of aspects ranging from technical definitions to actual real world implications of the facade pattern. It explains the pattern's complexities and intricacies with the help of well defined UML diagrams and actual pseudo-code to convey the idea as lucidly as possible. The article also provides with downloads of sample VB projects using the facade pattern.
10. The Facade Pattern
This article details the Facade pattern and how it fixes real world problems like code in legacy system. It explains with lucid diagrams and illustrations how refactoring old, legacy code are fixed with facades. However, the only shortcoming is that it doesn't have actual code blocks to explain the concepts.
Video tutorials on Facade pattern
1. JAVA: Facade Design Pattern by Zane Academy
This video talks about the Facade design pattern along with the UML diagram and facade pattern implementation examples from the JDK. It also talks about the advantages and the scenarios in which this pattern can be used.
2. Facade pattern by Mike Abyss
This video explains the Facade pattern in detail along with a walk through of the code example. The link to the code is also provided in the video description.
3. Facade Design Pattern - Course C# 4.0 by Ayad Boudiah
This video is from a series of design patterns tutorials using coded samples in C#. It is a step by step screencast that tries to explain the actual working of the facade pattern with a simple example.
4. Facade Design Pattern by Derek Banas
This video describes a step by step approach to implement the facade pattern with the help of a real world bank account example. The narrator has provided with links to the code in the description.
Comparison
Comparison of Directory of Sites
Sites | Simplicity | Content Structure | Comparison with related patterns | Usage Guidance | Coded Examples | Real World Examples | Advantages and Disadvantages |
---|---|---|---|---|---|---|---|
#1 | **** | *** | ** | *** | ***** | **** | |
#2 | **** | **** | ***** | **** | **** | **** | ***** |
#3 | ***** | ***** | ***** | **** | ***** | ***** | ***** |
#4 | **** | *** | *** | **** | ***** | ***** | ***** |
#5 | ***** | *** | **** | **** | *** | ***** | |
#6 | ***** | ***** | **** | **** | *** | *** | ***** |
#7 | **** | **** | *** | *** | ***** | ***** | |
#8 | ***** | **** | **** | ***** | ***** | ***** | |
#9 | **** | ** | *** | **** | **** | **** | **** |
#10 | ***** | ***** | **** | **** | **** | **** | ***** |
Comparison of Videos
Videos | Language | Simplicity | Content Structure | Usage Guidance | Coded Examples | Real World Examples |
---|---|---|---|---|---|---|
#1 | Java | ***** | **** | **** | *** | **** |
#2 | C# | ***** | **** | ***** | **** | ***** |
#3 | C# | **** | ***** | *** | **** | **** |
#4 | Java | ***** | **** | ***** | ***** | ***** |