万本电子书0元读

万本电子书0元读

顶部广告

Building Cross-Platform Desktop Applications with Electron电子书

售       价:¥

30人正在读 | 0人评论 9.8

作       者:Muhammed Jasim

出  版  社:Packt Publishing

出版时间:2017-04-28

字       数:42.4万

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

温馨提示:此类商品不支持退换货,不支持下载打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
"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. 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. 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. What you will learn ?Explore various tools and libraries to build and debug an Electron application ?Use popular JavaScript frameworks such as Angular and Type* along with Electron to enhance your app ?Work with the desktop UI development for Electron using Photon ?Find out how to use various Electron APIs like Clipboard, Process, Shell, Image, File, "
目录展开

Title Page

Credits

About the Author

About the Reviewer

www.PacktPub.com

Customer Feedback

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Downloading the color images of this book

Errata

Piracy

Questions

Introducing Electron

Why desktop applications?

History of Electron

Introducing Electron

Why should I use Electron?

Leveraging your existing skill set

Goodbye sandbox security model

Accessing operating system APIs

Unlimited access to Node.js and NPM

What do I need to know?

Who uses Electron?

Building a hello world application using Electron

Installing Node.js

Mac

Linux - Ubuntu

Installing Electron

Writing the application

Running the application

Using Node.js inside the web pages

How does Electron work?

The browser/main process

The renderer process

Communication between renderer and browser

Summary

Building Your First Electron Application

Introducing the sample application

The technical stack

Angular 2

TypeScript

Facebook Graph API

Visual Studio code

Bootstrap and Photon kit

Gulp

webpack

Bootstrapping the application

Organizing files and directories

Why two package.json files?

Setting up the development environment

Configuring task runner - Gulp

Running an Electron application using Gulp

Integrating Angular 2 with Electron

Configuring module bundler - webpack

Configuring loaders

webpack plugins

Bootstrapping Angular 2 with Electron

Configuring dev server

Adding a menu bar to the application

Adding a context menu to the renderer process

Styling the application using Bootstrap

Summary

Tooling and Debugging

Debugging an Electron application

Debugging the main process

Debugging with Visual Studio Code

Setting up the launch configuration

Debugging with node-inspector

Debugging renderer processes

Adding Chrome Developer Tools extensions

Loading the developer tools extension manually

Monitoring the application with Devtron

Integrating task runners with VS Code

Boosting development workflow

Adding hot module replacement

Integrating webpack dev server into the Electron shell

Adding keyboard shortcuts to the application

Controlling Electron behavior using environment variables

Monitoring power state changes

Submitting crash reports to the server

Capturing the desktop using Electron API

Summary

Using Angular 2 with Electron

Introducing the Facebook Graph API

Setting up the Facebook application

Configuring the Facebook SDK

Creating the service

Configuring Angular router

Login to the Facebook API

Getting user profile

Creating the profile component

Creating a tab component

Implementing oAuth authentication with Electron

Summary

Crafting User Interface

Introducing Photon kit

Laying out the application

The frameless window

Draggable regions

Laying out the application

Sidebars

Photon components

Bars

Toolbar & Actions

Navs

Tables

Building a user interface with React desktop

React desktop

Buttons

Windows

Segmented Control

NavPane

The list view

Awesome Electron

Summary

Using Node.js with Electron

Managing data stores

Using the Node MySQL driver

Installing dependencies

Creating a database service

Using ORM with Electron

Accessing hardware

Creating a native add-on

Building an Electron application with Elm

Create an Elm file

Compiling Elm

Using TypeScript and ES2015 with Electron

Working with ES6 and Flow

Summary

Deep Dive into Electron API - 1

Inter-process communication with IPC module

IPCRenderer

IPCMain

Passing callbacks to the main process

Sharing variables between modules

Defining custom protocols

Sessions and cookies

Session

Intercepting content download

Emulating network using session API

Intercepting permission requests

Managing file download

Native system dialogs

Generic dialog boxes

Working with clipboard

Managing display and power sleep mode

Monitoring power changes

Networking from the main process

Managing web requests

Summary

Exploring Electron API - 2

Managing the web page using webContents

Managing the page navigation

Authenticating the web view requests

Capturing the page snapshot

Emulating device viewport inside the web view

Printing and saving the web pages

Embedding guest content using WebView tag

Extended Node.js process

Customizing the browser window

Managing multiple windows

Loading POST requests

Listening for APPCOMMANDs on a Windows platform

Offscreen rendering

Working with the shell

Controlling the application life cycle using app module

Setting up the default protocol client

Managing the recent document list

Summary

Integrating with Desktop Environments

Introduction to desktop integration

Handling desktop notifications

Managing task list, recent documents, and the dock menu

Linux Unity launcher shortcuts

Custom macOS dock menu

Thumbnail toolbars

Managing display properties

Dealing with tray icons

Managing application logs

Running Electron application as Windows service

Running Electron application as Linux daemons

Universal Windows platform

Developing with WinRT

Using notification API

Packaging for Windows store in appx format

Summary

Dealing with Web Standards

Service workers

What is a service worker?

The service worker life cycle

Managing the service workers in Electron

Creating HTTPS server

Adding a JSON service

Creating the service worker

Managing the cache version

Adding push notifications

Customizing the notification

Storing database locally

Summary

Testing Electron Application

Introduction to JavaScript testing

Introduction to Spectron

Accessing the Electron API

Testing DOM tree

Exploring Spectron API

Accessing the webContents API

Accessing the process object

Accessing the renderer process logs

Using ESNext in test cases

Using Chai as Promised

Summary

Packaging and Distributing the Application

Building and packaging the Electron application

Packaging the Electron into asar archive

Generating the asar archive

Rebranding the application

Using Electron builder

Automating the build process

Creating the native installer

Programmatic Usage

Publishing the artifacts

Auto updating the application

Submitting to the App Store

Windows App Store submission guide

Mac App Store submission guide

Continuous Integration

Summary

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

发表评论

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

买过这本书的人还买过

读了这本书的人还在读

回顶部