Chrome Labs experiment adds another option for building website-ish applications
Developers looking for a way to write JavaScript apps without the Electron framework or NW.js now have another option called Carlo .
Released by Google Chrome Labs under an Apache License, Carlo is a framework for creating Node.js applications, packaged as desktop apps or launched from the command line, with the support of the Chrome browser. It differs from Electron and NW.js in that it relies on a locally installed version of Chrome rather than bundling Chromium and Node.js into a single runtime.
« Unlike with Electron, Node v8 and Chrome v8 engines are decoupled in Carlo, providing a maintainable model with the ability of the independent updates of the underlying components, » the project FAQs explain. « Carlo is less about branding and is more about productivity [and] giving the control over bundling to the user. »
Carlo apps should be more secure because they’re not be stuck with a specific build of Chromium; they’ll receive updates to their browser foundation through the local Chrome instance rather than waiting around for a new build.
They should also be more svelte because they won’t be carrying the weight of the Chromium code around with them. Carlo avoids this byte burden with the help of the Puppeteer Project, which handles communication with Chrome.
Puppeteer is a Node library for controlling Chrome or Chromium via API. It can be used to interact with « headless Chrome » – Chrome’s API without the browser window – or in the case of Carlo, « headful » apps that depend on the presence of a complete browser.
Carlo’s security advantage also comes with a downside. It opens up the possibility of apps breaking after Chrome updates itself if there are changes to its APIs. But that doesn’t happen too often for basic DOM and rendering systems.
Carlo isn’t tolerant of missing dependencies. It will throw an error if Chrome isn’t present on the local system. It also requires Node v7.6.0 or greater. And if you want to package Carlo up as a standalone app, Zeit’s pkg project can be used. ®
Sponsored: Following Bottomline’s journey to the Hybrid Cloud