You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After a few rewrites of the code, the Feature class has become superfluous.
How it works now:
Feature\Builder accepts and manages Behavior objects.
When Feature\Builder::execute is called, it attaches the correct Behavior to a new Feature object, then calls Feature::execute.
Feature::execute simply delegates to Behavior::execute.
Since the Feature class doesn't really do anything else, it stands to reason that Feature\Builder::execute could just delegate to the correct Behavior::execute method directly, rather than using Feature as a proxy.
The text was updated successfully, but these errors were encountered:
After a few rewrites of the code, the
Feature
class has become superfluous.How it works now:
Feature\Builder
accepts and managesBehavior
objects.Feature\Builder::execute
is called, it attaches the correctBehavior
to a newFeature
object, then callsFeature::execute
.Feature::execute
simply delegates toBehavior::execute
.Since the
Feature
class doesn't really do anything else, it stands to reason thatFeature\Builder::execute
could just delegate to the correctBehavior::execute
method directly, rather than usingFeature
as a proxy.The text was updated successfully, but these errors were encountered: