The first module in this course presents you with the groundwork in preparation for the material that you will be reading.
In this course you will learn what the GOF (Gang of Four) patterns are and how they help solve common problems encountered in object-oriented design.
After completing this course, you'll be able to:
Use creational patterns to create objects when
will not serve your purpose.
Behavioral patterns characterize the ways in which classes or objects interact and distribute responsibility.
You will learn how to use behavioral patterns to reduce complicated flow control.
- Furthermore, you will use behavioral patterns to encapsulate algorithms and dynamically select them at run time.
Structural patterns deal with the composition of classes or objects.
The 2 most common techniques for reusing functionality in object-oriented systems are
Class Inheritance and
You will learn how to use the Gang of Four Pattners (Design Patterns) to replace inheritance
- composition: Creating objects with other objects as members. Composition should be used when
a has-relationship applies
- inheritance: The concept of classes automatically containing the variables and methods defined in their supertypes.
The pattern name is a handle we can use to describe a design problem, its solutions, and consequences.
Naming a pattern immediately increases our design vocabulary. It lets us design at a higher level of abstraction.
Having a vocabulary for patterns lets us talk about these patterns with our co-workers and to ourselves.
It makes it easier to think about designs and to communicate them and their trade-offs to others.