2
votes
2answers
208 views

What do I gain by using the Strategy pattern in this case?

I wrote a program with Java that plays simple music. Currently chords have only one way ('strumming pattern') to be played. I want to expand this and create different 'strumming patterns' that chords ...
0
votes
1answer
71 views

MVC: Where should I store interchangeable algorithms used by the Model (whose names also need to be accessible to the View)?

Please consider a program, where the user chooses an algorithm from a list, and the Strategy pattern is utilized to set this algorithm as the model's operation. For example, an image procession ...
0
votes
1answer
174 views

Implementing a strategy pattern with dependency injection

Okay, so the goal here is to implement a strategy pattern that can be tested using any sort of automated testing tool. I've been struggling with this problem conceptually for a few weeks now and I ...
1
vote
1answer
412 views

Liskov substitution and abstract classes / strategy pattern

I'm trying to follow LSP in practical programming. And I wonder if different constructors of subclasses violate it. It would be great to hear an explanation instead of just yes/no. Thanks much! P.S. ...
0
votes
1answer
312 views

would a composite design pattern be useful for group membership?

I'm trying to think about the best way to handle group memberships on a website. People sign up and select checkboxes in a list of interests. Every week we send out interest-themed emails to those ...
5
votes
3answers
664 views

Can you point me to a nontrivial strategy pattern implementation?

We are faced implementing a registration workflow with many branches. There are three main flows which in some conditions lead to one another. Each flow has at least four different steps; some steps ...
3
votes
4answers
867 views

Can the strategy pattern be overused?

Example: A file, representing a serialized version of an object, needs to be read and deserialized. It would simple to implement this if we only cared about a single serialization format, but many ...