[golang][gui]Hands On GUI Application Development in Go【在Go中动手进行GUI应用程序开发】
emmm 谷歌并没有给GOlang添加GUI武器库,让其大战群雄。
但是民间不缺乏大神。
这是golang基于GTK进行开发GUI的一个示例https://github.com/landv/golang-test/tree/master/gtk-examples
来进入正题,此书的读书笔记,国内暂未找到纸质版售卖的,从外边找了一份电子版的先看着。美刀买的贵,还是韩元便宜。哈哈哈。
Build responsive, cross-platform, graphical applications with the Go programming language.
Andrew Williams
Andrew Williams has over 15 years of commercial software development experience across a variety of programming languages, including Java, C, Objective-C, and Go. He has been a core developer in large open source projects such as Enlightenment, EFL, and Maven, as well as maintaining various community websites and tutorials. Since 2007, Andrew has been working as CTO with many early-stage and growing software start-ups. After 6 years spent expanding an award-winning mobile app development company, he is now applying the lessons he has learned to cross-platform desktop applications using Go. Andrew is passionate about building tools and services that make software development simpler and improve productivity, as well as making it easier to become a great software engineer. I extend my eternal thanks to my wife, Michelle, for believing in me and encouraging me to write this book. My thanks also go to my friends and family for always providing support and inspiration. Thanks to my great reviewer, Al, for the care and time he devoted to polishing this book. Thanks also to the tech community in Edinburgh for championing learning and innovation. Lastly, this book would not have been possible without the supportive team at Packt.
Preface
Since the 1.0 release of the Go programming language in 2012, developers have enjoyed the increased productivity brought by the easy-to-read, quick-to-learn, cross-platform design of Go. Web apps and system utilities around the world are being built with Go to rapidly deliver reliable performance. Learning the language is easy, due to its centralized documentation and great programming environment support. Creating Graphical User Interfaces (GUIs) with Go, however, is still very new and there is not yet a standardized UI toolkit. This definitive guide to programming GUIs with Go explores the most popular GUI packages available. It compares the vision behind each toolkit to help you pick the right approach for your project. Each toolkit is described in detail, outlining how to build beautiful, performant applications that users will love. Code samples and screenshots will aid any level of Go developer to create applications using these emerging technologies.
前言
自2012年Go编程语言1.0发布以来,开发人员享受到了Go易于阅读、快速学习、跨平台设计带来的生产力提高。世界各地的web应用程序和系统实用程序正在与go一起构建,以快速提供可靠的性能。由于集中的文档和强大的编程环境支持,学习这种语言很容易。然而,使用go创建图形用户界面(gui)仍然是非常新的,而且还没有一个标准化的ui工具包。
这是一个关于用go编程gui的权威指南,探讨了最流行的gui包。它比较了每个工具包背后的愿景,以帮助您为项目选择正确的方法。每个工具包都有详细的描述,概述了如何构建用户会喜欢的漂亮的、性能良好的应用程序。代码示例和屏幕截图将帮助任何级别的go开发人员使用这些新兴技术创建应用程序。
部分进行翻译哈,翻译不准确之处请见谅,还望通过本文的了解进去购买原版书籍。
Who this book is for
This book is written for Go developers who are interested in building native graphical applications for desktop computers and beyond. Some knowledge of building Go applications (command line based or web apps) is assumed, but not essential. The first section of this book looks at the history of the GUI, its importance to the evolution of modern personal computers, and how it can pose additional challenges to software developers. Developers of GUI applications that are interested in trying Go may also find this book useful. Section 2, Toolkits Using Existing Widgets and Section 3, Modern Graphical Toolkits, explore the various frameworks available to the Go language and demonstrate how applications can be rapidly developed from basic principles. Additionally, an experienced Go developer may find the final section useful. The chapters of section 4, Growing and Distributing Your Application covers how to design and build complex graphical interfaces that fit user expectations. It looks at the different approaches possible to support multiple operating system standards and how to integrate the GUI well with network resources and cloud services. The final chapters cover best practices in GUI applications with Go, and look at how to package and distribute your software through the various distribution channels available.
这本书是给谁的
这本书是为那些有兴趣为台式机和其他计算机构建本机图形应用程序的go开发人员编写的。一些构建go应用程序(基于命令行或web应用程序)的知识是假定的,但不是必需的。本书的第一部分介绍了gui的历史,它对现代个人计算机发展的重要性,以及它如何对软件开发人员提出额外的挑战。
有兴趣尝试go的gui应用程序的开发人员可能也会发现这本书很有用。第2部分,使用现有的小部件和第3部分的工具包,现代图形工具包,探索GO语言可用的各种框架,并演示如何从基本原理快速开发应用程序。
此外,经验丰富的go开发人员可能会发现最后一部分很有用。第4节“开发和分发应用程序”的章节介绍了如何设计和构建符合用户期望的复杂图形界面。它着眼于支持多种操作系统标准的不同方法,以及如何将gui与网络资源和云服务很好地集成。最后几章介绍了使用go的gui应用程序中的最佳实践,并介绍了如何通过各种可用的分发渠道打包和分发软件。
To get the most out of this book
A basic knowledge of the Go language is assumed throughout this book. If you are not yet familiar with its basic concepts, consider running through the online tutorial before you begin reading (tour.golang.org).
To benefit the most from later chapters, it would be ideal if you have in mind a particular application you are working on or would like to build. Applying the frameworks and tools used in this book to a particular project will aid your understanding of the various concepts. Additionally, this will deliver the benefit of you completing your project and preparing it for distribution.
充分利用这本书
本书假定读者对Go语言都有基本的了解。如果您还不熟悉它的基本概念,请在开始阅读(tour.golang.org)之前,先仔细阅读在线教程。
为了从后面的章节中获得最大收益,如果您考虑到正在处理或想要构建的特定应用程序,则将是理想的选择。将本书中使用的框架和工具应用于特定项目将有助于您理解各种概念。此外,这将带来您完成项目并准备分发的好处。
Download the example code files
You can download the example code files for this book from your account at www.packt.com. If you purchased this book elsewhere, you can visit www.packt.com/support and register to have the files emailed directly to you. You can download the code files by following these steps: • Log in or register at www.packt.com. • Select the SUPPORT tab. • Click on Code Downloads & Errata. • Enter the name of the book in the Search box and follow the onscreen instructions. Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of: • WinRAR/7-Zip for Windows • Zipeg/iZip/UnRarX for Mac • 7-Zip/PeaZip for Linux The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Hands-On-GUI-Application-Development-in-Go/. In case there's an update to the code, it will be updated on the existing GitHub repository. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
下载示例代码文件
您可以从www.packt.com的帐户中下载本书的示例代码文件。
如果您在其他地方购买了此书,则可以访问www.packt.com/support并注册以将文件直接通过电子邮件发送给您。
您可以按照以下步骤下载代码文件:
•登录或在www.packt.com上注册。
•选择“支持”选项卡。
•单击代码下载和勘误。
•在“搜索”框中输入书名,然后按照屏幕上的说明进行操作。
下载文件后,请确保使用以下最新版本解压缩或解压缩文件夹:
•Windows版WinRAR / 7-Zip
•Mac版Zipeg / iZip / UnRarX
•适用于Linux的7-Zip / PeaZip 本书的代码包也托管在GitHub上,网址为https://github.com/PacktPublishing/Hands-On-GUI-Application-Development-in-Go/。如果代码有更新,它将在现有的GitHub存储库中进行更新。 我们还提供了丰富的书籍和视频目录中的其他代码包,可从https://github.com/PacktPublishing/获得。去看一下!
Section 1: Graphical User Interface Development
For many years, graphical user interfaces (GUIs) have been the standard way for the average computer user to engage with a software product. They provide an intuitive user experience for potentially complex workflows within the familiar context of a desktop environment. Having evolved over more than 40 years, the traditional graphical application is being challenged by the ubiquity of web-based software and the emergence of mobile applications on modern smartphones and handheld computers. Despite these new trends, there are still many reasons why building a native graphical application for desktop (and laptop) computers could be the right strategy for your product. In this introductory section, we will look at the history of the desktop GUI and how it has developed alongside technological innovation. We will discuss why, despite new alternative approaches, native graphical applications are still a great way to provide an intuitive user experience and a reliable software product. Building anything of quality takes effort, and software is no exception. We will explore the challenges that teams are likely to face when designing and building a native graphical application that aims to support multiple operating systems. Having reviewed the importance of the GUI and the challenges it can pose, we examine the Go programming language and demonstrate that its design fits very well with the creation of modern native graphical applications for multiple platforms.
The following chapters will be covered in this section: • Chapter 1, The Benefits of Native Graphical Applications • Chapter 2, Graphical User Interface Challenges • Chapter 3, Go to the Rescue!
注意
一下文章将不再粘贴原文内容,主要以笔记为主要内容进行编写。
|
请发表评论