We may earn an affiliate commission when you visit our partners.
Trevor Sawler

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.

Read more

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

Enroll now

What's inside

Learning objectives

  • 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

Syllabus

Introduction
About me
Installing Go
Installing Visual Studio Code
Read more
Installing Make
Asking for help
Mistakes. We all make them.
Getting Started with Fyne
Installing the necessary tools
Writing the obligatory "Hello, world!" application
The structure of a Fyne application
Adding a simple container, an entry, and button
First Project: Building a Markdown Editor
What we'll cover in this section
Getting started with the MarkDown editor
Adding a Main Menu to our Application
Making Menu Items Functional: Saving files
Opening files
Adding a filter to the open file command
Making the Save menu item functional
Packaging our application
Writing a simple test for our application
Defining a custom theme
Second Project: GoldWatcher
Setting up our testing environment for db-sqlite.go
Setting up a simple application
Getting started on the user interface
Getting the current price of gold from an external site
Writing tests for our gold prices logic
Creating and returning the prices container
Displaying prices in our application window
Writing a test for the getPriceText function
Creating a toolbar
Writing a test for the toolbar
Adding application tabs
Getting the Gold Price Chart
Creating and returning the priceChart container
Handling the situation when no network is available
Displaying the chart in our application window
Writing a function that will refresh all Gold price information
Enabling the refresh icon in the toolbar
Updating gold prices in the background
Second Project: Part II, Connecting to a database
Setting up a database repository
Implementing a sqlite Repository
Implementing a sqlite repository, continued
Testing our sqlite database repository
Connecting our application to sqlite
Setting up a test repository
Second Project: Part III, populating the holdings tab
Getting started with the holdings tab
Getting the slice of holdings and testing our currentHoldings function and
Testing our getHoldingSlice function
Building the table widget
Getting the information we need in order to refresh the holdings table
Creating the refreshHoldingsTable function
Displaying the holdings table in our application (finally!)
Manually entering some data into sqlite
Changing the container type for our holdings table
Fixing a problem with the delete button
Enabling the add holdings button in the toolbar
Adding validation to our add holdings dialog
Fixing a problem with the way prices display, and writing a simple test
Installing a Makefile
Adding an icon, and building an executable
Setting up preferences for our application
Enabling the preferences icon in the toolbar
For Mac users: Signing our Application through Apple
Installing Xcode, and getting a developer account
Signing our application

Good to know

Know what's good
, what to watch for
, and possible dealbreakers
Covers building cross-platform GUI applications using Fyne, allowing developers to target multiple operating systems from a single Go codebase
Focuses on using Go, a popular language for backend and API development, to create desktop applications, expanding the use cases for Go
Includes instructions on how to sign a Mac OS X application for distribution, which is a practical skill for developers deploying applications on macOS
Demonstrates how to embed a SQLite database into a desktop application, which is useful for applications that need local data storage
Requires installing Xcode and obtaining a developer account to sign applications, which may be a barrier for some learners
Includes writing simple tests for the application, which is a good practice for ensuring the quality and reliability of the application

Save this course

Save Building GUI Applications with Fyne and Go (Golang) to your list so you can find it easily later:
Save

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in Building GUI Applications with Fyne and Go (Golang) with these activities:
Review Go Fundamentals
Solidify your understanding of Go syntax, data structures, and control flow to better grasp the application logic within Fyne.
Browse courses on Go Programming Language
Show steps
  • Review Go syntax and data types.
  • Practice writing simple Go programs.
  • Familiarize yourself with Go's concurrency features.
Practice Basic GUI Concepts
Gain familiarity with GUI concepts like widgets, layouts, and event handling to better understand Fyne's approach.
Browse courses on Graphical User Interface
Show steps
  • Explore different GUI paradigms.
  • Experiment with layout managers.
  • Learn about event-driven programming.
