The latest news from the Fyne community


Keep up to date with everything we're working on and how the project is shaping up.

Find Out More

2018

2 Drivers and other Statistics

As GitHub recently emailed me with congratulations on 500 commits in Fyne I thought it was time for a quick review of statistics… The project has been under way now for 9 months and we have come a long way from the initial idea. In fact we have:

  • 500 Commits
  • 215 Star gazers
  • 13 Forks
  • 4 Contributors
  • 2 Drivers

What a few months it’s been! Yes the project is gaining momentum and we’re seeing cool new example apps - but the biggest news is the additional driver. We now have a fully functioning OpenGL based driver that can replace the EFL dependency.

If you don’t have EFL installed and/or can’t get it set up then we finally have an alternative. The new driver can be activated using the “gl” tag on any go run or build command for any Fyne based application

go run -tags gl .

This new driver has no external library dependencies which makes it far more portable. Applications built with this new driver will run happily on a different computer to the one it was built on.

Please give it a shot and raise any issues you find - this is going to be a fun new chapter in the Fyne story!

500 Commits


100 Stargazers

It’s been a while since posting on the Fyne blog so I thought I should update on progress. I went to the GitHub page to check the issues, pull requests and project status to see where everything was at. And then I noticed a much larger number than I remember in the repository summary.

Yup, it was the “Stargazers” number - how many GitHub users have starred the repository. We hit 100 when I wasn’t looking :). 8 months after the project started and there are 115 people have marked the project as one they are interested in. It may not be the largest number by any means, and there is a long way to go before we have got the engagement that we reckon can be achieved with this project… But hey - it’s faster than any other project I have worked on (including some larger community efforts too!).

So thanks everyone who is interested, come back often, get involved and let’s make something amazing together!

100 Stars

(image from kisspng)


Running on Gemini

Sorry there have not been many updated here recently - we are looking at lots of other GUI toolkits in Go to get inspiration for the best Fyne possible. Part of this project is looking at bundling, distribution and embedded platforms. And luckily my Gemini indigogo purchase just arrived!

And so I wanted to share with you the Fyne example application running on this fantastic piece of hardware. The base OS is Debian so there was not a log of adaptation necessary. With the next updated to the platform this should work out of the box, but for now it did require a little tweaking for old Go and EFL packages. We’re not sure if this backport is valuble to anyone or if the proof of concept is all we need to push forward toward the release date of the next Gemini Debian Linux release.

Fyne on Gemini

Please get in touch if you’d like to try it yourself and we can publish a branch and some instructions for getting it up and running :)


Drawing a Desktop

As part of our vision to create a beautiful desktop experience we have spent a lot of time setting up the new Fyne graphical toolkit. That project has got to a point now where we can start to use it’s capability to start work on the desktop we’ve been dreaming of! Not only is it part of our goals it is also a great way to test the graphical toolkit as it builds out.

Point and Click

At this stage it’s not much more than an interactive rendering - there is no ability to open windows and move them around, but we think it looks like a start. Check out the screenshot below - what you should be able to identify is a background pattern, mouse cursor and a toolbar that contains a handy clock, launchers and a quit button. Hopefully you like the screenshot below and can see the potential - if you’d like to join in please get in touch!

Fractal window

Desktop and testing

To launch in desktop mode this project uses the Linux DRM (Direct Rendering Manager) subsystem to draw directly to the screen when launched from a console. Once support for wayland window management is added this will be the basis for a true desktop environment.

Until then we wanted a way to test development more easily. If the program detects that it is running within X11 or a running wayland desktop then it loads in embedded mode. That means you can see the desktop in a smaller window in the current desktop. Pretty neat for quick feedback on your work :) (it also happens to be how the screenshot above was taken).


Fun with Fractals: Multithreading for Free!

One of the challenges of using (or writing) a GUI toolkit is concurrency and thread safety. It may not be immediately obvious but threads and concurrent execution are everywhere: you need a renderer to keep the interface looking correct, some event handling to manage user input, a main thread to control the lifecycle of the application and probably more… Even the simplest of apps - a hello world window with a quit button - would potentially spawn a thread to handle the click event.

