Is it good to have MVVM without a model for temporary things?

Do you think it's architecturally normal to use ViewModel - a modelless view for temporary things?

For example: I want users to enter some paths so that later I can open some files. It makes no sense for me to store the paths anywhere, only the ViewModel, and when the user clicks "Show all files", I then create file models and ViewModels for the View that somehow represent them. So actually my only model is the file model.

+4
source share
3 answers

, , . , . , .

, , View Model View, , . , . , .

, , . , . , .

+7

. -, .
, , , .

+2

Of course. It makes no sense to move the logic of opening the file to a separate object so that you can say that you did it.

0
source

Source: https://habr.com/ru/post/1757371/


All Articles