Read "Go Programming Blueprints"
Study real-world Go application examples to understand project structure and best practices applicable to Fyne projects.
Show steps
  • Select a chapter relevant to application development.
  • Study the code examples and explanations.
  • Adapt the concepts to a Fyne application.
Five other activities
Expand to see all activities and additional details
Show all eight activities
Build a Simple Calculator App
Practice using Fyne widgets, layouts, and event handling by building a basic calculator application.
Show steps
  • Design the calculator's user interface.
  • Implement the calculator's logic.
  • Test the calculator's functionality.
Document Your Learning Journey
Reinforce your understanding by documenting your progress, challenges, and solutions while building Fyne applications.
Show steps
  • Create a blog or journal.
  • Document your code and design decisions.
  • Share your learnings with others.
Read "Let's Go!"
Study real-world Go application examples to understand project structure and best practices applicable to Fyne projects.
Show steps
  • Select a chapter relevant to application development.
  • Study the code examples and explanations.
  • Adapt the concepts to a Fyne application.
Contribute to Fyne or Related Projects
Deepen your understanding by contributing to the Fyne project or related open-source Go projects.
Show steps
  • Identify an area for contribution.
  • Submit a pull request with your changes.
  • Participate in code reviews.
Package and Distribute Your Application
Master the process of packaging and distributing Fyne applications for different platforms.
Show steps
  • Package your application for each target platform.
  • Test the installation process.
  • Distribute your application to users.

Career center

