Skip to content

seniru-dilmith/java-design-patterns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Design Patterns Repository

Introduction to Design Patterns

Design patterns are typical solutions to common problems in software design. Each pattern is like a blueprint that you can customize to solve a particular design problem in your code. They are not finished designs that can be transformed directly into code, but rather templates for how to solve problems that can be used in many different situations.

Design patterns can speed up the development process by providing tested, proven development paradigms. Effective software design requires considering issues that may not become visible until later in the implementation. Reusing design patterns helps to prevent subtle issues that can cause major problems and improves code readability for developers and architects who are familiar with the patterns.

Design patterns are divided into three main categories:

  1. Creational Patterns: These patterns provide various object creation mechanisms, which increase flexibility and reuse of existing code.
  2. Structural Patterns: These patterns explain how to assemble objects and classes into larger structures while keeping these structures flexible and efficient.
  3. Behavioral Patterns: These patterns are concerned with algorithms and the assignment of responsibilities between objects.

image

Contents

Creational Patterns

  1. Abstract Factory (Virtual Constructor)
  2. Builder
  3. Factory Method
  4. Prototype (Clone)
  5. Singleton

Structural Patterns

  1. Adapter (Wrapper)
  2. Bridge
  3. Composite (Object Tree)
  4. Decorator (Wrapper)
  5. Facade
  6. Flyweight (Cache)
  7. Proxy

Behavioral Patterns

  1. Chain of Responsibility (CoR / Chanin of Command)
  2. Command (Action / Transaction)
  3. Iterator
  4. Mediator (Intermediary / Controller)
  5. Memento (Snapshot)
  6. Observer (Event-Subscriber / Listener)
  7. State
  8. Strategy
  9. Template Method
  10. Visitor
  11. Interpreter

Miscs

License

This work is licensed under Creative Commons Zero v1.0 Universal.

About

Design Patterns explained by the Gang of Four book.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages