Chapter 2. Laying the foundation for your first desktop application
This chapter covers
- Building a file explorer in both NW.js and Electron
- Setting up your application
- Structuring your application’s files
- Understanding how the user interface of the application works
- Accessing the filesystem in Node.js
As developers, we often forget how lucky we are to work in an industry where the tools are readily available and free or relatively inexpensive to get ahold of. In this chapter, we’ll get to grips with building desktop applications through creating a file explorer application. We’ll look at how the app is built with both NW.js and Electron so that we can compare and contrast the ways in which they approach desktop applications.
Grab a cup of tea or coffee, a pen and paper, and settle in for some programming.
Whether you use a Windows PC, a Mac, or Linux, there are a few things common to all of them—they store files organized in folders, and they all have their own take on how to organize files in folders, as well as how you find and display those files to the user. This isn’t a problem for people who use only one OS, but those who have to learn to use a new OS (such as when going to work at a new organization) can struggle to get their head around how to do simple tasks like rename a folder, or find out where the file that they saved to their computer is located.