Readit News logoReadit News
jlaban-uno commented on Uno Platform Studio: GUI Designer for Cross-Platform .NET Applications   platform.uno/blog/uno-pla... · Posted by u/AbuAssar
exceptione · 10 months ago
So does that mean you do not use winui calls anymore, but like Avalonia share the same implementation of controls across Linux and Windows?

See the diagrams from here to see what I mean: https://www.codeproject.com/Articles/5366945/Multiplatform-X...

jlaban-uno · 10 months ago
Uno Platform is a cross platform implementation of the WinUI+WinRT APIs. That cross-platform implementation never used the official WinUI/WinAppSDK implementation on Windows.

When running on Windows, which this is where some confusion may lie, you can choose to use the Uno implementation (the netX.0-desktop TFM), or the original WinAppSDK by Microsoft (the netX.0-windows10.YYY TFM), since both implementations share the same API, making user code compatible with either ones.

On the other platforms, Wasm/Linux/iOS/Android/Catalyst/macOS, only the Uno implementation can be used.

jlaban-uno commented on Uno Platform Studio: GUI Designer for Cross-Platform .NET Applications   platform.uno/blog/uno-pla... · Posted by u/AbuAssar
peutetre · 10 months ago
Avalonia draws its own controls and supports themes.

In contrast, Uno uses native controls as much as possible.

jlaban-uno · 10 months ago
Uno Platform Dev here.

Uno currently uses some native controls on mobile iOS/Android/Catalyst (text input, mostly) to provide platform features, but the rest is rendered using graphics primitives. On Web, the same happens where CSS is used for most of the rendering. Input interactions are managed entirely by Uno. This allows to have a visually identical UI across platforms, unless the developer chooses otherwise.

On Desktop targets, Uno is rendering everything on an HW accelerated Skia canvas, with GL/Metal backends.

jlaban-uno commented on Uno Platform Studio: GUI Designer for Cross-Platform .NET Applications   platform.uno/blog/uno-pla... · Posted by u/AbuAssar
ethbr1 · 10 months ago
Note that Blazor has serious deployment problems since ~2021 [0] due to MS picking some idiotic packaging format defaults.

I.e. Let's make it look like a Windows executable! And go ahead and name it .dll! I'm sure no default firewall settings will have an issue with that.

So any wide Blazor app deployment also requires overriding the default packaging and adding obfuscation.

Supposedly that's experimentally fixed in NET 8... [1]

[0] https://github.com/dotnet/aspnetcore/issues/31048

[1] https://github.com/dotnet/aspnetcore/issues/36978#issuecomme... https://github.com/dotnet/runtime/issues/80807

jlaban-uno · 10 months ago
This was fixed in .NET 8 with WebCIL. Uno Platform since .NET 9 is also using it.
jlaban-uno commented on Uno: Create Beautiful Cross Platform .NET Apps Faster   platform.uno/... · Posted by u/thunderbong
humzashahid98 · a year ago
Hi there. Appreciate the response!

I didn't know that the HTML DOM is being used for Uno's web output but that's good to hear. I was under the impression that things were being drawn to canvas (like how Flutter's web output works) but functionality like Ctrl-F (text search) works on https://gallery.platform.uno/, showing that's not the case.

I'm not sure why I had the impression that the web output used HTML canvas, but maybe that was something that changed since I last looked a few years ago or there might be another reason I was mistaken.

