O SlideShare utiliza cookies para otimizar a funcionalidade e o desempenho do site, assim como para apresentar publicidade mais relevante aos nossos usuários. Se você continuar a navegar o site, você aceita o uso de cookies. Leia nosso Contrato do Usuário e nossa Política de Privacidade.
O SlideShare utiliza cookies para otimizar a funcionalidade e o desempenho do site, assim como para apresentar publicidade mais relevante aos nossos usuários. Se você continuar a utilizar o site, você aceita o uso de cookies. Leia nossa Política de Privacidade e nosso Contrato do Usuário para obter mais detalhes.
Integrating them requires
• Using the same V8 engine instance
• Main loop integration
• Context Bridging
Use the same V8 engine
• Both Chromium and Node use the V8 engine
instance (Node use’s Chromium’s instance)
• The objects of Node and Chromium are in separate
contexts, in order to keep the namespace clean.
Main loop integration
• The author says that it would take “some efforts” to
merge both Node and Chromium’s main loops.
• Node uses libuv for the events loop, but Chromium
uses MessageLoop and MessagePump for its events
• The author integrates these at the browser render
process level, by making Chromium use a custom
version of the MessagePump class, built on top of
• It’s a tricky but important part of integrating Node
• The first step is to initialise Node’s context first
• Next, once Webkit’s DOM context is installed, Node’s
context is moved into Webkit’s context
• After that, Node’s start function is split into parts so
that it can run within the context of Webkit’s render
For more information
• See this link:
Let’s try displaying the
contents of my Home Folder
You can use not only Node’s
core modules, but also npm
installed modules too!
And we could iterate on this
• We could turn the list items into links for exploring folders
• We could use front-end libraries like jQuery-ui or
Bootstrap to improve the UI and make it display better
• We could make the file names (and possibly even contents)
searchable using Lunr.js or an embedded database.
• We could stream those files to a server for file
synchronisation (build your own Dropbox!)
• Node Webkit allows you to control how you want
the Window rendering to work
• You can specify set dimensions, whether full-
screen is allowed, and even if there’s a window
frame at all!
• Useful for creating fullscreen applications that run in
public places (Banks, Retail, Venues)
• Access to the operating system is disabled on Mac,
but you can gain access on Windows via Ctrl-Alt-Del
keys (otherwise it’s blocked by AV Software as it looks
like a virus to them)
call to leave kiosk mode anywhere in your app, you’ll
have to reboot your computer to regain access
Window rendering can also be
within the app
• To use it, the person would have to have Flash
installed on their computer
• Once they had installed the app onto the computer,
they would then be prompted to locate the
application’s content on the USB stick.
• Adobe Air is a declining platform (Linux no longer
supported, Flash is dying)
Last year, we decided to
consider using Node Webkit
to replace the Adobe Air app
A couple of weeks after the
event, we shipped the desktop
app, using Node Webkit
The app’s tech stack
• Node Webkit, with ffmpeg dependency added in for video
• Bootstrap 3 for the UI
• jQuery and Backbone for the front-end app
• Lunr.js for the search functionality
• Stylus, and Jade for creating the HTML and CSS files
• Hogan.js for templating
• Gulp for the building of the app’s files
• Users no longer had to install Flash or select the
USB from a Folder Dialog. A simpler, better user
• We were able to reuse some of the code from the
web application in the desktop application.
• It allowed us to standardise around a Node tech
stack within the company more.