Toolkits also have various restrictions that ensure things work correctly. For Example, iOS requires that code which updates the user interface is run on the application main thread. Similarly EFL asserts that graphical objects are owned by the main thread which can limit portability. In Fyne we aim to remove these restrictions for developers - it should be possible to influence the GUI from anywhere within an application and have the toolkit work out the rest!

Concurrency

To show off how easy threading is we’ve made a couple of examples - and the most interesting is a fractal renderer. As each pixel of a fractal image can be calculated independently it’s a perfect candidate for multi-threading. Thankfully Fyne has a helpful image type to set up a dynamic rendering - see the NewRaster documentation for the method signature. The renderer for this automatically splits the image into multiple regions that are handled by different threads.

    window.SetContent(canvas.NewRaster(mandelbrot))

If you want to see the content of the mandelbrot method then check the fractal source code. Running it locally should look something like this:

Fractal window

Async Interface Updates

To demonstrate how easy working with multiple application threads can be there is another little demo of a simple RSS reader. If you’re unfamiliar with why updating the user interface can be problematic take a look at this stack overflow thread or many others on the topic - we don’t want developers to worry about which thread their code is running on or how to communicate with the “UI thread”.

Now take a look at the blog example code which spawns a new go routine (this may run on a different thread, depending on many factors) that then updates the user interface. The relevant code is:

    func parse(url string, titleList *widget.List) {
    	feed := gofeed.NewParser().parseURL(url)

    	for i := range feed.Items {
    		buttonList.Append(widget.NewLabel(item.Title))
    	}
    }

    func main() {
    	url := "http://fyne.io/feed.xml"

    	// ...	

    	list := widget.NewList()
    	window.SetContent(list)

    	go parse(url, list)

    	window.Show()
    }

If you run the (full) example you will notice that the list of article titles gets populated after the user interface shows. The downloading and parsing of the feed takes a little time and that should not slow down the user interface. The bonus here is that they async code had no additional complications!


Looking for Contributors

Six weeks into the Fyne project and the basics are all in place! We were tracking the initial phases through the GitHub project Walking Skeleton and the tasks completed a short while ago. Since then the work has been focussed on documentation, the project roadmap and API documentation.

Now things are up and running there’s so much to do. Design, widgets, layout and a richer canvas are all needed to get to the first milestone “UI Toolkit”. With our outlined vision and the documentation in place it should be easy for new developers, designers and testers to get involved.

So we’re putting a shout out to Go developers, UI designers and anyone else interested in building a great new desktop environment to get in touch. For more details check out the contribute page on our website.


Platform Trifecta

You heard right - 3 platforms in only 3 weeks. Fyne now supports Linux, Mac OS X and Windows! Using the EFL for rendering has meant that getting up and running across multiple platforms has been possible even before our first milestone. Having all of them under our belt already means that we’re already in a good position to welcome developers from many backgrounds.

To show off the progress so far the examples repository has now got a calculator app. This works exactly as expected across all supported platfors (well it would - the code is identical!) and looks pretty decent as well. A basic colour scheme was loaded from the material design guidelines in 2 variants - light and dark. So any Fyne app can look great on a light or a dark themed desktop.

That’s everything for now, we leave you with these great screen grabs.

Calculator on Linux Calculator (light) on OS X Calculator (light) on Windows


The First 10 Days of Fyne

It’s been just 10 days since the Fyne project was announced and in that time we’ve had a lot of support! The IRC channel, which we added only a week ago, now has a core group of developers helping to discuss and guide the design of the toolkit. The website is up and running to help visitors understand what the project is about and see our progress. For the more developer oriented there is now a walking skeleton project which is tracking progress towards our first milestone.

In terms of a quick summary we have picked Go as the main language for development and API. The rendering pipeline we are using is EFL, though the details will be hidden completely from the Fyne APIs. Lastly we decided on the use of the Cassowary algorithm for layout - giving an experience similar to the iOS AutoLayout.

The Enlightenment IDE (Edi) has been updated for Go syntax and build lifecycle so anyone already working on EFL apps can continue using the same tooling for now :).

Happy coding and come back soon!

Get In Touch!


We're excited to hear from anyone interested in the project. Whether it's to find out more, provide suggestions or to get involved - drop us a line!

If you would like to join us on slack but are not yet signed up to the golang slack server you can request an invite.