Book Image

Building Cross-Platform Desktop Applications with Electron

By : Muhammed Jasim
Book Image

Building Cross-Platform Desktop Applications with Electron

By: Muhammed Jasim

Overview of this book

<p>Though web applications are becoming increasingly popular, desktop apps are still important. The Electron framework lets you write cross-platform desktop applications using JavaScript, HTML, and CSS, and this book will teach you how to create your first desktop application with Electron. It will guide you on how to build desktop applications that run on Windows, Mac, and Linux platforms.</p> <p>You will begin your journey with an overview of Electron, and then move on to explore the various stages of creating a simple social media application. Along the way, you will learn how to use advanced Electron APIs, debug an Electron application, and make performance improvements using the Chrome developer tools. You’ll also find out how to package and distribute an application, and more.</p> <p>By the end of the book, you will be able to build a complete desktop application using Electron and web technologies. You will have a solid understanding of the common challenges that desktop app developers face, and you’ll know how to solve them.</p>
Table of Contents (19 chapters)
Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Native system dialogs


When you download a new file, the Electron shell will automatically ask you to select a location to save the file in your disc. The previous example shows you how to override this behavior by setting a file path for each download in your application. What if, you need to show the save dialog programmatically? Let's check how we can show native dialog API to work with dialog boxes, such as file dialog, custom alerts, and information messages.

Usually, you don't need to access native renderer process from your web pages since you have JavaScript dialog API. We won't have to use that as well, as we have custom JavaScript user interface plugins available for better dialog and windows. However, in the main process, as the context is different, we need to use some native window API as we don't have any user interface present for that process. Luckily the Electron provides a dialog API, which gives access to native dialog user interface component from the main process. Open...