DEV Community

Discussion on: Understanding SOLID Principles: Open-Closed Principle

Collapse
 
andrespineros profile image
Andrés Felipe Piñeros • Edited

Isn't this the Strategy Pattern? Or a mix between Strategy and dependency injection.

Collapse
 
theodesp profile image
Theofanis Despoudis

Yes it has a lot of similarities. The strategy pattern is used mostly for decisions at runtime, in order for solutions be unblocked by any concrete implementations and work on the interface level only. It is like the concept of policy-based decision making.