Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CACountInteractor contains business rules #2

Open
DivineDominion opened this issue Jun 10, 2014 · 2 comments
Open

CACountInteractor contains business rules #2

DivineDominion opened this issue Jun 10, 2014 · 2 comments

Comments

@DivineDominion
Copy link

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
Copy link
Contributor

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
Copy link

Please do!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants