Recently I found interesting articles on design patterns being followed in drupal 8. I wanted to write and list down the points for future reference, may be useful for someone out there.

  1. Design patterns help us right efficient code and as Drupal 8 is following OOPS concepts, Design patterns come handy while developing in Drupal8.
  2. Design Patterns can be called as simple repeatable solutions to the common reoccuring problems faced during programming
  3. Singleton design pattern: used in drupal classes as drupal classes can only be created once.
  4. Factory Design pattern: used in drupal objects creation
  5. mediator design patter
  6. observors and visitors/intorspection and reflection