Hi everybody,
So, this is the callback interface implemented by the presenter and used by the interactor (I think it's been called PresenterCallbacks on this forum before; it's the interactor output port):
public interface FindMovieResponder {
void matchesFound(Movie movie);
void noMatchesFoundForCriteria(String searchCriteria);
}
This is the interface implemented by the View (the MVP View), which in JSF I implement with a Managed Bean:public interface MovieView {
void displayMatches(String matches);
void displayErrorMessage(String error, String detail);
}
In particular, I've tried to keep the first use-case centric, speaking only the domain language (Movie, criteria), while the second tells how the presenter instructs the view on how to display things.
My main doubt is: is it worth it to have two levels of callback or it overkill / redundant? Maybe I should use return values?
The repository I linked also contains the implementations, I'd be much grateful if you guys would give me your opinions about this design.
Thank you all,
Milad