Download presentation
Presentation is loading. Please wait.
Published byDjaja Sanjaya Modified over 6 years ago
1
Object Oriented Design Patterns - Structural Patterns
IMPORTANT NOTICE TO STUDENTS: These slides are NOT to be used as a replacement for student notes. These slides are sometimes vague and incomplete on purpose to spark class discussions. Object Oriented Design Patterns - Structural Patterns CS 360 Lecture 8
2
Design Pattern Categories
Design Patterns Creational Ways to create objects Behavioral How objects interact with each other Structural How classes and objects are structured
3
Design Pattern Categories
4
Structural Design Patterns
Goal of Structural Design Patterns: Efficiently creating classes and objects that are composed to form larger structures.
5
Structural Design Patterns – Adapter
Intent Convert the interface of a class into another interface clients expect. Adapter lets classes work together that couldn’t otherwise because of incompatible interfaces. Consequences Helps promote code reusability and flexibility. Client classes are not complicated by needing to use multiple interfaces.
6
Structural Design Patterns – Adapter
Update causes a change to Back end services. Create an Adapter to allow Communication between Front end and updated Back end
7
Structural Design Patterns - Facade
Intent Provide an unified interface to a set of interfaces in a subsystem. Defines a higher-level interface that makes the subsystem easier to use. Consequences Shields clients from subsystem components, reducing the number of objects that the client interacts with. Reduces complexity Promotes weak coupling between the subsystem and its clients. Doesn’t prevent clients from using the subsystem, giving them choice.
8
Structural Design Patterns - Facade
9
Structural Design Patterns - Decorator
Intent Attach additional responsibilities to an object dynamically. Provides a flexible alternative to subclassing for extending functionality Consequences More flexibility than static inheritance. Extends the functionality of an object without affecting any other objects. Supports the principle that classes should be open for extension but closed for modification.
10
Structural Design Patterns - Decorator
11
Project Group Activity
Search online content for Structural Design Patterns implemented using languages for your project. Adapter Façade Decorator
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.