Last updated: Sep 24, 25 15:54 UTC | Permalink
5 - Interaction-Level Design Patterns
Learning Objectives:
This lecture is about common patterns for organizing the communication between objects. These are what are often called “OO Design Patterns”. We will see that using such patterns makes OO code more readable and modifiable.
By the end of this lesson, you should be able to
- Explain how patterns capture common solutions and tradeoffs for recurring problems.
- Explain and give an example of each of the following:
- The Demand-Pull pattern
- The Data-Push (aka Listener or Observer) pattern
- The Callback or Handler pattern
- The Typed-Emitter pattern
- Draw a picture or give an example to illustrate each one.
Important Dates:
- Individual Project 1 Due Wednesday, September 17 by 12pm (Noon)
Lecture Slides:
- Interaction-Level Design Patterns Slides PDF, PPT
Activities:
Tutorials
Resources
- Code Examples from Lecture
- Design Patterns: Elements of Reusable Object-Oriented Software (1994) This book is quite dated, but it is a foundational text for object-oriented design. It is available from many sources. You could look it up.
- Freeman & Robson Head First Design Patterns, 2nd Edition This should be available free to you with your student O’Reilly subscription.
- The Node.js Event emitter