Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Fyne: Native Mobile UX in Go (github.com/fyne-io)
113 points by wwarner on Feb 10, 2020 | hide | past | favorite | 21 comments



Twas not mobile then, tho.


I'm trying to understand why this project calls itself "based on Material Design"? The example screenshots in the README have nothing that looks like what's widely known as Material Design. (https://material.io/)


They mention themes. Maybe there's a way to attach a material design theme?


How does fyne’s architecture compare to gio[1][2]?

[1] https://gioui.org/ [2] https://news.ycombinator.com/item?id=21186293


This is the easiet native cross platform UI toolkit I ever use.

I'm on a Mac, and only thing I do was `go get` and it is able to build even ios/android version.

Some downside: The UI layout is a bit limit and inflexible. Many callback function basically has no signature at all...

Other than two minor above thing, I was able to go from zero to a fully function desktop app in a week. https://github.com/yeo/bima


Layout is sort of the center of questions I have about it too.

There's a few built-in layout options: https://godoc.org/fyne.io/fyne/layout ... but not many; I think it'd be a stretch to say it's going to provide equivalents to many of the things one can very quickly and easily do in the web with a handful of divs and spans and (don't hit me) tables.

Most of the examples in https://github.com/fyne-io/examples/ don't shed further light on what complex applications might need: everything there appears to be things implemented with very simple and strict grids. Nothing looks like it proves out a feature like tables that are resizable or can automatically choose reasonable sizes based on content, which would be a huge boon for making development as rapid as web platforms can be.

The key interface for making your own layout logic appears to be https://godoc.org/fyne.io/fyne#Layout . The good news: it's definitely something you can implement without forking the core of the library. It looks a little... sparse, though.

Let's say I wanted to implement a system where each object I'm laying out can have collapsible margins, and it's the layout engine's responsibly to figure out the collective resolution of that. Is this interface enough? How would I proceed?

...

Maybe I just need more time with it to see the potential, but it's definitely something I find important to watch out for. I've been burned enough lately by investing time in systems (I'm looking at you, nuklear) just to find their layout primitives are so far off the mark that they're in "start over" territory. And I think we can also look to more ancient history like the Java Swing era to see that "layoutManager" objects that don't have _enough_ interface information to work with are pretty doomed, because they result in whole divergent non-compatible layout suites that the whole application has to opt into, which is just a nightmare for growing a community with reusable code.

Layout is hard. And important.


Same on Windows too. go get.. then you're up and running.


Yup, but I find it somewhat ugly. It would be great if it could mimic platform native widgets like Qt does.


I did get wxWidgets running a while ago, maybe worth trying.


Unfortunately, wxGo is not maintained.


Its pretty good, it is written by the author of "Hands-On GUI Application Development in Go" which covers pretty much every gui option in goland. Its the easiest to use, just use go modules and it compiles without messing around with external dependencies.


I was looking at this last night. I'm interested in setting up a simple project with it -- so far, it looks the most promising to fill the GUI gap.


How easy is it to style these components? I've worked at a lot of IoT companies that run full-blown android just to get access to the UI libraries on android. I've been looking for something high level that can be used to build a completely customized kiosk interface on low end hardware. You shouldn't need a 4core CPU with 2GB of RAM to get reasonably clean user interfaces working.


Qt/QML is commonly used for that. Some companies sell component libraries for it, but many projects just code up custom components in QML.


I'd think Qt on embedded linux could do much the same with a lot less, or littlevgl if you want to go even lower. The cost is in finding good people for a reasonable wage.


You can also use PySlide or PyQT5 to write all the base in Python with Qt components. Python+QT works really well if you build good unit tests. I used it recently to build an mpv front-end:

https://gitlab.com/djsumdog/mpvbuddy/


What are the specific pyqt unit tests? Curious since I use this stack at work.


This looks very interesting. Congrats on the mobile support!

Is there an example Android APK of an app built with Fyne? I had a few issues getting `fyne package` to work with the calculator example[1], despite following the instructions[2]. I'm really curious how it looks/works on mobile.

I suppose any native platform access (sensors, camera, etc.) is out of scope for a UI framework. Any ideas how feasible this is nowadays as a Java/Kotlin/Flutter/Swift alternative? Is there some native bridge layer for Go?

[1]: https://github.com/fyne-io/examples/tree/develop/calculator

[2]: https://github.com/fyne-io/fyne/blob/master/README-mobile.md


I wonder why wxGo (https://github.com/dontpanic92/wxGo) is not maintained.


OpenSnitch was on HN recently and someone wrote an alternative UI[0] for it with Fyne which is interesting.

[0] https://github.com/evilsocket/opensnitch/issues/257




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: