Link Search Menu Expand Document

Let’s build a Gui with Gio

#go, #golang, #gui, #gioui

You want a Gui. Of course you do.

Did you know that Go has a great GUI library called Gio? In this 10-part tutorial we will start completely from scratch, with zero background required, and build a self contained GUI application:

Screenshot of egg_timer

Get started now View it on GitHub

Background

Command-lines are great and all, but let’s face it, 95% of users aren’t power users. They want buttons to push, toggles to switch and simply get on with their lives. Enter Gio - a great toolkit to build stunningly beautiful, lightning fast, flexible interfaces that meet your needs.

Three out of three

For an interface to work, it must be:

  1. Beautiful
    • No one will use an app that looks like #$%$#!”#
  2. Fast
    • Snappy, instant, responsive, immediate, direct
    • Quick to code, easy to test
  3. Flexible
    • Fit your needs, your ideas, your principles
    • Not impose it’s will on you
    • Simple should be simple, complex should be allowed

1 and 2 and 3. Beautiful AND Fast AND Flexible. No compromises.

Just do it

But I don’t know how

Agreed, the official Gio website is a bit advanced. Nice repos exist with many examples, but where to start? If you’re a practical learner, you simply want to get started, code something simple, and learn as you go along. That’s me at least, and if you’re like that too, we’re soulmates.

So let’s just do exactly that. The point here is to build something simple, from the ground up, and touch upon concepts and ideas as we go along. Every step moves us forward, and every new feature builds on something we’ve touched upon before. The goal is to change the initial I don’t know to a more optimistic I don’t know how - yet.

Come along for the ride!

Disclaimer

I really like Gio, I like the people behind it, I sponsor it financially, and I want it to succeed. But I´m by no means an expert. My goal is simply to share what I’ve learned in the hope that you find it useful. Hope that works.

Cheers