Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standalone Strategies #1312

Open
mariuswilms opened this issue Apr 11, 2017 · 1 comment
Open

Standalone Strategies #1312

mariuswilms opened this issue Apr 11, 2017 · 1 comment

Comments

@mariuswilms
Copy link
Member

Strategies are a powerful concept which could be shining even more. On the other hand is Adaptable overloaded with functionality (it should only really care about adapters).

Strategies have been invented after Adaptable was already in place. Back then it made sense to combine them as only adapter-based Classes wanted to use Strategies (Cache, Session).

  • split strategies from Adaptable
  • allow classes to combine adapters and strategies together (might make both Traits to mix them)
  • allow classes to use just adapters or strategies
  • create a formal concrete Strategy abstract base class, with support for read, write, delete
  • all strategies should inherit from that base class
  • Instead of providing a general helper method to apply strategies (applyStrategies()) that code will be inlined and code wanting to apply strategies, will so directly. This way we don’t have to find a place for such a general helper method and reduce line count.
@mariuswilms
Copy link
Member Author

mariuswilms commented Apr 17, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant