Hands-On GUI Application Development in Go
eBook - ePub

Hands-On GUI Application Development in Go

Build responsive, cross-platform, graphical applications with the Go programming language

Andrew Williams

  1. 450 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

Hands-On GUI Application Development in Go

Build responsive, cross-platform, graphical applications with the Go programming language

Andrew Williams

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

À propos de ce livre

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.

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que Hands-On GUI Application Development in Go est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  Hands-On GUI Application Development in Go par Andrew Williams en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Computer Science et Computer Graphics. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
2019
ISBN
9781789131161
Édition
1

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!

The Benefits of Native Graphical Applications

Since they first appeared in the 1970s, it has been clear that graphical interfaces make it easier to work with software applications. In the early days, they were typically presented through Windows, Icons, Menus and Pointer (WIMP) interfaces. While these varied in design across platforms and over time, the interactions have been relatively consistent.
Recent changes in software development have increased the understanding of user experience, which focuses on creating applications that are intuitive for even the least experienced computer user. This, combined with the mobile-driven move towards a post-WIMP approach to computer interaction, prompts the question: what's next for desktop computer software?
This chapter will cover the following topics:
  • The history of Graphical User Interfaces (GUIs) through desktop, web, and mobile
  • The importance of a well-integrated and responsive application interface
  • User expectations of both online and offline native applications
  • The developer benefits of building native graphical applications

Return of the graphical application

"The best way to predict the future is to invent it."
- Alan Kay, PARC
It was 1973 and Palo Alto Research Center (Xerox PARC) had just completed the Alto computer, the first commercial example of a computer GUI. While the screen orientation and lack of colors make it a little peculiar to the modern eye, it's clearly recognizable as a graphical interface, with a mouse and keyboard for interaction. While it took another seven years to be generally available to the public, in 1981, as the Xerox Star, it was clear that this was the beginning of something big:
Dynabook environment desktop (1976; Smalltalk-76 running on Alto). Copyright SUMIM.ST, licensed CC BY-SA 4.0.
This was a huge leap forward for the usability of computers—a welcome change from the standard interaction of text-mode computer screens. Not only does a graphical interface allow for more advanced functionality, it's also much easier to learn for a novice looking to get started. While the command-line interface remains popular with programmers and other experts, it's fair to say that, without the GUI, personal computers wouldn't have reached the popularity we all know:
A traditional text mode (command-line) interface typical well into 1980's

Personal computers

Over the 10 years that followed the Xerox Star public release, many graphical platforms emerged, including Microsoft Windows, Apple Macintosh, X11 (started at MIT for UNIX computers), and DRI's GEM (primarily for Atari ST). Though the background of each of these is different, they shared a common ambition to provide a desktop environment that enabled a computer user to interact with multiple graphical applications at the same time.
This was one of the defining characteristics of the emerging Personal Computer (PC) market and it led to a whole new world of computer software:
Microsoft Windows for Workgroups 3.11. Used with permission from Microsoft.
As PCs became more powerful, advancements in hardware supported more sophisticated software applications. Higher resolution screens allowed the display of more information and removable storage devices (such as floppy disks, CDs, and then USB sticks) enabled transferring larger datasets between applications. What used to commonly be simple interfaces with a few options became more sophisticated and more complicated.
The default graphical interface elements and layouts needed to be extended to keep up. Menus got larger, toolbars were introduced to highlight common tasks, and built-in help systems became necessary to help users achieve their tasks. We also see platforms start to take on their own identity, leading to additional hurdles when learning new software. It was common for an average off-the-shelf software product to come with an instruction manual longer than this book, explaining how to interact with its various features.

From desktop to internet

In the mid-1990s, the World Wide Web (which would come to be our global communications platform) was getting started and the PC market started to see various web browsers arrive. These were initially distributed as software packages (on floppy disks) and then later as part of the desktop environment (pre-installed on new computers). Mosaic, Netscape Navigator, and Internet Explorer arrived in quick succession to give early adopters access to the emerging information channel. In those days, it was largely academic texts and reference materials; you needed to know where to look to find things and, similarly to early computer use, it wasn't particularly intuitive.
What became clear, however, was that this new medium was starting to facilitate the future of communications and information exchange. People began to see that being the main technology within that space would be critical; and so began the browser wars. As web browsers vied for the top spot, the technology became embedded in the desktop platforms as a way to quickly deliver well-presented content. Initially, those bulky user manuals were moved to HTML (the language of web pages) and bundled with the software download, and then more functionality of each application moved online. As an internet connection became commonplace in most homes, we saw the rise of full web-based applications.
A web application is one that requires no software installation beyond the internet browser already on your computer. They always deliver up-to-date information direct from the source. This is usually customized based on your location, preferences, or even browsing history on the web application or those of partner companies. Additionally, a web application can be improved at any time by the company providing it; often, following experiments where the company sees which version of an application has a better user experience. The following illustration shows a possible architecture for an application delivered over the web.
A simple web application architecture
As the technologies behind web-based applications developed, they became viable alternatives to desktop software. Software companies began to realize that it is a lot easier to deliver your product directly through a website rather than the traditional download model. Not only that, but it also meant that one product would work on almost any computer. Attempts in the past to make a write-once-run-anywhere platform (such as Python and Java) had great success at the time, but after the web technologies reached a certain level of complexity, it became clear that the performance penalties and distribution overheads required by the cross-platform interpreters made web applications far more attractive where possible.

Smart phones, apps, and customer retention

For a long while, it looked like websites were the future for delivering software products, which was until the entry of smart phones. Once mobile phone technology developed to the point that you could access websites in the palm of your hand, the requirements for web-based applications changed once again. Now, developers needed to consider how smaller screens could present meaningful content. How could a touchscreen-based user interface operate where a mouse and keyboard used to be assumed? And how could people engage in a meaningful way when they had only five minutes while waiting for their coffee order?
Delivering a single application, available through desktop browsers and mobile phones, across a plethora of different operating systems and devices, has clear advantages for developers, but there are also challenges. The internet is a very large place and your product can easily get lost in the noise; how do you attract new users and how do you ensure that your existing customers keep coming back? One major response to this was the introduction of native apps (applications designed and built for specific platforms) for mobile devices. The iPhone launched with web-based applications only, but within eight months, Apple delivered the capability for developers to build native applications. These applications provided a more meaningful engagement with users; they were designed for the device they ran on, they could be found easily through a marketplace or app store, and once installed, remained a constant reminder on the device's home screen.
And so we enter a time where our target audience has become accustomed to software designed specifically for their device. A polished user experience is a must-have if companies expect to engage and retain their customers. Waiting for pages to load or dealing with intermittent errors are niggles that users are no longer willing to put up with. This higher bar for software delivery is now a well understood phenomenon, but the improvement in quality for software delivered through mobile devices hasn't yet been reflected on the desktop. Until recently, the browser was still king; long lists of website bookmarks are used in place of expecting applications delivered through a store and installed onto the computer. This, however, is changing and we're going to explore how to deliver a quality user experience through beautiful desktop applications.

Native performance

"Users really respond to speed."
- Marissa Mayer, Google VP
One of the main reasons that businesses often opt for a website-based approach is to avoid having to build many products for the platforms they wish to support. We're seeing a similar approach to mobile application development: as more platforms enter the market, developing native apps becomes an overhead that many businesses can't afford. They opt for the web-based approach or hybrid app, where the user believes they're installing a native app that's really just a website packaged into a download. While this can be good enough for simple applications with basic data processing, it is often not going to meet user expectations. Additionally, the interaction paradigms for a web browser are usually different to that of the system applications around it. If the user expects an application to behave in a certain way, then an embedded web browser could prove to be a confusing experience.
The biggest challenge in delivering a large application through web technologies (through a browser or downloaded application) is achieving good performance. As a browser is designed primarily for information exchange, it isn't well suited to large data processing or complicated graphical representations. When delivered through a web browser, much of this can be performed by a remote server that has the...

Table des matiĂšres

Normes de citation pour Hands-On GUI Application Development in Go

APA 6 Citation

Williams, A. (2019). Hands-On GUI Application Development in Go (1st ed.). Packt Publishing. Retrieved from https://www.perlego.com/book/921322/handson-gui-application-development-in-go-build-responsive-crossplatform-graphical-applications-with-the-go-programming-language-pdf (Original work published 2019)

Chicago Citation

Williams, Andrew. (2019) 2019. Hands-On GUI Application Development in Go. 1st ed. Packt Publishing. https://www.perlego.com/book/921322/handson-gui-application-development-in-go-build-responsive-crossplatform-graphical-applications-with-the-go-programming-language-pdf.

Harvard Citation

Williams, A. (2019) Hands-On GUI Application Development in Go. 1st edn. Packt Publishing. Available at: https://www.perlego.com/book/921322/handson-gui-application-development-in-go-build-responsive-crossplatform-graphical-applications-with-the-go-programming-language-pdf (Accessed: 14 October 2022).

MLA 7 Citation

Williams, Andrew. Hands-On GUI Application Development in Go. 1st ed. Packt Publishing, 2019. Web. 14 Oct. 2022.