Learners who complete Building GUI Applications with Fyne and Go (Golang) will develop knowledge and skills that may be useful to these careers:
Desktop Application Developer
A Desktop Application Developer creates applications that are run on computer operating systems. This course is an excellent fit for someone in this role because it focuses on building desktop applications from the ground up in pure Go using Fyne. The practical nature of the course, which includes building real-world applications like a text editor and a gold investment tracker application, means that students can gain valuable experience relevant to desktop application development. The course also covers how to work with databases, menus, and preferences, which is important for this kind of work.
GUI Developer
A GUI Developer specializes in creating the user interface for applications. This course is directly relevant for a GUI developer because it focuses on building graphical user interfaces using Fyne and Go. The course covers essential skills such as working with the Fyne canvas, using widgets like dialogs and input fields, and arranging components in a window. Moreover, the projects in this course, including a Markdown editor and a gold investment application, offer practical experience in GUI development using the best practices of the framework.
Application Developer
An Application Developer creates software applications that run on various platforms. This course directly relates to this role by teaching students how to build GUI applications using Go and Fyne. The course curriculum, which includes building actual applications like a Markdown editor and a gold investment tracker, gives students the experience necessary to be an effective application developer. This course is particularly helpful because it covers practical aspects of desktop application development such as working with widgets, managing user input, accessing external data, embedding databases, and building executables.
UI Engineer
A UI Engineer builds the interactive parts of user interfaces. This course is very much connected to this role by teaching how to create GUI applications with Go and Fyne. The course covers crucial aspects of UI development, such as implementing widgets, handling user input, and arranging components within a window. The course's projects, including the Markdown editor, directly mirror the kind of tasks a UI engineer might perform. The course provides hands on experience with a non browser based framework.
Independent Software Developer
An Independent Software Developer creates and sells their own software applications. This course could be an ideal fit because it teaches the necessary skills to build entire applications, including desktop applications using Go and Fyne. The course's focus on creating user interfaces, managing data, and building executables can allow developers to create and distribute their own software. The course projects, such as the markdown editor, are excellent practice for creating shippable application.
Cross-Platform Developer
A Cross Platform Developer builds applications that can run on multiple operating systems. This course can be useful because it uses the Fyne framework that allows developers to write code once in Go, and then deploy applications on various platforms including macOS, Windows, Linux, Android and iOS. By teaching how to develop applications that can work seamlessly across different platforms, this course provides students with skills directly related to this role. The course projects, such as building a Markdown editor that runs on all platforms, provide the hands-on experience necessary for success.
Software Engineer
A Software Engineer designs, develops, and maintains software systems. This course may be useful for a software engineer who seeks to expand their skillset to include GUI application development with Go and Fyne. The course covers topics like working with the Fyne canvas and windows, using widgets, fetching external data, and integrating databases, which are all essential components of many desktop applications. By learning how to create two working applications, the course provides valuable hands-on experience in software development.
Full-Stack Developer
A Full Stack Developer works with both the front-end and back-end aspects of applications. This course may be helpful for a full stack developer who wants to add GUI application development to their skillset. While the course focuses on the front-end, it also covers data handling via external API calls and embedded databases, which are aspects of back-end development. By teaching how to build desktop applications using Go and Fyne, the course expands the scope of a full stack developer's capabilities.
Mobile Application Developer
A Mobile Application Developer creates software applications that run on mobile operating systems. This course may be interesting because Fyne allows for the development of mobile applications using Go, including iOS and Android. The course provides a hands-on approach, letting students learn how to create applications that can be deployed on mobile devices. The skills, taught such as working with widgets, forms, and handling user input, are directly transferable to mobile application development. This course provides an alternative to the more traditional frameworks.
Research Software Engineer
A Research Software Engineer develops software tools for research projects. This course may be helpful because it can help develop graphical tools that may be useful in research settings. The course provides the necessary skills to build desktop applications by hand, including collecting and displaying information, and managing data. These skills can be applied to creating custom tools for research projects. This course also covers database integration and managing files.
Software Architect
A Software Architect designs the higher-level structure of software systems. This course may be useful for a software architect who wants to understand the details of implementing GUI applications using Go and Fyne. While software architects don't typically write code, having a deeper understanding of underlying technology helps in making informed design decisions. The course provides insights into GUI application development that could improve architectural planning. It could also be helpful to manage development teams.
Embedded Systems Engineer
An Embedded Systems Engineer develops the software for devices that are not traditional computers. This course may be useful because it uses the Go programming language, which is increasingly popular in embedded systems programming. While the course focuses on GUI applications, its introduction to Go and its features in data manipulation and network interactions are beneficial. In addition, the course covers interacting with databases and building executables which may be relevant.
Backend Developer
A Backend Developer focuses on the server-side logic of applications. While this course primarily focuses on GUI applications, it may be of interest to a backend developer who wishes to expand their understanding of Go. The course uses Go to build desktop applications, and it may be helpful to better understand the framework. The course also involves creating and using databases and fetching external data. These skills could provide an additional perspective for backend development.
Technical Trainer
A Technical Trainer develops and delivers training programs for technical topics. This course may be useful to someone who wants to train others in GUI development with Go and Fyne. Having a practical understanding of Fyne, and experience in app development, is valuable for a trainer. By completing this course, a technical trainer would gain the hands-on knowledge necessary to teach others the principles of GUI application development efficiently.
Database Administrator
A Database Administrator manages and maintains databases. This is somewhat applicable because the course features embedding a sqlite database into a desktop application. While the course is not specifically about database administration, it does provide hands-on experience of what it means to use a database in the context of an application. Gaining this practical knowledge might be useful for someone wanting to work with applications and databases.

Reading list

We've selected two books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Building GUI Applications with Fyne and Go (Golang).
Provides practical examples of building applications in Go, which can be helpful in understanding how to structure a Fyne application. It covers topics such as web applications, data processing, and system administration tools. While not directly focused on GUI development, it offers valuable insights into Go best practices and design patterns. This book is more valuable as additional reading than it is as a current reference.
Provides a comprehensive guide to building web applications in Go, which can be helpful in understanding how to structure a Fyne application. It covers topics such as routing, templating, and database access. While not directly focused on GUI development, it offers valuable insights into Go best practices and design patterns. This book is more valuable as additional reading than it is as a current reference.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Similar courses are unavailable at this time. Please try again later.
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser