https://github.com/techprimers/structural-design-pattern-example
Structural Design Patterns in Java Examples
https://github.com/techprimers/structural-design-pattern-example
Last synced: about 1 year ago
JSON representation
Structural Design Patterns in Java Examples
- Host: GitHub
- URL: https://github.com/techprimers/structural-design-pattern-example
- Owner: TechPrimers
- Created: 2017-12-26T18:11:37.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-03T19:44:44.000Z (over 8 years ago)
- Last Synced: 2025-04-15T17:16:47.987Z (over 1 year ago)
- Language: Java
- Size: 7.81 KB
- Stars: 11
- Watchers: 1
- Forks: 18
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Structural Design Patterns
## Table of Contents
- [Adapter](#adapter)
- [Composite](#composite)
- [Decortor](#decorator)
- [Facade](#facade)
## Adapter
- Bridge between 2 interfaces (Useful when we work with Legacy code)
### Disadvantages
- No new functionalities
- Multiple Adapters
## Composite
- Tree structure
- Component
- Leaf
- Composite
### Disadvantages
- Very costly to create more composite impl
- Overly simple
## Decorator
- Wrapper
- Add functionality or behavior
- Single Responsibility Principle
- Dynamically compose behavior
- Inheritance and Composition
## Disadvantages
- New Class for every feature
- no of objects (more)
- more comples for the clients
## Facade
- Make API easy
- Interface not required
- usually a refactoring pattern
## Disadvantages
- Over usage
- Clean up design pattern