Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Introduction to Design Patterns!
You have completed Introduction to Design Patterns!
Preview
Let's take a look at the format of a well-defined Design Pattern as described by the Gang of Four.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
The context is the situation
in which the pattern applies.
0:00
In our adapter design pattern example,
the context is that we have objects,
0:01
the outlet and my hair dryer, that don't
interact the way that we want them to.
0:05
The problem refers to the goal that you
are trying to achieve in this specific
0:10
context as well as any constraints
that may occur in that context.
0:14
Again, I'm traveling, and
I want to use my hair dryer, but I can't.
0:19
The solution is what we are after,
a general design that anyone can apply.
0:24
It resolves the goal and
the set of constraints.
0:29
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up