NW.js Essentials
eBook - ePub

NW.js Essentials

Alessandro Benoit

Buch teilen
  1. 192 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

NW.js Essentials

Alessandro Benoit

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist NW.js Essentials als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu NW.js Essentials von Alessandro Benoit im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Computer Science & Programming in JavaScript. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

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...

Inhaltsverzeichnis