News for hackers. Stuff that matters.
Re:Uno platform: Build single-codebase applications across a... by KronisLV on Wednesday August 17, 2022 @04:51AM (#32493902)
It's always nice to see cross platform UI solutions, even though in general there are always some quirks. Also there's just something nice about being able to preview the supported components online, in a webpage, for example: https://xamlcontrolsgallery.platform.uno/

It even seems to generate proper HTML, instead of using a canvas like some other solutions, which sidesteps a plethora of issues.

That said, loading the gallery meant 24 MB of assets, 6 MB with compression still, which does feel kind of heavy. That said, I kind of understand why, seeing as dotnet.wasm was about 12 MB of that (a bit above 2 MB when compressed).

So in a sense, we're getting close to being the same size as React, Angular and Vue applications, though still an order of magnitude off, which may not be good enough for some.

That said, loading the front page of Reddit (new design) is also about 7 MB of content, so clearly people prioritize the content/looks over download sizes, though the overhead of WASM solutions still cannot be ignored.

On the desktop, however? It feels to me like more non-packaged-webapp options are nice, even like JavaFX/OpenJFX since the performance and resource usage of those can still be better than that of a packaged browser. One might also suggest to always try to use the native options, but I'll take what I can get.

Re:Uno platform: Build single-codebase applications across a... by SeasonalEnnui on Wednesday August 17, 2022 @05:04AM (#32493961)
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.

Re:Uno platform: Build single-codebase applications across a... by jlaban-uno on Wednesday August 17, 2022 @10:23AM (#32496804)
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.

Re:Uno platform: Build single-codebase applications across a... by thegeomaster on Wednesday August 17, 2022 @07:01AM (#32494630)
It freezes up my 5 year old Android phone completely and does not load at all...
Re:Uno platform: Build single-codebase applications across a... by olvy0 on Wednesday August 17, 2022 @04:14PM (#32501154)
Works fine on Opera mobile on my old android phone, after about a 3 minutes load.
Re:Uno platform: Build single-codebase applications across a... by thegeomaster on Thursday August 18, 2022 @08:50AM (#32508892)
If it took 3 minutes to load, it's a stretch to say it works fine ;)
Re:Uno platform: Build single-codebase applications across a... by barbarbar on Wednesday August 17, 2022 @11:53AM (#32497985)
After long time i could view the page. But clicking any item in the menu did not work. Brave on android.
Re:Uno platform: Build single-codebase applications across a... by captainmuon on Wednesday August 17, 2022 @07:56AM (#32495068)
One would think the visuals of WinUI would lend itself to a lean implementaion in HTML.

I think the problem with XAML is, that it is not really declarative. Declarative would be: "I want a list/detail view, and the detail view has the following actions." and then you apply a theme for look&feel. Rather, you quite explicitly place rectangles, borders, and so on, in a scene. In UNO, a button doesn't translate to a HTML button, but to four nested <div>s and a <p>.