DEV Community

Discussion on: Frequently used design patterns

Collapse
 
rcosteira79 profile image
Ricardo Costeira

It really depends on the domain. The ones I used the most until now are:

  • Singletons for core entity access (maintaining a database connection or a thread manager, for instance);
  • Thread pool for thread managers;
  • Observer and iterator (ReactiveX is awesome);
  • Facade and repository for data access;
  • Adapters for, well, adapting classes to interfaces (used them a lot on Android);
  • Builders and factories for objects with many different parameters and versions;
  • mvp and mvvm as architectural patterns;
  • Strategy and template method because I hate seeing a lot of ifs and switches :)