Chapter 8: Project Structure and Best Practices
The Go language comes with a well-understood set of best practices such as style, documentation, and code structure. Often, when applications start adding graphical user interface (GUI) elements, these best practices can be lost. Testing individual components and keeping a clean separation of types helps us maintain clean code that is easier to maintain over time. These concepts can be followed within GUI code as well, with support from a toolkit such as Fyne.
In this chapter, we'll explore how these concepts apply to graphical application development and how we can learn from them to make our GUIs easier to manage over time. We will cover the following topics:
- Organizing a well-structured project
- Understanding the separation of concerns
- Using test-driven development and writing tests for the whole application GUI
- Managing platform-specific code
Let's get started!