I'm developing an Android app whose architecture is based on Uncle's Bob Clean Architecture, and I've already implemented many of my UseCases/ Interactors without problems until now.
I have the following use case:
Search Room
Main Success Scenario
- System search for rooms based on given parameters
- System joins the user in the room
Extension
Room Not Found
a) System creates a new room based on given parameters
b) System joins the user in the room
So, should I create a single interactor ( SearchOrCreateRoomAndJoin ) or create three interactors ( SearchRoom, CreateRoom, and JoinRoom ) and combine them according to my use case description?
Example:
Room room = searchRoom.execute(roomOptions)
if(room != null){
joinRoom.execute(room)
}else{
Room room = createRoom.execute(roomOptions)
joinRoom.execute(room)
}