07 - SW Design - Design Patterns - Part3
07 - SW Design - Design Patterns - Part3
▪ Adapter Pattern
▪ Bridge Pattern
▪ Facade Pattern
▪ Proxy Pattern
▪ Observer Pattern
▪ Summary
▪ So, with the help structural design pattern we can target and
change a specific parts of the structure without changing the
entire structure.
▪ Bridge Pattern
▪ Composite Pattern
▪ Decorator Pattern
▪ Facade Pattern
▪ Flyweight Pattern
▪ Proxy Pattern
▪ Now
▪ Then we will need two more classes like SaveCourseInFile and SaveCourseInDB.
▪ As a result:
▪ Business logic of your classes would become tightly coupled to the
implementation details of 3rd-party classes, making it hard to
comprehend and maintain.
▪ Ex: an app that uploads short funny videos to social media could potentially
use a professional video conversion library.
▪ However, all that it really needs is a class with the single method encode(filename,
format).
▪ After creating such a class and connecting it with the video conversion library, you’ll
have your first facade.
▪ A proxy controls access to the original object, allowing you to perform something
either before or after the request gets through to the original object.
▪ Then you update your app so that it passes the proxy object to all of the
original object’s clients.
▪ Upon receiving a request from a client, the proxy creates a real service
object and delegates all the work to it.
▪ The customer could visit the store every day and check
product availability.
▪ Adapter Pattern
▪ Bridge Pattern
▪ Facade Pattern
▪ Proxy Pattern
▪ Observer Pattern