I am trying to build a simple GUI app in java that will show me the exchange rates for USD with EUR, GBP etc.
The model connects to a URL and scraps the web data to build hashmaps containing exchange rates.
The view has a JcomboBox where the user selects the exchange rate to be displayed in JTextArea.
There is no update to the Model once the program starts. When, the program starts the Main class builds all the necessary objects.
Given these (and there will be no update to the model) is a controller class necessary? It seems that a controller is only used to update the model so I am a bit confused about how to construct this MVC with a controller. Hope this was clear. thanks in advance
I guess the proper solution would require Controller to fetch data from URL, construct Model and push (MVP) or publish (MVC) it to/for View.
But to be honest, do not force MVC if it’s not necessary. After all it is meant to help with managing complex scenarios, if you are in doubt if it even necessary then it probably is not.