CACountInteractor contains business rules
DivineDominion opened this issue · 2 comments
DivineDominion commented
I'm talking about this part:
- (void)decrement
{
if ([self canDecrement])
{
--self.count;
[self sendCount];
}
}
Shouldn't the Interactor delegate to a model object in the domain? I know this would be tedious since the call to increment
would be delegated yet another time. But that's the deal, isn't it?
jeffgilbert commented
The Interactor should contain application-dependent business logic. Entities (i.e. model objects) would contain application-independent business logic.
However, you are right to point out that it might be better to use a model object. I plan to expand this example in the future to include the use of an Entity.
chrisschreiner commented
Please do!