5 ms·
As a somewhat experienced Mac developer, I'm not sure what Electron brings to the table for a project like this. Why not create a simple Mac app with a web vie
by yarcob 5y ago
As a somewhat experienced Mac developer, I'm not sure what Electron brings to the table for a project like this.
Why not create a simple Mac app with a web view? AFAIK the overhead of electron is more than 100MB, for an app that could probably be distributed as a ~10MB ZIP archive.
A native Mac app with a web view would also have much less RAM overhead -- and you wouldn't need to worry about updating Electron, since you would just be using frameworks bundled with macOS.
Sure, Electron is theoretically cross-platform. But you are going to need a lot of platform-specific code to package the app for macOS, Windows, or Linux anyway.
Anyway, just my two cents. Maybe Electron is less scary to get started for a web developer. But if you start a project like this, I really recommend giving AppKit and Swift a try. There's lots of examples out there. Native development is easier than you think.
- pjmlp 5y agoWhat is even less scary is just to use the Web as is, and let the user keep just his favourite browser.
- da39a3ee 5y agoBecause he's not just targeting mac. The code for packaging electron for different platforms has already been written.
- Zababa 5y agoI copy-paster the "installation" code on Github, and it runs fine on my Linux. I doubt you could do that with a native Mac app.
- eatonphil 5y ago> Sure, Electron is theoretically cross-platform. But you are going to need a lot of platform-specific code to package the app for macOS, Windows, or Linux anyway. Not really. The most platform-specific code I've got in my app is 1) the CI install instructions that use brew rather than apt-get [0] and 2) what exists in the application menu [1]. For packaging, electron-packager [2] handles everything else platform specific. So my Windows, Linux, and macOS builds share the exact same script [3]. The result gets zipped and uploaded to the relevant Github release page. [0] https://github.com/multiprocessio/datastation/blob/master/.github/workflows/pull_requests.yml#L39 https://github.com/multiprocessio/datastation/blob/master/.g... [1] https://github.com/multiprocessio/datastation/blob/master/desktop/project.ts#L14 https://github.com/multiprocessio/datastation/blob/master/de... [2] https://github.com/electron/electron-packager https://github.com/electron/electron-packager [3] https://github.com/multiprocessio/datastation/blob/master/desktop/scripts/release.build https://github.com/multiprocessio/datastation/blob/master/de...
- yarcob 5y agoHave you tried opening your app on a Mac? macOS literally suggests you move it to the trash.
- eatonphil 5y agoYeah, it's not signed at the moment. And fair that that's an extra platform-specific step. Since my audience is developers and this is an early project I'm ok with them having to do the usual right-click Open and Open Anyway flow.
- yarcob 5y agoI feel it's a bit disingenuous to tell people how easy packaging Electron apps is when you skip the hard parts.
- eatonphil 5y agoYou can distribute native macOS apps that aren't signed too. It's a step everyone needs to do regardless of electron or native. So I don't think there's anything disingenuous here.
- yarcob 5y agoYou said that you don't need platform specific code, but it turns out that's because you just skip the platform specific stuff, resulting in a product that I would not consider ready to ship.
- barbarbar 5y agoWould that run on Linux and Windows?
- dugmartin 5y agoMaybe because the author wants to target more than 15% of the desktop market? https://gs.statcounter.com/os-market-share/desktop/worldwide https://gs.statcounter.com/os-market-share/desktop/worldwide Don't feel bad - I'm writing this on a Linux laptop which has less market share (2%) than "unknown" (8%) on that graph. I know it is a resource hog but I'm glad Electron is around so that I have access to the latest mainstream apps.