lithium icon indicating copy to clipboard operation
lithium copied to clipboard

Standalone Strategies

Open mariuswilms opened this issue 8 years ago • 1 comments

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 avatar Apr 11 '17 06:04 mariuswilms

Early beginnings/ongoing https://github.com/UnionOfRAD/lithium/tree/future/strategy-class

mariuswilms avatar Apr 17 '17 14:04 mariuswilms