NW.js Essentials
eBook - ePub

NW.js Essentials

Alessandro Benoit

Condividi libro
  1. 192 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

NW.js Essentials

Alessandro Benoit

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
NW.js Essentials è disponibile online in formato PDF/ePub?
Sì, puoi accedere a NW.js Essentials di Alessandro Benoit in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Computer Science e Programming in JavaScript. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
2015
ISBN
9781785280863

NW.js Essentials


Table of Contents

NW.js Essentials
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Errata
Piracy
Questions
1. Meet NW.js
NW.js under the hood
Features and drawbacks of NW.js
NW.js – usage scenarios
Popular NW.js applications
Downloading and installing NW.js
Installing NW.js on Mac OS X
Installing NW.js on Microsoft Windows
Installing NW.js on Linux
Development tools
Writing and running your first "Hello World" app
Running NW.js applications on Sublime Text 2
Running NW.js applications on Microsoft Windows
Running NW.js applications on Mac OS
Running NW.js applications on Linux
Summary
2. NW.js Native UI APIs
The App API – the core of your applications
Opening a file in your application natively
Accessing the application data folder path
Accessing the manifest file data
Best practices for closing applications
Registering system-wide hotkeys
Other app APIs
The Window API – working with windows on NW.js
Instantiating a new window object
Window – setting size and position of windows
Changing the window status
Fullscreen windows and the Kiosk mode
Frameless windows and drag regions
The taskbar icon – get the user's attention!
Closing windows
Other Window APIs
The Screen API – screen geometry functions
The Menu API – handling window and context menus
The contextual menu
The window menu
File dialogs – opening and saving files
Opening multiple files
Filtering by file type
Opening a directory
Saving files
Suggesting a default path
Opening files through file dragging
The Tray API – hide your application in plain sight
The Clipboard API – accessing the system clipboard
The Shell API – platform-dependent desktop functions
Summary
3. Leveraging the Power of Node.js
Routing and templating in NW.js
Node.js global and process objects
The window object
Using NW.js' main module
Handling paths in NW.js
NW.js context issues
Working with Node.js modules
Internal modules
Third-party modules written in JavaScript
Third-party modules with C/C++ add-ons
Summary
4. Data Persistence Solutions and Other Browser Web APIs
Data persistence solutions
Web storage
Web SQL Database
IndexedDB
XMLHttpRequest and BLOBs
Handling media files
Shedding some light on security issues
The Web Notifications API
Summary
5. Let's Put It All Together
Let's get started!
A matter of style
The HTML5 skeleton
Let's dive deep into the application logic
The application layer
Adding a new task
Loading all the tasks
Implementing export and sync features
The NativeUI layer
Implementing the Window menu
Implementing the Context menu
Restoring the window position
Implementing the Options window
Closing the application
Making the application open smoothly
Summary
6. Packaging Your Application for Distribution
The manifest file
The general logic behind the packaging procedure
Packaging NW.js applications for Mac OS X
Associating a file extension with your application
Packaging NW.js applications for Microsoft Windows
Registering a file type association on Microsoft Windows
Packaging NW.js applications for Linux
Adding icon and file type associations on Linux
Securing your source code
About NW.js application licensing
Summary
7. Automated Packaging Tools
Web2Executable
node-webkit-builder and grunt-node-webkit-builder
grunt-node-webkit-builder
generator-node-webkit
Summary
8. Let's Debug Your Application
Remote debugging
The DevTools API
Live reloading NW.js
Troubleshooting common issues
Summary
9. Taking Your Application to the Next Level
NW.js boilerplates
node-webkit-hipster-seed
angular-desktop-app
node-webkit-tomster-seed
node-webkit-boilerplate
nw-boilerplate
Development ideas
Resources and tutorials
Summary
Index

NW.js Essentials

Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: May 2015
Production reference: 1190515
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78528-086-3
www.packtpub.com

Credits

Author
Alessandro Benoit
Reviewers
Dan Bendell
Marco Fabbri
Julio Freitas
Commissioning Editor
Amarabha Banerjee
Acquisition Editor
Reshma Raman
Content Development Editor
Gaurav Sharma
Technical Editor
Humera Shaikh
Copy Editor
Sarang Chari
Project Coordinator
Harshal Ved
Proofreaders
Stephen Copestake
Safis Editing
Indexer
Mariammal Chettiyar
Graphics
Disha Haria
Abhinash Sahu
Production Coordinator
Alwin Roy
Cover Work
Alwin Roy

About the Author

Alessandro Benoit is a 31-year-old web developer from Italy. He currently works both with backend and frontend technologies, ranging from PHP development, mostly on WordPress and Laravel, to web design and building open source jQuery plugins. He's also an early adopter of NW.j...

Indice dei contenuti