Interactors VS Command [closed]
Asked Answered
B

0

6

I'm building a web api application. I was wondering what is the best way to call the use case layer. One option is use uncle bob's interactors as it described here: Interactors Another option is use command pattern as described here: Command Pattern

The main difference between the solutions at least from my understanding is that in the interactors solution the controller doesn't know the handler, it just sends a request and some interactor will do the job, while in the command option the controller needs to invoke the command.

What do you think is the better solution?

Buffet answered 15/4, 2016 at 13:22 Comment(2)
In the beginning of my projects, I prefer using Interactor since its more lightweight and easy to implement.Divebomb
Without more context, this question is just asking for opinions.Macadam

© 2022 - 2024 — McMap. All rights reserved.