Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
NW.js Essentials

You're reading from   NW.js Essentials Build native desktop applications for Windows, Mac OS, or Linux using the latest web technologies

Arrow left icon
Product type Paperback
Published in May 2015
Publisher
ISBN-13 9781785280863
Length 192 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

Table of Contents (11) Chapters Close

Preface 1. Meet NW.js FREE CHAPTER 2. NW.js Native UI APIs 3. Leveraging the Power of Node.js 4. Data Persistence Solutions and Other Browser Web APIs 5. Let's Put It All Together 6. Packaging Your Application for Distribution 7. Automated Packaging Tools 8. Let's Debug Your Application 9. Taking Your Application to the Next Level Index

Features and drawbacks of NW.js

Let's check some of the features that characterize NW.js:

  • NW.js allows us to realize modern desktop applications using HTML5, CSS3, JS, WebGL, and the full potential of Node.js, including the use of third-party modules
  • The Native UI API allows you to implement native lookalike applications with the support of menus, clipboards, tray icons, and file binding
  • Since Node.js and WebKit run within the same thread, NW.js has excellent performance
  • With NW.js, it is incredibly easy to port existing web applications to desktop applications
  • Thanks to the CLI and the presence of third-party tools, it's really easy to debug, package, and deploy applications on Microsoft Windows, Mac OS, and Linux

However, all that glitters is not gold. There are some cons to consider when developing an application with NW.js:

  • Size of the application: Since a copy of NW.js (70-90 MB) must be distributed along with each application, the size of the application makes it quite expensive compared to native applications. Anyway, if you're concerned about download times, compressing NW.js for distribution will save you about half the size.
  • Difficulties in distributing your application through Mac App Store: In this book, it will not be discussed (just do a search on Google), but even if the procedure is rather complex, you can distribute your NW.js application through Mac App Store. At the moment, it is not possible to deploy a NW.js application on Windows Store due to the different architecture of .appx applications.
  • Missing support for iOS or Android: Unlike other SDKs and libraries, at the moment, it is not possible to deploy an NW.js application on iOS or Android, and it does not seem to be possible to do so in the near future. However, the portability of the HTML, JavaScript, and CSS code that can be distributed on other platforms with tools such as PhoneGap or TideSDK should be considered. Unfortunately, this is not true for all of the features implemented using Node.js.
  • Stability: Finally, the platform is still quite young and not bug-free.

NW.js – usage scenarios

The flexibility and good performance of NW.js allows its use in countless scenarios, but, for convenience, I'm going to report only a few notable ones:

  • Development tools
  • Implementation of the GUI around existing CLI tools
  • Multimedia applications
  • Web services clients
  • Video games

The choice of development platform for a new project clearly depends only on the developer; for the overall aim of confronting facts, it may be useful to consider some specific scenarios where the use of NW.js might not be recommended:

  • When developing for a specific platform, graphic coherence is essential, and, perhaps, it is necessary to distribute the application through a store
  • If the performance factor limits the use of the preceding technologies
  • If the application does a massive use of the features provided by the application layer via Node.js and it has to be distributed to mobile devices

Popular NW.js applications

After summarizing the pros and cons of NW.js, let's not forget the real strength of the platform—the many applications built on top of NW.js that have already been distributed. We list a few that are worth noting:

  • Wunderlist for Windows 7: This is a to-do list / schedule management app used by millions
  • Cellist: This is an HTTP debugging proxy available on Mac App Store
  • Game Dev Tycoon: This is one of the first NW.js games that puts you in the shoes of a 1980s game developer
  • Intel® XDK: This is an HTML5 cross-platform solution that enables developers to write web and hybrid apps
You have been reading a chapter from
NW.js Essentials
Published in: May 2015
Publisher:
ISBN-13: 9781785280863
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image