NW.js Essentials
eBook - ePub

NW.js Essentials

Alessandro Benoit

Partager le livre
  1. 192 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

NW.js Essentials

Alessandro Benoit

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que NW.js Essentials est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  NW.js Essentials par Alessandro Benoit en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Computer Science et Programming in JavaScript. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
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...

Table des matiĂšres