Book Image

NW.js Essentials

By : Alessandro Benoit, Roger Weng
Book Image

NW.js Essentials

By: Alessandro Benoit, Roger Weng

Overview of this book

Table of Contents (17 chapters)
NW.js Essentials
About the Author
About the Reviewers

Chapter 2. NW.js Native UI APIs

As we have seen in the first chapter, it is incredibly easy to build desktop applications out of a simple HTML page but, in order to really understand the power of NW.js, we have to push it a step further. We know that Node.js takes care of dealing with low-level system functionality while WebKit handles the window GUI and all the stuff you'd usually do in a web application, but there is still something missing.

In order to create a decent user experience, we need to give our users the feeling that they are dealing with a native desktop application with the ability to handle multiple windows, access the clipboard, or hide in the system tray. To sum up, our application needs to be fully integrated with the OS GUI.

This cannot be done by WebKit because of the API boundaries, nor can it be done by Node.js as it doesn't have access to the GUI, but fortunately, NW.js gives us the full thing, adding on top of the others a new layer of JavaScript APIs that can interact...