Submitted Successfully!
To reward your contribution, here is a gift for you: A free trial for our video production service.
Thank you for your contribution! You can also upload a video entry or images related to this topic.
Version Summary Created by Modification Content Size Created at Operation
1 handwiki -- 1065 2022-10-24 01:33:37

Video Upload Options

Do you have a full video?

Confirm

Are you sure to Delete?
Cite
If you have any further questions, please contact Encyclopedia Editorial Office.
HandWiki. Fyne. Encyclopedia. Available online: https://encyclopedia.pub/entry/30827 (accessed on 19 June 2024).
HandWiki. Fyne. Encyclopedia. Available at: https://encyclopedia.pub/entry/30827. Accessed June 19, 2024.
HandWiki. "Fyne" Encyclopedia, https://encyclopedia.pub/entry/30827 (accessed June 19, 2024).
HandWiki. (2022, October 24). Fyne. In Encyclopedia. https://encyclopedia.pub/entry/30827
HandWiki. "Fyne." Encyclopedia. Web. 24 October, 2022.
Fyne
Edit

Fyne is a free and open-source cross-platform widget toolkit for creating graphical user interfaces (GUIs) across desktop and mobile platforms. Fyne uses OpenGL to provide cross-platform graphics. It is inspired by the principles of Material Design to create applications that look and behave consistently across all platforms. It is licensed under the terms of the 3-clause BSD License, supporting the creation of free and proprietary applications. In December 2019 Fyne became the most popular GUI toolkit for Go, by GitHub star count and in early February 2020 it was trending as #1 project in GitHub trending ranks.

opengl cross-platform free and open-source

1. Development

Fyne is currently developed by a team of volunteers and is supported by around 40 contributors.[1] Members of this group also work on the FyneDesk project to create a new Linux desktop environment.[2]

The Fyne toolkit is written primarily in Go.[3] The team focuses on clean APIs and follows the principles of Clean Code to sustain maintainability of the project.[4] All Fyne projects are continuously tested to check correctness, stability as well as formatting and documentation.[5][6]

2. Example

The code required for a simple "Hello World" application is minimal, as follows:

package main import ( "fyne.io/fyne/v2/app" "fyne.io/fyne/v2/container" "fyne.io/fyne/v2/widget" ) func main() { a := app.New() w := a.NewWindow("Hello") hello := widget.NewLabel("Hello Fyne!") w.SetContent(container.NewVBox( hello, widget.NewButton("Hi!", func() { hello.SetText("Welcome :)") }), )) w.ShowAndRun() }

To build this application you will need the Go language and a C compiler installed, as well as a graphics driver that supports OpenGL. It can be built and run using the command: $ go run main.go

3. Design

Design of the Fyne API and user interface components follows a careful process to ensure the simplicity.[7] The Fyne toolkit is built in various layers, with each in separate packages. Notable layers include:[8]

3.1. API

API, or Application programming interface, is an interface or protocol that allows for communication across different parts of the software. Fyne has a self-documenting API that is also extensible resulting in the ability for each developer to create custom tools unique to their project that will mesh with Fyne itself.

3.2. Vector Graphics

The use of vector graphics to paint the UI provides a method of adapting to different device and display sizes without losing image fidelity. This allows the programmer to only need to create the UI once and it will look as expected on any device.

3.3. Hierarchy

Canvas

Canvas contains all of the contents of a window ranging from the full screen to a group of CanvasObjects.

CanvasObject

CanvasObjects are what actually get rendered on screen such as Text, Rectangle, Line. The objects store size, position and color information for the rendering process.

Container

Containers are groups of CanvasObjects, each container can specify a layout which will contain the sizing and position of its child components. Layouts help the developer arrange components in a manner that response to the container or window size, with several layout types provided including Border, Center, and Grid.

Widget

All of the components of a window in a CanvasObject are widgets that contain standard user interface elements. Fyne widgets include but are not limited to UI basics such as: Button, Check, Form, Hyperlink, Label, Radio, Select and Toolbar as well as container widgets like AppTabs and Split. Since 1.4 there are additional collection widgets that provide high-performance presentation of large data in a List, Table or Tree view. All the built-in UI widgets ensure that standard aspects of GUI interactivity act in a predictable and expected way across applications. This helps improve quality of programs while assisting the programmer by removing the need for them to create these tools themself.

3.4. Packages

All components of Fyne are split into packages and then connected via the API to create a final GUI application. In addition to the canvas, layout, and widget packages, notable packages include:

  • App package which is the main entry point for the app which manages understanding the type of device the application is running on and ensures the code will run as expected on that device.
  • Test package enabling test-driven development to validate the GUI itself functions as expected.

4. Use

The largest project currently using the Fyne toolkit is the FyneDesk project, a complete desktop environment for Linux.[9]

There are many other applications being built using the toolkit, those that are open source can be found in an application listing[10] website managed by the project.

Many businesses are using the Fyne toolkit to quickly add a graphical user interface to command line tools which they have already built using Go.

