Building GUI Applications with Fyne and Go (Golang)

Learn how to build fast, efficient desktop applications for Mac, Windows and Linux using Go and Fyne.

  • 0.0 (0 Reviews)
  • 0 Students
  • 70 Lessons
  • Trevor Sawler

Course Overview

Many developers are intimidated by the idea of writing a desktop application, and this is probably because of the rise of web based applications. In fact, some university computer science programs do not even devote an entire course to developing GUI applications, and that's unfortunate.

Go, sometimes referred as Golang, has quickly risen in popularity over the past decade, and has become extremely popular for building REST APIs, back end applications, and network software. One question that comes up a great deal online, though, is how one might go about building a desktop application using Go. For quite some time, the default answer was use Qt and CGO bindings, but several years ago a new project emerged -- one that makes it relatively easy to build GUI applications in pure Go: the Fyne project. Fyne is a project is based around the premise that it should be free and simple to develop an application that can run on all platforms without modification or adaptation. Fyne apps are installed like regular applications on all platforms and deliver great performance and solid user experience.

With Fyne, you can write your code once, in pure Go, and deliver applications that run on Mac OSX, Windows, Linux, Android devices, iOS devices, and as WebAssembly in the browser.

This course is intended to cover the basics of building a GUI application in pure Go. We will cover:

Building Desktop applications: we'll build two: a MarkDown editor and an application that allows users to track (fictional) Gold investments and get real-time information on Gold prices.

We will cover:

  • How to work with the Fyne Canvas

  • How to work with Fyne Windows

  • How to use (and customize) Widgets, including dialogs, text, labels, input fields, forms, and tables

  • How to validate user input

  • How to fetch external resources from remote servers and use them in our application

  • How to use containers to arrange things in a window

  • How to embed a sqlite database into a desktop application

  • How to build custom menu items and link them to actions

  • How to read and write files from your application

  • How to read and write preferences

  • How to bundle assets (e.g. images) into a Fyne application

  • How to build a single binary with a custom icon

  • How to sign a Mac OS X application for distribution


See more

FAQ

FAQ area empty

Course curriculum

7 chương 70 bài học 6 giờ 4 phút 7 bài học thử miễn phí
Chương 1 Introduction
Chương 2 Getting Started with Fyne
Chương 3 First Project: Building a Markdown Editor
  • What we'll cover in this section Học thử 1:32
  • Getting started with the MarkDown editor 13:05
  • Adding a Main Menu to our Application 4:23
  • Making Menu Items Functional: Saving files 11:55
  • Opening files 6:07
  • Adding a filter to the open file command 4:44
  • Making the Save menu item functional 3:51
  • Packaging our application 3:52
  • Writing a simple test for our application 7:30
  • Defining a custom theme 3:20
Chương 4 Second Project: GoldWatcher
  • What we'll cover in this section 3:01
  • Setting up a simple application 7:25
  • Getting started on the user interface 6:05
  • Heads up: Goldprice now requires browser-like headers
  • Getting the current price of gold from an external site 11:46
  • Writing tests for our gold prices logic 10:44
  • Creating and returning the prices container 10:29
  • Displaying prices in our application window 3:26
  • Writing a test for the getPriceText function 10:03
  • Creating a toolbar 4:35
  • Writing a test for the toolbar 3:14
  • Adding application tabs 4:33
  • Heads up: the chart image download needs the same browser-like headers
  • Getting the Gold Price Chart 6:52
  • Creating and returning the priceChart container 4:43
  • Handling the situation when no network is available 3:30
  • Displaying the chart in our application window 3:00
  • Writing a function that will refresh all Gold price information 3:37
  • Enabling the refresh icon in the toolbar 1:52
  • Updating gold prices in the background 2:49
Chương 5 Second Project: Part II, Connecting to a database
  • What we'll cover in this section 1:44
  • Setting up a database repository 7:28
  • Implementing a sqlite Repository 11:33
  • Implementing a sqlite repository, continued 6:51
  • Setting up our testing environment for db-sqlite.go 3:55
  • Testing our sqlite database repository 11:56
  • Connecting our application to sqlite 10:08
  • Setting up a test repository 5:02
Chương 6 Second Project: Part III, populating the holdings tab
  • What we'll cover in this section 1:04
  • Getting started with the holdings tab 7:08
  • Getting the slice of holdings and testing our currentHoldings function and 9:46
  • Testing our getHoldingSlice function 1:41
  • Building the table widget 11:25
  • Getting the information we need in order to refresh the holdings table 3:12
  • Creating the refreshHoldingsTable function 2:08
  • Displaying the holdings table in our application (finally!) 2:48
  • Manually entering some data into sqlite 6:12
  • Changing the container type for our holdings table 4:39
  • Fixing a problem with the delete button 4:42
  • Enabling the add holdings button in the toolbar 10:09
  • Adding validation to our add holdings dialog 7:57
  • Fixing a problem with the way prices display, and writing a simple test 6:38
  • Installing a Makefile
  • Adding an icon, and building an executable 2:56
  • Setting up preferences for our application 2:55
  • Enabling the preferences icon in the toolbar 8:55
Chương 7 For Mac users: Signing our Application through Apple
  • What we'll cover in this section 1:16
  • Installing Xcode, and getting a developer account 2:16
  • Signing our application 8:16

Requirment

  • Familiarity with the Go programming language

  • Mac or Windows computer and an Internet connection

Outcomes

  • Learn how to build GUI applications using Go and Fyne

  • Learn how to have your application display common widgets

  • Learn how to save your application state with an embedded database

  • Learn how to have your application call resources on the internet

Instructor

...
Trevor Sawler

0.0

  • ... 0 Student
  • ... 9 Courses
  • ... 0 review

View Details

Reviews

Rate this course :

Remove all