Golang GUI Client

The scenario called for a desktop app client

Ivan S Kirkpatrick
Level Up Coding
Published in
6 min readMar 29, 2020

--

Photo by Austin Distel on Unsplash

AccTrakII

The project, AccTrakII, is a server app with a PostgreSQL database to track user activity. The initial user interface required a desktop click on an icon to send a RESTful API call to the server. There was no need to handle the server response although an acknowledgment via JSON would eventually be included.

The original idea was to have a collection of desktop icons that would send the API call. This worked fine on the Linux desktop. The server app dutifully collected and handled the inputs. The ability to generate and refresh the desktop icons was easily accomplished via a downloadable bash script. This script removed the older icons and put new ones in place. Each icon represented an activity or task for the user. Common activities or tasks were Email, Meetings, Lunch, Coffee breaks, Coding, Testing,

Although this worked on Linux machines, users on MacOS or Windows might not find it so convenient. Various suggestions were discussed regarding a small desktop client development effort. As a Golang proponent, I considered some enhancements to the command line only client that I had developed for testing purposes. This client ran on the local desktop and sent RESTful API calls to simulate a user interacting with the server. Easy to manage, operate, and deal with. No muss, no fuss. It did exactly what it was supposed to do.

Guitrak Client

Now, how do I turn this idea into a more fully developed part of the application? I had to consider a few new aspects of just how this would be implemented. The first thing to do was to name this new client. Since it was mine and my decision, I named her guitrak. Although there are many different ways and technologies that could be brought to bear my insistence on a Golang based approach meant I had to have some kind of Golang GUI toolkit. A quick search turned up the Fyne.Io library. This looked to be everything I needed to get started with and held out the promise of being useful for both Android and iOS mobile work. I have not done a lot of GUI work other than a few web pages and definitely do not consider myself to have any artistic abilities. Nevertheless, I wanted to give it a shot and see what could be done.

--

--

Engineer and veteran, 13 years of Design Engineering, 20+ years in Software Engineering, Go enthusiast. I read a lot, write some too, ivank2139@tessaract.net