© Chris Griffith, Leif Wells 2017

Chris Griffith and Leif Wells, Electron: From Beginner to Pro, https://doi.org/10.1007/978-1-4842-2826-5_17

17. Additional Resources

Chris Griffith and Leif Wells2

(1)San Diego, California, USA

(2)Atlanta, Georgia, USA

Hopefully by now you have a solid starting point to build and code your Electron application. We have touched on many of the core features that most desktop applications require: native menus and dialogs, platform-specific installers, integration with the local file system, and more. The challenge is taking these features and integrating them in your actual application.

Understanding that Electron is built atop two separate systems, you should be able to isolate much of the Electron-specific code from the main process, leaving your renderer process free to your core application. As we come to the end of this book, we want to cover some of the various loose ends that we need to touch upon before you begin writing the next awesome Electron app!

Additional Electron APIs

While we introduced you to a lot of the core APIs that Electron offers, we did not cover every one. But, we would be remiss if we did not touch briefly on some of the other APIs that you should be aware of:

desktopCapturer

This API allows you to capture audio and video from the user desktop. This API is built atop the webkitGetUserMedia API. It should be noted that whenever you access media recording functions, you need to be transparent with the user about performing the recording action.

crashReporter

Electron has this built-in API that will submit crash reports to a remote server. It does require some additional server configurations in order to accept the crash reports from your application.

ClientRequest

This powerful API is used to make HTTP/HTTPS requests via the main process. The actual method implements Node’s Writable Stream interface. Some examples of supported streams are the following:

  • HTTP request

  • HTTP responses

  • fs write streams

  • zlib streams

  • crypto streams

  • TCP sockets

net

Although like the HTTP and HTTPs modules in Node.js, this API uses Chromium’s native networking library instead. Better support for web proxies is one reason you might consider this solution instead of the Node.js modules.

DownloadItem

You can use this API to control file downloads from remote sources. This works well if you need to interact with remote files.

Electron Forge

Billed as the command-line interface for Electron applications, this project is being developed by Electron Userland. You might recognize that name, as they are the developers of the npm modules electron-packager and electron-builder.

The main idea of this project is to provide a CLI for many of the common Electron tasks, including scaffolding a new Electron app, installing new Node modules, packaging and publishing. This is certainly an effort that we are closely following for use in our next Electron application. To learn more about this tool, visit https://beta.electronforge.io/ .

Community Resources

The success of any open source project is, in part, due to the strength of the community around it. Electron is fortunate to have an active community that new and experienced developers can turn to when dealing with an issue or looking for a solution. Here is a list of some of the more popular channels that you can become a part of:

We should not forget that Electron is an open source project living and breathing on GitHub. Take the time to look over the issues for the project, or you can even contribute to the project.

Summary

This concludes our journey together through this book. We tried to cover many of the various parts of Electron and its supporting technologies at a reasonable depth and in an order that made sense. There is nowhere near enough space or time for this book to cover each and every part of Electron, but this should give you a very strong base on which to rapidly build amazing, sleek, and performant desktop applications. Keep trying new things, and join us in the journey of making Electron a great framework!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.183.221