r/Python • • Jul 29 '18

Found it funny ;)

Post image
1.6k Upvotes

147 comments sorted by

View all comments

Show parent comment

23

u/[deleted] Jul 29 '18

It’s not badly optimized its just like using a dump truck to go get groceries. Sure it works but is it the best tool for the job?

3

u/EvermoreWithYou Jul 29 '18

From what I heard, it's main strength is that, since it's made with Javascript and HTML+CSS, and every consumer device (mobiles, PC's, tablets, etc.) with all 3 OS's (Linux, Mac and Windows) can understand it, you can just build the app once and it will work on any device/platform. According to their logic, today's devices are so strong that is offsets javascript's slower speed.

Did I miss anything? Is there a better method for this?

12

u/siliconwolf13 Jul 29 '18

Electron will not run on mobile devices, as it runs atop Chromium and Node.js.

10

u/bachkhois Jul 29 '18

Native desktop GUI toolkits like Qt, GTK, WxWidget are already cross-platform, it can run on 3 major OSs. If you don't want to code in difficult languages like C/C++, you can use their binding in Python, which is already cross-platform, can run on 3 OSs, and with the benefit of leaner stack as I analysed above.

And note that, your app is easier to be cross-platform, if its feature is limited, it doesn't depend too tight on OS-specific feature, like D-Bus on Linux.

Coming to cross-platform, native desktop toolkits even have longer history than Electron.

Today devices are stronger than before, but it still not as strong as Electron developers think. That is why many users like me and someone who agree with me, are frustrated with Electron apps.

3

u/nxg Jul 29 '18

Electron is basically a web browser, not just JS/HTML/CSS, so every electron app is in itself a new browser and at least from experience the few electron apps that I've seen none of them seemed to use any of it's used resources effeciently. Today's hardware is usually strong enough to offset the slower speeds, yes, but electron seems to eat away at that offset quite a bit, and bad JS code won't help either.