万本电子书0元读

万本电子书0元读

顶部广告

Hands-On GUI Application Development in Go电子书

售       价:¥

3人正在读 | 0人评论 9.8

作       者:Andrew Williams

出  版  社:Packt Publishing

出版时间:2019-02-25

字       数:53.0万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Discover Golang's GUI libraries such as Go-GTK (GIMP Toolkit) and Go-Qt and build beautiful, performant, and responsive graphical applications Key Features * Conceptualize and build state-of-art GUI applications with Golang (Go) * Tackle the complexity of varying GUI application sizes with a structured and scalable approach * Get hands-on experience of GUI development with Shiny, and labs/ui, Fyne, and Walk Book Description Go is often compared to C++ when it comes to low-level programming and implementations that require faster processing, such as Graphical User Interfaces (GUIs). In fact, many claim that Go is superior to C++ in terms of its concurrency and ease of use. Most graphical application toolkits, though, are still written using C or C++, and so they don't enjoy the benefits of using a modern programming language such as Go. This guide to programming GUIs with Go 1.11 explores the various toolkits available, including UI, Walk, Shiny, and Fyne. The book compares the vision behind each project to help you pick the right approach for your project. Each framework is described in detail, outlining how you can build performant applications that users will love. To aid you further in creating applications using these emerging technologies, you'll be able to easily refer to code samples and screenshots featured in the book. In addition to toolkit-specific discussions, you'll cover more complex topics, such as how to structure growing graphical applications, and how cross-platform applications can integrate with each desktop operating system to create a seamless user experience. By delving into techniques and best practices for organizing and scaling Go-based graphical applications, you'll also glimpse Go's impressive concurrency system. In the concluding chapters, you'll discover how to distribute to the main desktop marketplaces and distribution channels. By the end of this book, you'll be a confident GUI developer who can use the Go language to boost the performance of your applications. What you will learn * Understand the benefits and complexities of building native graphical applications * Gain insights into how Go makes cross-platform graphical application development simple * Build platform-native GUI applications using andlabs/ui * Develop graphical Windows applications using Walk * Create multiplatform GUI applications using Shiny, Nuklear, and Fyne * Use Go wrappers for GTK and Qt for GUI application development * Streamline your requirements to pick the correct toolkit strategy Who this book is for This book is designed for Go developers who are interested in building native graphical applications for desktop computers and beyond. Some knowledge of building applications using Go is useful, but not essential. Experience in developing GUIs is not required as the book explores the benefits and challenges they pose. This book will also be beneficial for GUI application developers who are interested in trying Go.
目录展开

Title Page

Copyright and Credits

Hands-On GUI Application Development in Go

About Packt

Why subscribe?

Packt.com

Contributors

About the author

About the reviewer

Packt is searching for authors like you

Preface

Who this book is for

What this book covers

To get the most out of this book

Download the example code files

Conventions used

Get in touch

Reviews

Section 1: Graphical User Interface Development

The Benefits of Native Graphical Applications

Return of the graphical application

Personal computers

From desktop to internet

Smart phones, apps, and customer retention

Native performance

Integrated user experience

Reliability and offline functionality

Maintainability and testing

Summary

Graphical User Interface Challenges

Standard look and feel or app theme

GUIs and visual hierarchy

Multiple documents

Accessory windows

Visual hierarchy

Mobile standards

Concurrency and multi-threading

Switching threads

Avoiding complexity

Web services and cloud integration

Communications

Data parsing

Standard components

Developing for multiple platforms

Cross-platform APIs

Icons and design

Testing

Packaging and distribution

Summary

Go to the Rescue!

Introduction

Cross-platform for any application

Cross-compiling

Standard library

Concurrency in language design

Goroutines

Channels

The sync package

Web services included as standard

Choosing your look and feel

Summary

Section 2: Toolkits Using Existing Widgets

Walk - Building Graphical Windows Applications

Background and aims

Get started with walk

Setup

Code

Build

Run

Benefits of a declarative API

Compared with the native API

Using both APIs for flexibility

Building a user interface

Style

Layout

Toolbar and menu

Communicating with the GUI

View model

Detail view

List view

Background processing

Walk in a cross-platform application

Summary

andlabs UI - Cross-platform Native UIs

Background and history

Getting started with andlabs UI

Prerequisites

Microsoft windows

macOS

Linux

Setup

Rebuilding the UI library (workaround)

Code

Build

Run

Generic API for multiple platforms

Controls

Box

Containers

Widgets

Menu

Area and drawing

Building a user interface

Style

Layout

Main email window

Email compose dialog

Toolbar and menu

Communicating with the GUI

Background processing

Example

Challenges with multiple native GUIs

Consistent style

Brand styles

User experience

Testing

Cross-compilation

Building for Linux on macOS or windows

macOS

Windows

Building for windows on Linux or macOS

Building for macOS on Linux or Windows

A better solution

Summary

Go-GTK - Multiple Platforms with GTK

GTK+ background

Getting started with Go-GTK

Prerequisites

Installing GTK+

macOS

Windows

Linux

Install Go-GTK

Build

Run

Signals and namespaces

Signals

Passing data

