Hi! Regarding the MVVM pattern and tornadofx: Wher...
# tornadofx
m
Hi! Regarding the MVVM pattern and tornadofx: Where would be the best place to e.g. query a database for entities? For example, in a todo-app there could be a list of todos as the underlying model. New todos are added via the UI, existing todos are loaded from the database. At the start of the app the list should be filled with the latest todos; the todos to be shown can also be selected via the UI (i.e. all todos for next week). Would the ViewModel save the todos in the database? Or would it just add the todo to the list and both the "backend" (persistence service) and the frontend listen to changes to the list and react to it (for former saves the todo, the latter updates some information). Or one could use the event mechanism offered by tornadofx.