-
-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Elmish.WPF vs Elmish.Uno #364
Comments
There are 2 main limitations of UWP (which is base of Uno):
There are 2 main differences to WPF:
Elmish.Uno repository is a direct derivative of Elmish.WPF which has around a dozen of atomic commits that migrate Elmish.WPF to be usable with Uno. We have one Elmish.Uno pre-production project working on WASM .NET 3.1 and another preproduction project for iOS. |
There are only a few commits related to the core:
The other commits port samples. |
The other addition I want to be implemented after migration to .NET 5 is https://docs.microsoft.com/en-us/uwp/api/Windows.UI.Xaml.Data.ISupportIncrementalLoading?view=winrt-19041 Where binding will allow to pass a command DU case that will be dispatched if incremental loading is requested |
Interesting. Thanks for sharing all that information. Eventually I will take a close look at your changes. Feel free to suggest ideas that you think would make it easier for you to maintain your project. |
I was managed to migrate to 3.5.7, but not to 4.0.0 (too many changes and absence of |
Yes, we removed How do you want to use |
And now I discovered that @xperiandri also forked unoplatform/Elmish.Uno, which also forked Elmish.WPF (in 2019), quickly added four commits, and has seen no changes since. Let's try to figure out a way keep the present Uno fork of Elmish.WPF going. |
Yes, @jeromelaban did the first prototype on top of version 2. |
Microsoft's Choose your Windows app platform documentation helped me better understand the difference between WPF and Uno. In short, UWP is sort of a successor of WPF. Then Uno is an extension of UWP that adds support for "iOS, Android, macOS, Linux and WebAssembly". |
This is what we do now "Phone" |> Binding.twoWay ((function
| NoneUserInfo -> String.Empty
| EmptyUserInfo (phone, _)
| NewUserInfo (phone, _, _, _)
| ExistingUserInfo (phone, _, _, _, _) -> phone),
InputPhone, throttle) [<AutoOpen>]
module Dispatching =
open System
open Elmish
open FSharp.Control.Reactive
let asDispatchWrapper<'msg> (configure: IObservable<'msg> -> IObservable<'msg>)
(dispatch: Dispatch<'msg>) : Dispatch<'msg> =
let subject = Subject.broadcast
subject |> configure |> Observable.add dispatch
fun msg -> async.Return (subject.OnNext msg) |> Async.Start
let throttle<'msg> = Observable.throttle (TimeSpan.FromMilliseconds 500.) |> asDispatchWrapper<'msg> |
Great. It is "just" throttling. I believe this can be added in a way that is compatible with |
WPF (full pack) -> Silverlight (added VisualStates, removed a lot of stuff) -> Silverlight on WIndows Phone (added additional thread (compositional) for smooth animations) -> WinRT (rewritten in C++ as COM on steroids with much better animation stack, similar to Silverlight) -> WinUI 3 (an attempt to reduce the gap to WPF) |
@TysonMN will you have time this year to discuss and agree on a plan of aligning Elmish.Uno and Elmish.WPF cores so that I can simply do rebase on Elmish.WPF when you add new features and fixes?
|
I can discuss here in GutHub almost every day. Did you have something else in mind? Throttling shouldn't be an issue any more. The "throttling / I am definitely sticking with the linear-time collection merge code (increase of the previous quadratic-time collection merge code). Uno can certainly add to the binding API. Is that what you mean by item 3? I think I understand item 2. Re item 4, my guess is that starting over with v4 is the right move. |
I just discovered that @xperiandri forked Elmish.WPF to create Elmish.Uno. That is great!
I don't know anything about Uno, but I have long thought that much of the code in Elmish.WPF should work for other Microsoft UI frameworks like UWP.
@xperiandri, if you don't mind, could you explain what Uno is and what code differences there are between Elmish.WPF and Elmish.Uno?
The text was updated successfully, but these errors were encountered: