Top "Strategy-pattern" questions

The Strategy pattern (also known as the policy pattern) is a design pattern whereby an algorithm's behavior can be selected at runtime.

What is the difference between Strategy pattern and Dependency Injection?

Strategy pattern and Dependency Injection both allow us to set / inject objects at run time. What is the difference between …

design-patterns dependency-injection strategy-pattern
Using a Strategy and Factory Pattern with Dependency Injection

I am working on a side project to better understand Inversion of Control and Dependency Injection and different design patterns. …

c# design-patterns dependency-injection factory-pattern strategy-pattern
Strategy vs. Bridge Patterns

I know this question's been asked before (e.g., What is the difference between the bridge pattern and the strategy …

oop design-patterns strategy-pattern bridge
Strategy Pattern V/S Decorator Pattern

I just came across two patterns. Strategy Pattern Decorator Strategy Pattern :- Strategy pattern gives several algorithms that can be …

design-patterns decorator strategy-pattern
What is the difference between Strategy pattern and Visitor Pattern?

I have trouble understanding these two design patterns. Can you please give me contextual information or an example so I …

oop design-patterns strategy-pattern visitor-pattern
Strategy Pattern with different parameters

I came across a problem when using the strategy pattern. I am implementing a service for creating tasks. This service …

java design-patterns strategy-pattern taskservice
Strategy Pattern with Different parameters in interface (C#)

I am basically trying to implement a Strategy pattern, but I want to pass different parameters to the "interfaces" implementation (…

c# design-patterns inheritance abstract-class strategy-pattern
How to specify exceptions to be thrown by an implementor of an interface?

I'm currently developing a solution and have designed it in a way such that it strongly implements the strategy/provider …

c# exception interface dependency-injection strategy-pattern
What's the difference between "Chain of responsibility" and "Strategy" patterns?

I'm raising this question because of another question I asked here on SO some days ago. I had to solve …

design-patterns strategy-pattern chain-of-responsibility
Polymorphism vs Strategy pattern

What is the difference between the Strategy pattern and Polymorphism in Java? I'm confused that whatever is achieved via Strategy …

java design-patterns polymorphism strategy-pattern