During my researchs, I found this question here : Applying MVC With JavaFx where James_D is talking about a clear approach about MVP in JavaFX (Full APP here : https://github.com/james-d/SimpleMVP).
I read and understand the code and it really helped me but it is only here a way to "show and propose to edit" data to the user, using binding etc... But what if I want to implement an add feature to the James_D's MVP example ?
Let us supposed that I create a new view, owning DataModel in attribute, with fields reading user input etc... Then I create a new Controller handling this interface and performing task on model. I would need to add a method addPerson(Person p)
in the DataModel just to add a Person to the ObservableList, is that a good idea updating the UI through the model ? (I have been told here JavaFX - MVC Application best practices with database that updating UI through model was not a good practice).
Thank you in advance for you help,
Sincerely, Paul