I think one misleading thing that gives the wrong impression is that text isn't selectable on Uno's web output (like https://gallery.platform.uno/), similar to how text isn't selectable on HTML canvas.

I think it's worth having a discussion about that with other employees, because it's one divergence from user expectations about how the web usually works (but application developers may also prefer to make text not selectable so it may be the behaviour you want in some cases after all).

jlaban-uno · a year ago
Indeed, text selection is a specific behavior that was chosen to be disabled by default in order to be closer to the original behavior of WinUI on desktop. This is a configurable behavior on the TextBlock control, though.
jlaban-uno commented on Uno: Create Beautiful Cross Platform .NET Apps Faster   platform.uno/... · Posted by u/thunderbong
humzashahid98 · a year ago
Uno wants applications to look the same across platforms (as Flutter does) but still wants to use native controls. So their approach[0] is to have default styling applied to every control which makes the native controls look the same on each device [0].

I think the main benefit with this approach is expected-behaviour (like how different desktop operating systems have different textbox behaviour), and that whatever accessibility you get by default with native controls is there. [1]

I don't really find their approach to GUI development compelling though, with them choosing a middle ground between "wrapper around native controls" and "implement everything yourself".

[0] Except on Linux and web, where Uno draws everything itself, imitating controls that look like GTK (on Linux) or UWP/WinUI (on web). These are the platforms I briefly tested on and I didn't have an enjoyable experience with the output due to non-native/non-expected behaviours.

[1] Page on accessibility: https://platform.uno/docs/articles/features/working-with-acc...

jlaban-uno · a year ago
Uno Maintainer here - Thanks for trying out Uno! At this time, the default render mode is provide a uniform look across platforms, and it's possible to alter the theme using Material, Fluent or Cupertino, or to design your own theme using control template styling, or even use native controls directly where applicable.

On Linux, we've just released our support for X11, removing the need for GTK. As we're drawing the whole app surface, we're always interested in adjust the UX of our controls on individual platforms. If you have examples, let us know.

Finally, for WebAssembly, our current rendering backend is using the HTML DOM, which means that accessibility and other native behaviors are functional. Same here, if anything accessibility related is missing, we're all ears!

jlaban-uno commented on Uno: Create Beautiful Cross Platform .NET Apps Faster   platform.uno/... · Posted by u/thunderbong
rkagerer · a year ago
Is there a "gallery" where I can try out one or two apps developed using this, on different platforms?
jlaban-uno · a year ago
Uno Platform maintainer here - We're maintaining production apps ourselves, like NuGet Package Explorer [1], or Uno Calculator [2], and many third-party apps are in production, with some shown in case studies [3]. You can also find some other tech Wasm demos [4] on our repo.

1: https://nuget.info

2: https://calculator.platform.uno

3: https://platform.uno/case-studies

4: https://github.com/unoplatform/uno#live-webassembly-apps

jlaban-uno commented on Uno: Create Beautiful Cross Platform .NET Apps Faster   platform.uno/... · Posted by u/thunderbong
pjmlp · a year ago
Uno is based on UWP, on Windows it uses the native UWP stack.
jlaban-uno · a year ago
Uno Platform maintainer here - Uno is compatible with both WinAppSDK/WinUI and UWP API sets. Our default project templates have been on WinUI for two years now, UWP mainly being supported for temporary upgrade scenarios to WinUI.
jlaban-uno commented on Uno platform: Build single-codebase applications across all platforms   github.com/unoplatform/un... · Posted by u/nsoonhui
mmastrac · 3 years ago
I'm on a Fairphone 4 using Firefox Mobile. Probably not the most common use case, but it looked like things were failing and I nearly gave up. I'd recommend keeping a few not-cutting-edge CPU devices around and run them with both Chrome and Firefox.
jlaban-uno · 3 years ago
Thanks for the details! We do have lower-end devices to try with, and it's definitely not the best experience. We're currently pinning on the JIT, but troubleshooting is still difficult... much to do in that area.

The native app version of the app generally fares better, even we still have some improvements to make here (the new Android 13 JNI improvements are likely to help us a lot).

jlaban-uno commented on Uno platform: Build single-codebase applications across all platforms   github.com/unoplatform/un... · Posted by u/nsoonhui
mmastrac · 3 years ago
If this is the experience, no thanks. I stared at a blank screen for about 5 seconds on Firefox mobile before the calculator appeared. Almost gave up.
jlaban-uno · 3 years ago
Uno CTO here - We're always chasing performance issues in WebAssembly and I'm curious, are you still seeing the 5 second delay when the app has been loaded once and refreshing? We know that mobile browsers are not particularly efficient with Wasm on mobile devices (particularly iOS), but you may be in a different scenario and/or device.
jlaban-uno commented on Uno platform: Build single-codebase applications across all platforms   github.com/unoplatform/un... · Posted by u/nsoonhui
SeasonalEnnui · 3 years ago
Thanks for the link; does anyone notice a lag when selecting pages, particularly 'Menus and Toolbars'?

I'm generally pro-C# and reducing developer effort however it rubs me the wrong way when simple UIs have lag.

jlaban-uno · 3 years ago
Uno Platform CTO here - About the Xaml Controls Gallery on Wasm, the issue is on our side and we'll update our websites. This specific demo webapp has not been updated in a very long while, and a very recent one to try Uno out is https://gallery.platform.uno for a more accurate representation of the perf/size/features characteristics.

About the payload size of the app, this is still very much a work in progress on all fronts, whether it being missing WebAssembly features, size optimizations on the dotnet front, or linking/trimming (IL and native) opportunities on Uno's generated code side.

On the performance side, threading is coming, AOT (IL to Wasm) is improving significantly in .NET 7 and more coming in .NET 8 to reduce the size of the payload by using newer WebAssembly features (albeit at the expense of older browsers).

As for the menus and toolbars, you can take a look at some our our live samples here: https://playground.platform.uno/#menubar

We know that Wasm-only apps will still be at a disadvantage for while when compared to JS frameworks simply because browsers are offering a lot out of the box (standard JS library, GC, Runtime, HTML layouting/rendering, more advanced JIT, etc...) but that gap may eventually narrow down as Wasm evolves, making the porting and development of webapp using many established language ecosystems an attractive choice.

u/jlaban-uno

KarmaCake day86November 5, 2020View Original