Hacker News new | past | comments | ask | show | jobs | submit login

Pros:

- Productivity: The browser renderer and Node (as well as the open source ecosystems that accompany those environments) offer you a lot. HTML, CSS and JS are relatively easy and because there are a lot of web programmers out there, your access to developers, developer resources and libraries is vast.

- One portable target: Develop your app for multiple operating systems without worrying about many of the problems inherent in web programming (ES6 support, CSS inconsistencies between browsers, etc.) or cross platform development (compilation, dynamic linking, header / include guards, etc.)

- Decent OS integration: Interacting with filesystem, native OS menu bars, notifications, etc. is fairly simple.

- Multiple language support: Electron uses JavaScript for application logic but you could alternatively use CoffeeScript, TypeScript, ClojureScript, Elm or any language that can compile to JS.

- Performance when you need it: Use something like node-ffi [1] or SWIG [2] if you need C or C++.

Cons:

- Memory usage: An Electron app is essentially a fully-featured Chromium browser and a Node process that communicate via IPC. This might be a bit bloated for some applications, particularly if you're targeting systems where memory is limited.

- Large builds: Packaged Electron apps contain everything they need to run so they're typically quite large. Don't be surprised if your "hello world" app ends up being over 30MB.

- Not truly native: Sure, you can make your app look great but the only way you can make it look 100% "native" is to use the widget toolkits of whatever operating systems you're targeting. Electron does not give you access to this.

- The DOM can be your worst enemy: This is where the performance issues of many Electron apps (Atom comes to mind) arise. Depending on the complexity of your app, you'll want to either limit how many elements you render to the page at any given moment or look into using something like HTML5 canvas to render.

- Single threaded: Node is single threaded. If true concurrency is important to you, you might consider another platform.

Overall, I love Electron. It's not the right choice for all applications but if you have experience developing for the web and want a desktop application platform that is easy to get into, I'd give it a shot.

[1] https://github.com/node-ffi/node-ffi

[2] http://www.swig.org/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: