BETAmodules.com is in beta — open to partnerships & joint ventures.Build with us

strategic

v1.2.0RubyGems· Ruby

if/case conditionals can get really hairy in highly sophisticated business domains. Domain model inheritance can help remedy the problem, but you don't want to dump all logic variations in the same domain models. Strategy Pattern solves that problem by externalizing logic variations to separate classes outside the domain models. One difficulty with implementing Strategy Pattern is making domain models aware of newly added strategies without touching their code (Open/Closed Principle). Strategic solves that problem by supporting Strategy Pattern with automatic discovery of strategies and ability fetch the right strategy without conditionals. This allows you to make any domain model "strategic" by simply following a convention in the directory/namespace structure you create your strategies under so that the domain model automatically discovers all available strategies.

The verdict
Abandoned. Last published 4 years ago. No recent activity — look for a maintained alternative.
No recent activity — look for a maintained alternative.
Live from the RubyGems registry · derived rules, not AI
How it scores
MaintenanceAbandoned
PopularityNiche
SecurityClean
LicensePermissive
DepsZero deps
Maintenance
Last published 4 years ago.
Popularity
1.2K downloads / week
Security
No known advisories for this version (OSV).
License
MIT
Dependencies
No runtime dependencies
Recent releases
  • 1.2.04 years ago
  • 1.1.04 years ago
  • 1.0.14 years ago
  • 1.0.05 years ago
  • 0.9.15 years ago
  • 0.9.05 years ago
  • 0.8.06 years ago
strategic — if/case conditionals can get really hairy in highly sophisticated business domains. Domain model inheritance can help remedy the problem, but you don't want to dump all logic variations in the same domain models. Strategy Pattern solves that problem by externalizing logic variations to separate classes outside the domain models. One difficulty with implementing Strategy Pattern is making domain models aware of newly added strategies without touching their code (Open/Closed Principle). Strategic solves that problem by supporting Strategy Pattern with automatic discovery of strategies and ability fetch the right strategy without conditionals. This allows you to make any domain model "strategic" by simply following a convention in the directory/namespace structure you create your strategies under so that the domain model automatically discovers all available strategies. (Ruby / RubyGems) · Modules