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

Introducing the Facebook Graph API


The Graph API is the primary way to read and write data to Facebook. It can be used in a immens variety of ways. In this chapter, we will use this API to fetch and post the user data to Facebook. You can get a better idea of how to access the remote APIs or content from Electron by using this Graph API. Basically, there are multiple ways available with an Electron application to connect to a remote endpoint or to fetch data from the remote server. When you want to fetch or post data to a remote server from your main process, you need to use any of the available HTTP client libraries available for the Node.js framework. Node's built-in HTTP module, Request JS, and isomorphic-fetch are some of the best examples of these kinds of libraries. Connecting to a remote server from a renderer process is much easier than the main process. There you can use standard fetch or XmlHttpRequest APIs to do your jobs. You can also make use of third-party Node.js modules,...