Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the pros and cons of Chrome Apps compared to Electron?

Tags:

I want to program a desktop app in javascript (with web technologies) and looked for a comparison between Electron and Chrome Apps.

Everything I need seems to be possible with Chrome Apps, but there's a big hype around Electron/NW.js. What are the advantages of Electron? Is it due to the large amount of Node packages?

I think the functional differences are clear to me.

Pros and cons like:

+ Chrome Apps can run on Chrome OS   - Chrome Apps needs an installed Chrome Browser ... 

UPDATE 2016-08-20:

As Eduardo pointed out, Google announced that they'll discontinue Chrome Apps for all platforms except ChromeOS. So I think the answer to this question is obvious now.

For all of you who developed a Chrome App and are interested in migrating it to the web here's a guide from Google: https://developers.chrome.com/apps/migration

Or, as Google also mentioned, you migrate it to Electron or NW.js.

like image 682
miu Avatar asked Nov 25 '15 08:11

miu


People also ask

What is the benefit of Chrome apps?

Google Chrome apps are just web apps written in HTML5 that take advantage of new features like: canvas, video, SVG, WebGL, and a bunch of new APIs that can be accessed through JavaScript. They can be used for everything from geo-location, offline storage, and/or web workers for a sort of multithreading.

Is Electron just Chrome?

Web TechnologiesElectron uses Chromium and Node. js so you can build your app with HTML, CSS, and JavaScript.

Is Electron the best for desktop apps?

If you prefer working with projects that have a larger community, Electron is a great choice. If you use Rust and want fast desktop web apps, Tauri works well. Finally, if you want to get to market quickly, mobile support, and don't want to maintain two versions of your app, PWAs might work well.

Does Electron use Chrome or Chromium?

Under the hood, Electron is powered by the Chromium rendering engine and Node. js. Chromium is the open-source part of Google's Chrome browser.


2 Answers

You can totally compare electron and chrome packaged Apps. They are very similar. For both of them you get:

  • Develop your Desktop App using Web Technologies
  • App runs on top of Chrome
  • Automatic updates. Though in Chrome you get it for free, for Electron you need to do some work.
  • OS Integration - Both have better integrations with the OS than a normal website, but Electron supports a wider range of OS integration.
  • Work offline or online.
  • Both work on Linux, OSX and Windows. Chrome Web Apps also work on Chromebooks.

Here are the differences:

  • Electron uses node.js. So you can import many modules not easily available in Chrome Apps.
  • Distribution, with electron you package and distribute the app yourself. With Chrome Apps you distribute them through Chrome Webstore.
  • Environment. An Electron App is packaged with its full environment. Chrome Apps just use Chrome environment so they are lighter, but may behave differently for different users depending on the Chrome version they use.
  • Chrome Apps require the user to have Chrome installed, Electron doesn't.
  • Electron has better developer tools for testing and debugging.
  • Electron is an open source platform. Chrome Apps is also built on top of multiple open technologies but specially distribution is controlled by Google.
  • Electron documentation is much better even though it's a much younger platform.
  • Adoption: There are quite a lot of big and successful apps built on top of Electron such as Visual Studio Code, GitHub client, Slack. Chrome Apps just never picked up as much momentum.
  • Chrome Apps can be tightly integrated into Google Drive

UPDATE 2016-08-19:

It seems Google recently deprecated Chrome Apps on any platform other than ChromeOS. So I'd say it's no longer a valid option.

http://blog.chromium.org/2016/08/from-chrome-apps-to-web.html

like image 88
Eduardo Avatar answered Sep 20 '22 21:09

Eduardo


I think it is not really possible to compare electron and chrome-apps. It depends on, what your program should do.

So, when should I use electron?

On the first look electron looks like chrome, because the views of electron is based on the chrome browser. But electron is a full node.js environment with a chrome view on top. So the powerful features are not just insight the chrome part.

Like you mentioned there are a lot of node modules (over 1.700.000), which you can very easy install or update. You should also take a look at the node.js api (https://nodejs.org/api/). All that allows you to write complex apps, which are fully integrated on your desktop. For nearly all problems are some modules available.

With node you can first make your program with a command line interface and after that you can use electron to make a gui.

So, when you already have a online app which is written in JS, maybe a chrome-app is better. Chrome-apps are great for a google drive use. Or if you want to have a full integration in chrome-os.

So my pros for electron:

  • more than 1.700.000 modules over npm available
    • very easy integration of jQuery, Angular, React, ...
  • first make a program with a CLI and then make a gui
  • works perfect with github
  • very good desktop integration
  • provide windows installers
like image 33
apxp Avatar answered Sep 19 '22 21:09

apxp