fsprojects-archive / zzarchive-FSharp.Desktop.UI

F# MVC framework for WPF.
http://fsprojects.github.io/FSharp.Desktop.UI/
Other
81 stars 21 forks source link

Composition and Interoperability #4

Open StefanBelo opened 9 years ago

StefanBelo commented 9 years ago

I read your fsharp-wpf-mvc-series and you actually have got Mvc.Compose methods in this library as well, and all works fine for composition, but what about interoperability?

Maybe I am wrong but in your samples I could not find any example of such interoperability. In C# projects we use Event Aggregators, how could I achieve similar feature in FSharp.Desktop.UI?

Controllers encapsulate operations pipelined by events associated with views. In interoperability among different modules/views basically controllers already implement operations which are required in interoperability operation.

What are your thoughts? Some kind of EventAggregator or similar like in your controller approach some kind of event translator and controller/model selector?

dmitry-a-morozov commented 9 years ago

The library doesn't have any specific support for Event Aggregators mostly because I was not able to come up with great story for it. But you're right, probably event aggregators can be treated it as external event sources. They can be composed via controller/model selector.