# Java Patterns

Netlify Status(opens new window)

The Best practices are called as Design Patterns

# Principles of Design Patterns

  • Composition over inheritance is always preferred.
  • Code for the interface not for implementation.

# Types of Design Patterns

  1. Creational
  2. Structural
  3. Behavioural

# A. Creational Design Pattern

These design patterns are all about class instantiation or object creation.

  1. Singleton
  2. Factory
  3. Abstract factory
  4. Builder
  5. Prototype

# B. Structural Design Patterns

These design patterns are about organizing different classes and objects to form larger structures and provide new functionality.

  1. Adapter
  2. Composite
  3. Proxy
  4. Fly weight
  5. Facade
  6. Bridge
  7. Decorator

# C. Behavioural

Behavioral patterns are about identifying common communication patterns between objects and realize these patterns.

  1. Template Method
  2. Mediator
  3. Chain of Responsibility
  4. Observer
  5. Strategy
  6. Command
  7. State
  8. Visitor
  9. Iterator
  10. Interpreter
  11. Memento
Last Updated: 11/23/2020, 3:47:21 AM