Hello guys, I’ve being studying Golang for a few months, and I got the doubt if there’s anyway to develop a desktop application on golang.
I’m trying to create an model that can work offline and online.
Is there any kind of project or framework to help out this?
P.S.: If I misspell something, let me know pls, I don’t live in a country that has english as mothertongue.
I assume you are asking about GUI applications for desktop computers. Right now, Go supports text-based applications directly, and if you want a graphics toolkit/framework, you will have to look into third-party packages.
It’s Go bindings for Qt (https://www.qt.io/), which is (arguably?) the best way to develop cross-platform GUI desktop applications. And look at the comments on recent updates: It looks like support for WebAssembly is being added! I don’t get excited easily, and to me, this is OMG - Cool!
This web page is about using C/C++ with Qt and WebAssembly, but look what people have done with Qt’s WebAssembly support:
All of this stuff is very new! So don’t expect perfection yet. If you try it and get anything to work, please report back and let us know!
Yeah, Qt seems like an overkill for most things whenever I find myself wanting to add a nice GUI to some program. Every couple of months I check for new graphic solutions in Go and last time I found that package. It’s horribly undocumented, but it being a wrapper for another graphics library the author wrote in C, the code is pretty straightforward and it’s easy to get started quickly.
The other graphics library I played a bit with and want to use more is Pixel, though it’s more oriented to 2D game development. But surely you can make some great GUI with that.
I’d also love some good GUI toolkit, but I don’t think we’ll see an official or community backed one soon, so for now it’s things like this or bindings for Qt, Gtk, etc.
Were many discutions over the time around Go and GUI but i never heard about one mature and complete solution. After nine years i can guess that probably will not be one in the nearest future. Of course are some more or less useful tries but like i always says until a big company will support developing such a toolkit on long term are very small chanses to see something.
Yeah, jayts. I’ve seen your thread about it, I found pretty awesome and in a near future I would like to try.
Atm I’m getting used to golang and its universe. Already start looking for some frameworks for APIs like gin-gonic
But thanks for this clarification. I’m moving to golang (at least to be my main language) from PHP, Java and C#, I know pretty basic stuff about C/C++.
I see, thanks for the sharing. I’m jumping hard in golang now, so I’m still lost in some ways.
I came here from a course in the Udemy, and start to dive into it, see some posts and stuff.
Sure, gtk+ deserves a mention. A few years ago, I was studying the GUI toolkits for C and C++ that were useful for cross-platform (Linux, macOS, Windows) development, and found three contenders: Qt, gtk+, and wxWindows.
Now that I’m programming in Go, I’ve become used to the idea that things should be simple, quick, and fun. I keep wondering if it would be better to focus on a toolkit written in Go that would be cross-platform and work on every platform supported by Go.
(It’s another subject, but I want cross-platform audio support, too. Right now, Qt does that a little, but not yet really well.)
Yeah, I found a lot of tutorials about it and I’m thinking to focus on them, since I’m used to HTML and stuff. But before take a decision, I’ll take a look on all of them one by one.
I think you should try the framework beego or buffalo. Then creating the entire web app you can create a binary file which will run a server on a local port and anybody going to that port can access the web app.
Its very easy and have no limitation. I have tried it and it works fine. Just create a binary and see for yourself. Both have a command for creating binary.