4 ms·
I still live in the world of heavy desktop native apps (WinForms & WPF) and one thing I've never been able to understand about all of these Electron discussions
by vidanay 8y ago
I still live in the world of heavy desktop native apps (WinForms & WPF) and one thing I've never been able to understand about all of these Electron discussions is what benefit does Electron bring in the first place? Why not simply run the application and connect to it using the local browser instance? For convenience a link can be placed on the users desktop.
- deleted 8y ago[deleted]
- preommr 8y agoYou get access to some features that a browser doesn't allow like better access to a file system or taking a screenshot. Plus it gets rid of visual clutter like the tab bar and treats your app like an actual application rather than a simple website for viewing.
- arcticwombat 8y agoHow is that a selling point though? People using desktop toolsets never even have to think about that "problem" because it just doesn't exist when you're using the right tools. There are three types of tools for every job.. * The right kind * The wrong kind * The wrong kind but we'll make it work Electron hits squarely in the third category by hiding the browser and webserver and pretending it's a real desktop application.
- todd3834 8y agoIt’s all about cross platform support. The reason you will see advantages listed this way is because the web browser is the real competitor here. So when people talk about what Electron can do they are comparing to the most obvious alternative of a web app.
- arcticwombat 8y agoThe web browser is not the real competitor here, that's a web developer fallacy if ever I saw one. As soon as you move to the desktop, you're competing with the desktop toolsets. People comparing Electron to the browser is missing the entire point of what Electron is for, which is pretending to be a native application.
- JustSomeNobody 8y agoPretending or just ignoring because Electron is 95% developer benefit and 5% user benefit (only because the app might not exist otherwise).
- eschaton 8y agoYou’re also competing with native mobile tool sets on native. If you want to write software for a platform, write software for that platform. Don’t write software for some other platform, try to make it fit, and then declare it good.
- heisenbit 8y agoRunning a server app and pointing your browser to it may work for you. Less sophisticated users will struggle with this approach starting with coordinating two things. You are also getting some bundling advantages with it - in particular electron contains node (and the right version with which the app was tested) which is also not a given on innocent users computers. Last but not least one gets support for building bundles for multiple OS platforms. Java apps on the desktop became more prevalent and usable when Java was bundled in. The Electron is not so different from what worked for Java.
- arcticwombat 8y agoIt sells the dream of using web developer skills on the desktop, for those who want to develop native apps but don't want to learn new tools/languages. Square peg, round hole. Electron just gives you a hammer to make it fit anyway :)
- znpy 8y agoThis is the best description of electron and related technologies in a very long time, possibly ever. Thank you.
- todd3834 8y agoIt also sells the dream of writing an app that works on multiple platforms. The web is good at this but depending on what your app does you might need more. For instance, in Electron you have access to Node. This lets you do things that you wouldn’t be able to do in the browser. It would let you do lots of things but for example: access local file system, use SQLite or some other storage without requiring a network connection, add an icon to the menu bar or taskbar on Mac/Windows, you could even control a users mouse for something like screen sharing.
- arcticwombat 8y agoI write native applications, cross platform (I generally make releases for Windows, Mac, and Linux), and cross-compiled using FPC + Lazarus. No trickery, no hidden browser windows, just normal native executables. Java also solves the cross-platform issue, though it's GUIs tend to not look native (As opposed to Lazarus above, which is native). If you're impressed by a webserver being able to interact with the OS for things like accessing files or databases, your mind will be absolutely BLOWN when you learn real native development.
- todd3834 8y agoYou’re making an assumption I haven’t already learned real native development but that’s besides the point. Java does solve part of this but some people would rather use JavaScript than Java. Even if they know how to use both believe it or not. However, if one of your platforms is the web browser, nothing is going to work better than a web view if you want a cross platform solution. Slack for example works almost exactly the same in my web browser as it does in electron. If you want a solution that works on Linux, MacOS, and Windows AS WELL as the web browser then the web view approach is pretty obvious. Lastly the JavaScript web development experience is great with hot module relacement and Chrome’s developer tools. Not to mention the JavaScript open source community is amazingly strong and there is a lot of innovation going on. To simply dismiss all of this because of personal reasons is fine by me but I don’t agree with your view.