An open API service indexing awesome lists of open source software.

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

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