5. Releases

  • 2.1 - RichText, DocTabs and document storage[11]
    • Added DocTabs, RichText and CheckGroup widgets
    • New Lifecycle and Document Storage APIs
    • Include http and https in standard repositories
    • Add FyneApp.toml metadata file to ease build commands
    • Add keyboard support for menus, pop-ups and buttons
  • 2.0 - Data binding, storage repositories and animation[12]
    • Added data binding for keeping widgets in sync with data sources
    • Added storage repository API for filestore abstraction, add file and in-memory implementations
    • Added an animation API and use it for various UI animations
    • Updated theme API and visuals with re-design for Entry, Select and Form components
    • Add scrolling and tab support to Entry
    • Removed many deprecated APIs and types and moved coordinate system from int to float32
  • 1.4 - Collections widgets and theme refresh[13]
    • Added Card, FileItem, List, Separator, Table and Tree Widgets
    • ColorPicker dialog
    • User selection of primary colour
    • Add input validation
  • 1.3 - File Dialogs[14]
    • File open and save dialogs
    • Added notifications support
    • Added Accordion, TextGrid and SplitContainer widgets
    • Text wrap support
    • URI type and handlers for cross-platform data access
  • 1.2 - Mobile Support[15]
    • Addition of Mobile support (iOS and Android)
    • Addition of support for Raspberry Pi devices (and other OpenGL ES devices)
    • BaseWidget introduced to simplify creation of custom widgets
  • 1.1 - Feature Release[16]
    • MenuBar, PopUpMenu, Select widgets added
    • Gradient primitive added and shadows introduced
    • Added support for text selection
    • Support for disabling widgets
    • Tab / Shift-Tab introduced to rotate focused elements
  • 1.0 - First Major Release[17]
    • Introduced canvas API for drawing primitives
    • Introduced widget API including Box, Button, Check, Entry, Form, Group, Hyperlink, Icon, Label, ProgressBar, Radio, Scroller, TabContainer and Toolbar
    • Light and dark themes for user interface
    • Support for Linux, macOS and Windows operating systems

6. Criticism

Issue 299 of Golang Weekly noted the new mobile support from the Fyne project but suggested the design aesthetic was less Material Design and more "generally Linux-y".[18]

References

  1. "Contributors to fyne-io/fyne · GitHub". 2020-02-25. https://github.com/fyne-io/fyne/graphs/contributors. 
  2. Houston, Stephen [@stephenmhouston] (2019-12-31). "I am so proud of how far we have made it with this desktop in less than a year of work. It is a really great experience and very aesthetically pleasing. Please consider using it if you are a #linux user! #fyne #golang #go #linuxdesktop #desktop t.co/jKqWriYrIG" (in en). https://twitter.com/stephenmhouston/status/1212078602889641984. 
  3. "Unusual uses for Go: GUIs (Go Time #116)". https://changelog.com/gotime/116. 
  4. "fyne/CONTRIBUTING.md at master · fyne-io/fyne · GitHub". 2020-02-25. https://github.com/fyne-io/fyne/blob/master/CONTRIBUTING.md. 
  5. "Fyne.io - Travis CI". https://travis-ci.org/fyne-io. 
  6. "Coveralls.io - Test Coverage History and Statistics". https://coveralls.io/github/fyne-io. 
  7. "The careful process behind Fyne's simplicity". https://changelog.com/posts/the-careful-process-behind-fynes-simplicity. 
  8. Archived at Ghostarchive and the Wayback Machine: "GoLab 2019 - Andrew Williams - Easily build cross platform graphical applications with Fyne". https://www.youtube.com/watch?v=jbsYrrNiqAs. 
  9. "A full desktop environment for Linux/Unix using Fyne: Fyne-io/Desktop". 2020-02-24. https://github.com/fyne-io/desktop/. 
  10. "Fyne Apps Listing". https://apps.fyne.io/. 
  11. "v2.1 for RichText and DocTabs goodness :) · fyne-io/fyne · GitHub". 2021-10-22. https://github.com/fyne-io/fyne/releases/tag/v2.1.0. 
  12. "Data binding, storage repositories and animation take Fyne to the next level! · fyne-io/fyne · GitHub". 2021-01-25. https://github.com/fyne-io/fyne/releases/tag/v2.0.0. 
  13. "A polished theme and new collections widgets headline our 1.4 release · fyne-io/fyne · GitHub". 2020-11-09. https://github.com/fyne-io/fyne/releases/tag/v1.4.0. 
  14. "Version 1.3 just 1000 commits later! · fyne-io/fyne · GitHub". 2020-11-09. https://github.com/fyne-io/fyne/releases/tag/v1.3.0. 
  15. "Release 1.2 brings Mobile Support · fyne-io/fyne · GitHub". 2020-02-25. https://github.com/fyne-io/fyne/releases/tag/v1.2.0. 
  16. "Release v1.1 feature release · fyne-io/fyne · GitHub". 2020-02-25. https://github.com/fyne-io/fyne/releases/tag/v1.1.0. 
  17. "Release Fyne's first major release · fyne-io/fyne · GitHub". 2020-02-25. https://github.com/fyne-io/fyne/releases/tag/v1.0.0. 
  18. "Golang Weekly Issue 299: February 14, 2020". https://golangweekly.com/issues/299. 
More
Information
Subjects: Others
Contributor MDPI registered users' name will be linked to their SciProfiles pages. To register with us, please refer to https://encyclopedia.pub/register :
View Times: 726
Entry Collection: HandWiki
Revision: 1 time (View History)
Update Date: 24 Oct 2022
1000/1000
Video Production Service