Namespaces

Sample application

Layout

Compose layout

Signaling

Thread handling

Cross compilation

Theming

Summary

Go-Qt - Multiple Platforms with Qt

Qt background

Getting started with therecipe/qt

Prerequisites

Preparing CGo

Installing Qt

macOS

Windows

Linux

License / Qt account

Installing qt (the bindings)

Build

Run

Object model and event handling

Inheritance

Memory management

Signals and slots

Sample application

Layout

The compose layout

Signalling

Thread handling

Cross-compilation

Theming

Summary

Section 3: Modern Graphical Toolkits

Shiny - Experimental Go GUI API

Background and the vision for Shiny

Design and supported platforms

Architecture

Lower layer

Higher layer

Supported platforms

Drivers currently included

Getting started with Shiny

Setup

Example

Cross-compiling

Cross-compiling for macOS

Widgets and material design

Design

Icons

Themes

Widgets

Getting started continued

Code

Supporting code

Build and Run

Building a user interface

Design

Layout

Navigation

File list

Image view

Communicating with the GUI

Background processing

Summary

nk - Nuklear for Go

Background and design of Nuklear

Rendering and platform support

Rendering modules

Supported platforms

Getting started with nk

Prerequisites

Linux

macOS and Windows

Android

Setup

Example

Code

Build and run

Cross-compiling

Widgets, layout, and skinning

Widgets

Layout

NkLayoutRow

NkLayoutRowTemplate

NkLayoutSpace

Drawing

Command queue

Draw functions

Skinning

Building a user interface

Layout

Main email window

Email compose dialog

Toolbar and menu

Communicating with the GUI

Background processing

Summary

Fyne - Material Design-Based GUI

Background and vision for Fyne

Getting started with Fyne

Prerequisites

Linux

macOS

Setup

Example

Code

Build and run

Cross compiling

Rendering and vector graphics

Vector graphics

Drivers

Supported platforms

Canvas, widgets, and layouts

Canvas (drawing)

Layout

Widgets

Themes

Packaged themes

Building a user interface

Layout

Main email window

Compose dialog

Toolbar and menu

Communicating with the GUI

Loading emails

Sending email

Background processing

Building an image viewer

Layout

Navigation

File listing

Image view

Communicating with the GUI

Background processing

Summary

Section 4: Growing and Distributing Your Application

Navigation and Multiple Windows

Planning application layout

Standard layouts

Device form factors

Responsive or adaptive design

Custom layouts

Navigating your application

Progressive disclosure

Example 1 – Microsoft Edge

Example 2 – Skyscanner flight search

Menus and toolbars

Toolbar

Menu

Multiple windows

Window types and keeping things clean

Standard dialogs

Modal windows

Window hints

Sizes

Other hints

Notifications and task status

Minor alerts

Background progress

Platform-specific considerations

Window grouping

Application instances

Extra features

Summary

Concurrency, Networking, and Cloud Services

Concurrency, threads, and GUI updates

Managing long-running processes

Signaling shutdown

Checking completion

Communicating through channels

Graphical updates from goroutines

Network resources and caching

Loading remote resources

Images

JSON

Caching resource data

Connecting to cloud services

Encoding

JSON

XML

Authentication – OAuth 2.0

First request

Storing tokens

Posting data

GUI integration

Incoming messages

Activity notifications

Spinner

Status panel

Consistent user experience when offline

Caching responses

Queuing actions

Starting offline

Summary

Best Practices in Go GUI Development

Separation of concerns

Suggested application structure

Test-driving UI development

Designed to be testable

Example application test

Continuous integration for GUIs

Approaches to GUI test automation

Avoiding external dependencies

Managing platform specifics

Summary

Distributing Your Application

Metadata and icons

Application icon

Describing your app

Bundling assets

go-bindata

packr

rsrc

fyne bundle

Building a release

Preparing

Compiler installation

Building

Packaging

Linux

Create metadata files

Packaging release

macOS

Creating metadata files

Packaging release

Windows

Creating metadata files

Packaging release

Cross-platform packaging tools

fyne package

Distributing to platform marketplaces

Mac App Store

Packaging

Uploading

Reviewing

Microsoft Store

Packaging

Uploading

Reviewing

Linux package manager

Debian (.deb)

Packaging

Distribution

Red Hat (.rpm)

Packaging

Distribution

Tarball (.tar.gz)

Arch Linux

Gentoo Linux

Others

Containers

Summary

Installation Details

Installing Go

Microsoft Windows

Git

Go

Environment

Apple macOS

Linux

Setting up Cgo

Microsoft Windows

Apple macOS

Linux

Cross Compiler Setup

Cross compiling for macOS with CGo

To macOS from Linux or Windows

Cross compiling for Windows with CGo

To Windows from macOS

To Windows from Linux

Cross compiling for Linux with CGo

To Linux from macOS

To Linux from Windows

Comparison of GUI Toolkits

Connecting GoMail to a Real Email Server

Download Gmail credentials

Creating a server provider

Downloading inbox messages

Sending messages

Listening for new messages

Updating an example to use Gmail

Other Books You May Enjoy

Leave a review - let other readers know what you think

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部