Tags

,

links:
– HFDP Strategy

summary:
– given quackBehavior and flyBehavior, instead of having the object inherited or implemented these “behaviors”, it has attributes (composition) of quackBehavior and flyBehavior instead.
– the benefit is that these attributes/objects/behaviors now can be set dynamically at runtime
– it looks pretty like spring DI, with the exception that DI is a framework and can’t changed at runtime

Advertisements