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

I have what is probably a very naive question, as I am not well versed at all in Electron or web frameworks. I understand the complaints towards Electron, but I also see the appeal of developing utilizing a cross-platform browser. Is there a reason why developers can't simply have their application run in a local server? (Jupyter Notebook is an example that comes to mind.) This way, the user can use their browser of choice and doesn't have to have several installations of Chromium, while the developer can still utilize the web. I imagine it's more complex than this, but it's something I've been wondering.



Some reasons off the top of my head:

1) Local servers are a no-go for multiuser environments unless you want to log-on every time you run your "native" app, as most (all?) browsers don't support http over domain sockets and there is no authentication for local sockets.

2) Managing the health of the service properly in a cross-platform manner is complicated. With electron if the app crashes, it just crashes. With a local server the browser tab just stops working. Sure technical users can figure it out, but if you are targeting a gui over a console, presumably you are trying to capture some fraction of non-technical users.


Ignoring the multiuser issue, could not some javascript be injected that displays "crash" instructions (or even just closes the tab) in the event the server becomes unresponsive? I'm not a web dev, but this sounds feasible.


The intersection of <people who use Electron apps> and <simultaneous multi-user systems> is likely small enough to ignore.


There is no real problem of running the application on a local web-server. However, you might not even need a server. In fact, modern browsers are able to run apps even without servers.

So you might consider developing an app with vue/react/... and build it in a way to run independently from the server. The simplest way to do that is to cache it with a Manifest file, but modern browsers support ServiceWorkers too, which are a lot more powerful.

The only thing you will need a server for is the deployment (and maybe some sharing/sync logic).


This sounds like a great idea. It might be more confusing to people who don’t use computers as much, because interacting with your local computer over the web might feel strange, but there’s also the requirement to have a true native component acting as the server. Electron allows for zero truly native code to be written by the developer, which can help deal with inconsistencies between operating systems and configurations.


It's a usability thing. If users expect a desktop app and you ship a server + browser tab, it makes for a very confusing experience. In fact, the concept of having local servers is alien to most people. To them, browser == internet and desktop icon == local application. In addition, there are technical problems too, e.g: what if there's a crash?




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

Search: