fsprojects-archive/zzarchive-FSharp.Desktop.UI

Collection handling

theor opened this issue · 4 comments

theor commented

Hi,

quick question, how would you handle collections ? Let's say, a list of ToDoItems. I can't find a nice solution.

Thanks !

theor commented

To add some details : adding a MVC per item of a collection seems not trivial, as it would involve composing everytime an item is added to the list, and decomposing when it's removed. So I guess adding a model per item is a better solution.

theor commented

Yes it is, sorry for the duplicate ! Moving over there.

theor commented

As you reopened this issue, I'll answer here.

I saw your comment in the other issue about data templates. Would it be possible instead to just replace the collection in the model with a reactive collection that would expose items added/removed events (Like this list from Rx UI) and then create views/controllers for each item and compose them with the main MVC ?

I have the feeling something like this would be doable, but you surely have a better understanding of your own architecture. However, this is something I could try to implement if you think it is viable.