in the clear architecture, what uncle bob suggested.
I have a lot of questions about how to correctly distribute the responsibility.
it seems that there is no relationship between controller and presenter. the controller's job is to take the input and trigger the use case and the presenter's job is to take the output data provided from the use case and display it on the view.
here it seems that the view very dumb object and its only function is to display the data to the UI, it makes sense in case the controller is invoked by an external agency only.
but how the controller is accessed in the case of the web?. the user interacts with the view so the view should hold the instance of the controller and enough intelligence to invoke the correct methods of the controller. in this case, the view. is not really a dumb object it has the intelligence to how to invoke the controller,
or it's the job of the presenter to invoke the controller? depending upon the Contax and then finally invoke the view to display the data.
or the controller is closely bonded to the view? so that all the intelligence exists in the controller only and the view transfers the raw event and data. But doing so the controller will know too much about the view and will be dependent on the view.
one more question, say suppose after invoking the use case, u
which was success full but the UI want some more data to display the result to the UI.
so where does the logic of fetching more data reside?
is it in the
view
hereafter the use case was successful the use case will invade the presenter, and the presenter will send the msg to view, then the view will request more data from the controller to display?is it in the
Presenter
? so after the use case was successful with the success message. then presenter will invoke the controller to get the additional data to display and pass it to the view.is it in the
controller
? where after getting the success return response from the use case the controller will again invoke the other use case which will display the additional data to the view via presenter.is it in the
use case
?. where the use case will itself decide to send additional data to display to the user, however, I am not convinced with this since it should not be up to the use case to think about which data is being presented, it will bind the use case to the one type of presentation since the same could not be a true presentation, for example, CLI might not require the additional data.
Also who actually creates the controller and presenter, is the main function creating every presenter and controller, or does the high-level controller create the low-level controller and presenter and pass it to the presenter?