Live data from Hacker News

Gio UI – Cross-platform GUI for Go

gioui.org

51–60 of 224 posts

Re: Gio UI – Cross-platform GUI for Go

#51
post #26
post #2

A bit off-topic, but what's the best method to build cross-platform mobile & web apps nowadays ? I'm talking either business logic + UI , or just business logic ? like gomobile, rust, typescript, etc ? At some point i thought about using typescript for all business logic, as it seemed the most portable tech, but i realized there's no good way to have decent performance running javascript on iOS.

In Go land, there's Wails https://wails.io/

What are all the target platforms? The website doesn't have a list, or I'm unable to find one.

EDIT: never mind, I found it https://wails.io/docs/reference/cli#platforms

It doesn't seem to support Android, IOS or web.

Re: Gio UI – Cross-platform GUI for Go

#52
post #49
post #27

Earlier quoted context omitted.

Sure, here you go: https://godbolt.org/#g:!((g:!((g:!((h:codeEditor,i:(filename...

Ah, so extremely localized uses of pointers, got it, thanks.

More or less, yes, but it doesn't have to be extremely local. Here's a variant of the example that introduces a function call boundary:

https://godbolt.org/#g:!((g:!((g:!((h:codeEditor,i:(filename...

Re: Gio UI – Cross-platform GUI for Go

#53
post #23

How does this compare with Fyne?

They both owner-draw every widget themselves (not using platform native widgets). Gio is pure Go, Fyne is cgo. Gio is immediate-mode, Fyne is retained-mode. Flamewar starts here: I don't know why anyone would seriously choose an immediate mode GUI toolkit. When you receive an event, in immediate mode you have to recreate the whole world, then the toolkit has to then either rerender the world from scratch, or else dif…

> Gio is pure Go

7% C is not pure Go.

Re: Gio UI – Cross-platform GUI for Go

#54
post #2

A bit off-topic, but what's the best method to build cross-platform mobile & web apps nowadays ? I'm talking either business logic + UI , or just business logic ? like gomobile, rust, typescript, etc ? At some point i thought about using typescript for all business logic, as it seemed the most portable tech, but i realized there's no good way to have decent performance running javascript on iOS.

Native UI for anything that requires polish. I’ve been through too many iterations of frameworks that promise everything and don’t deliver. You’re up and running faster, then soon after you’re patching the core libraries after an OS update to try to get the FPS closer to native, or match a system animation more closely. The time saving only exist if you never polish your UI.

Core logic can be shared. I use gomobile - mostly love it but 3mb overhead for runtime (so not for web). Kotlin multi platform looked good, but I found it missing pretty basic libraries (which exist for Kotlin Android, so no one is building multi platform equivalents). Rust with Mozilla’s language binding layer looks good but I haven’t tried it.

Re: Gio UI – Cross-platform GUI for Go

#55
post #7
post #2

A bit off-topic, but what's the best method to build cross-platform mobile & web apps nowadays ? I'm talking either business logic + UI , or just business logic ? like gomobile, rust, typescript, etc ? At some point i thought about using typescript for all business logic, as it seemed the most portable tech, but i realized there's no good way to have decent performance running javascript on iOS.

The best option is probably Flutter right now: https://flutter.dev/ If you don't mind writing the UI native, sharing only business logic code, Kotlin is an option: https://kotlinlang.org/docs/multiplatform.html#kotlin-multip... Kotlin also can do the UI if you use Compose: https://www.jetbrains.com/lp/compose-multiplatform/ ... however, iOS support is still in alpha, and Web is "experimental". If you're not willing t…

The one flutter website I have come across is an absolute piece of garbage. Completely destroys the ability to modify or even inspect the HTML source. See for yourself

https://sunrisetv.ch/de/vod/1/details/vod/crid:~~2F~~2Fog.li...

Re: Gio UI – Cross-platform GUI for Go

#56
post #47

Earlier quoted context omitted.

Businesses do seem to like AvaloniaUI and Uno. https://avaloniaui.net/ https://platform.uno/

Thanks, which of the two would people recommend for a C# beginner? And is oidc well supported on all target platforms?

Both frameworks have various packages that add OIDC support to them so that shouldn't be an issue.

As for beginner - there's quite a bit of learning curve in terms of writing GUI applications themselves. Avalonia is kind of like WPF* but good(tm) and cross-platform. Uno platform is more like Xamarin and MAUI except in a better shape as of today. From technical perspective, Avalonia focuses on consistent rendering on all platforms with Skia while Uno tries to use native controls instead. I generally would not advise using Avalonia for mobile over Uno. In mobile case you might actually want to also give MAUI a try as, despite harsh criticism it has been receiving, it has improved significantly.

* either platform supports various declarative UI libraries (that are either part of their ecosystem or community-maintained), so you are not married to XAML thankfully.

Re: Gio UI – Cross-platform GUI for Go

#59
post #2

A bit off-topic, but what's the best method to build cross-platform mobile & web apps nowadays ? I'm talking either business logic + UI , or just business logic ? like gomobile, rust, typescript, etc ? At some point i thought about using typescript for all business logic, as it seemed the most portable tech, but i realized there's no good way to have decent performance running javascript on iOS.

You already answered your own question imo. The web is the best thing we have so far and nothing comes closer to the full package. It literally is write once and write everywhere.

All the other alternatives are young frameworks that have not been battle tested and have weird quirks once you want anything relatively complicated.

Post reply on HN