This document discusses using web technologies like HTML5, CSS, and JavaScript for desktop application development using frameworks like node-webkit. Node-webkit allows creating desktop apps with web technologies by wrapping them in a native application shell using Chromium and node.js. It summarizes several frameworks for hybrid desktop apps including Adobe Air, QT, Chrome Apps, and node-webkit. Node-webkit is highlighted as a good option because it allows leveraging existing web development skills and has good support for native desktop capabilities and debugging tools. Examples are given of companies using node-webkit for kiosk apps, desktop programs, and hardware integration.
12. brackets-shell
• HTML5 + some v8 extensions (e.g. file access)!
• Made by Adobe for the Brackets code editor!
• “Note: The brackets-shell is only maintained for use
by the Brackets project.”!
• Distribution: Executable file
15. Hello world!
• What you need:!
• node-webkit!
• manifest (package.json)!
• HTML, JS
16. Running & testing
• Running!
• If nw is in the Terminal path: nw .!
• alias nw='open -a node-webkit'
• Testing!
• Chromedriver!
• Selenium
17. Debugging
• Chrome Dev Tools!
• DevTools Jail!
• Remote debugging!
• Sublime Text console
18. Packaging & distribution
• package.nw or package.json in the same
folder as the node-webkit executable!
• Packaging into the executable file!
• Windows and Linux - make a
package.nw file and run one command
from the console!
• OS X - copy the package to Content/
Resources/app.nw inside of the app
19. Native elements
• File dialogs!
• Files and folders!
• Opening URLs in the default browser!
• Opening files in the default app or in the file manager!
• Menu bar / status bar!
• Clipboard access!
• Kiosk mode!
• Frameless mode
24. Code protection
• v8 snapshot!
• Can hide a part (tens of KB) of the code into a
binary file!
• Platform & node-webkit version dependent!
• Little slower, loaded at startup
26. Infinum
• Three node-webkit project in the last year!
• Two kiosk mode apps for Windows!
• Desktop app for Windows and OSX
27. Crypto
• Decrypting about 50x faster than Adobe Air!
• Tens of ms instead of a few seconds per photo
28. Optical media
• Detection!
• Windows: periodically check all the letters!
• OSX: Watch /Volumes!
• File access!
• fs module
29. Auto update
• Not supported out of the box!
• Our own update detection & downloading!
• Windows: Installation wizard is downloaded!
• OSX: All the app files can be replaced while the app
is running
33. Node.js + Chromium
• Atwood’s Law:!
• “any application that can be written in JavaScript,
will eventually be written in JavaScript.”!
• http://www.reddit.com/r/atwoodslaw/