Electron Fiddle: Get started with Electron
electronjs.org
electronjs.org
Electronjs does the 3 Desktops (linux,windows,macos).
Tuari is new, serves the same user base, smaller, but you need learn Rust.
Flutter does 3 Desktops and 2 Mobile platforms(android,ios), but you need learn Dart.
While doing my own research, I eventually chose Flutter, reasons are:
* it does 5 platforms fairly well
* its user base keeps rising rapidly over recent years
* dart is very much java|c++|javascript syntax alike, just simpler, picking up dart at least is much easier for me comparing to Rust.I would rather build a desktop and mobile app using Dart with Flutter than with Rust using Tauri, especially with in a defined deadline or a rewrite.
Something just feels "off" when using a flutter app.
The most popular one I have seen is Indian Google Pay (which is different from global Google pay afaik) and that app has terrible performance even on a high end device like Pixel.
Coin by Zerodha (India's biggest stock broker) is also on Flutter but again, has sluggish scrolling.
Curious if this is true for other Flutter apps in the wild or just my experience.
a helloworld python single binary is 28MB with pyinstaller, c libraries are shared and it is not a static executable.
it uses gstreamer underneath? not sure what that means, do I need gstreamer preinstalled on the platforms?
this seems like yet another Python based GUI framework to me(e.g. a new Tkinter), or I'm missing something fundamental.
The name seems like a terrible idea, as it's so generic and unsearchable. It will be hard to find help with things, even if it becomes more widely used. The peer-to-peer stuff seems interesting, but the documentation is incomplete. Elsewhere the documentation says "It’s built from scratch, 1000 lines of code", but it's way more than 1000 lines (and it would have to be).
Oh, that component is <1000 lines, got it.
Whether or not it's officially released, you are already promoting it as an alternative to much more established options, so you should expect people to compare on the same terms.
I still have no idea how the "socket" magic works, need to be convinced, till then I will stay with flutter for now.
Would be fantastic especially for smaller software development companies that cannot afford to fund 3 dev teams.
But since there are restrictions on iOS, maybe it's less appealing to bother with Android? (You'd want to be able to say you support both mobile platforms, but you wouldn't be able to. And there wouldn't be a path toward doing that that's within your control.)
I believe the reason why people look to still be using Electron is simillar to why people use React. Sure it's a bit bloated, a bit hard to master, it has some design flaws, but it's well adopted, and hundreds of successful companies use it in production. Meanwhile Tauri is rust the new kid in the block.
Maybe try https://github.com/socketsupply/socket
> try https://github.com/socketsupply/socket
Points to an even less popular niche.
If you want popularity, there is already Electron.
Tauri uses the OS's native webview which means that there can be differences in how the DOM is displayed. It's not the same browser engine being used for each platform.
I’ve had a great experience using VSCode on occasion (I’m a JetBrains guy), and loads of other people, including some great programmers, rave about it. I’ve similarly had a fairly solid experience with Spotify desktop across different platforms.
I’m asking genuinely, is it such a subpar choice when there’s such proven success cases?
did it though? It might perform "good enough", but its still an order of magnitude worse than native solutions. the only reason to ever use Electron or similar is for rapid prototyping. once you have an MVP, you should immediately work towards a native solution. people seem to forget that part, out of laziness or ignorance.
Feature set and extensibility have clearly won here. At a certain performance point, it’s good enough and what you can do with it matters more.
I’m not sure you could achieve the sane flexibility in a more native, “bare-metal”, development environment. Possible, yes, but it would probably not be as successful as developing for it would be somewhat harder.
Vscode is “fast” enough. Its extensibility and its ecosystem are what makes it so popular and successful.
I’m not sure you can build the same without trade offs.
Also, it seems presumptuous to prescribe what appropriate solutions are for all people of all time. There are many, many places where an electronjs would be just fine.
And many where it wouldn't. It seems more presumptuous to me to demand that users have machines with that much memory and CPU to spare.
All of the chat apps that worked towards a native solution have died. Most of the other apps too, but all of the chat apps. Going native, despite being satisfying for the user, carries a maximum cost in terms of internal organization (several departments in the company for each target OS), HR (developers that can’t be recycled in other departments), marketing: “Wait, does HipChat MacOS has the same features as HipChat-on-the-mac-but-in-browser? Wait it doesn’t matter, HipChat is dead.”
I’ve never understood the hate Electron gets on HN, when it powers so many great products that users love.
You should try this in slack again...
Still better than Teams though. (Which is also in Electron.)
Also, still the app is almost worthless on my Android phone. Too slow, despite large improvement.
Electron is also how Microsoft essentially broke Skype (on purpose?) IMO.
For me Electron just stands for lazy companies/devs who are not interested in producing something elegant that runs as fast as possible.
If you drive with a empty truck with trailer it uses more oil than a car.
Chrome is not designed for this. There are other engines like https://sciter.com that are work for single apps, but probably scale bad if they are misused as a browser.
You're on a forum full of software developers, I think you can give us credit for knowing exactly how much resources the apps we use take up.
Personally, I frequently run VSCode, Slack, Zoom, Chrome, and occasionally Loom at the same time on a machine with 8gb ram and it's fine. Until one of these new platforms like Tauri or Socket.sh catches up, the trade off for developers being able to develop once and run on multiple platforms is entirely understandable and clearly acceptable to most people.
I have had Slack fill my home directory with logs once , long time ago. But that wasn't an electron problem.
If you already know JavaScript (lots of people do) & are trying to quickly get your App up & running, then it can make sense to just go with Electron rather than trying to learn a new language like Rust.
Both reasons were why I picked electron to build https://nocommandline.com
Yes, Electron Apps are big but in the grand scheme of things, they might not matter so much for now (laptops are being built with bigger memories, Apps are being improved to manage memory).
- Not everyone wants to learn Rust but want to use the same language throughout their stack
- Tauri is still new which means it is not considered "tried and true"
- More developers know how to use Electron or at least know enough Javascript to learn which means larger talent pool = cheaper and easier to replace developers if need be
- Last I checked (was not recently I admit), the build time for Tauri was abysmal
- I would argue very few gives a damn about smaller build sizes unless the problem space actually requires size to matter
In short, Electron is established tech and "good enough" while Tauri is the new kid in the block. It takes time for it to carve a space for itself. With all the Rust hype going on, I don't doubt it will happen.
Fun fact: I actually embarked on a project recently where my plan is to build the app in Electron first and once I had a change to learn Rust, I'll probably try to migrate the Electron app to something like Tauri.
Electron bundles the browser therefore the size.
I'm not sure many people are refusing electron apps due to the size, but they would definitely reject a buggy app that didn't work on their platform.
Not really seeing an advantage other than a smaller binary.
From my perspective Thunderbird, IntelliJ, Firefox, Chrome are extremely complicated pieces of software. My initial exposure to Qt is that it is a very difficult framework to use properly to build nontrivial applications. Not only do you have the barebones complexity of C (build everything yourself) or the overwhelming complexity of C++ (there's many ways of doing the same thing) you also have a graphical GUI framework AND a platform API to work with. It's simply a lot of moving parts.
I've written a few Java SWING GUIs and an electron app but I wouldn't want to use a low level programming language to build a GUI.
Optimistic: It is cheaper, as in time and cost, way to build products that users can enjoy and newer developers that only know web technologies can tip toe into platform apps.
Pessimistic: It’s not optimal and eats resources.
Me: I use it to build internal tools and don’t work on a potato so it can have all the resources it wants with my overkill machine.
Guess I’m somewhere in the middle lol.
There's another way to get started: grab Conveyor [1] (disclosure: my company makes it) and run
conveyor generate electron com.example.my-project
Then run "npm install" inside the generated directory. You can now hack on your app, add modules and so on, make a few edits to the conveyor.conf file and then run one command to create and upload packages for each OS. Signing and notarization are also handled even if you're on Windows or Linux.It works for real production-grade apps; there's an example of packaging GitHub Desktop [2] which covers more advanced stuff like registering URL handlers (deep linking), Windows notification callbacks and so on. Also works for Flutter [3] and native apps.
Finally, for people asking "Why Electron", the answers are pretty simple: Google invests a ton of money in Chrome, and the multi-vendor nature of HTML makes it largely immune to rewrites and platform churn of the sort that affects Windows, Linux, macOS, iOS and Android. It's got its problems but stability+investment isn't one of them, which is why there are so many developers who know it.
[1] https://hydraulic.software/
[2] https://hydraulic.software/blog/8-packaging-electron-apps.ht...
Maybe it’s my fault for thinking things would be as easy as Winform and Xaml, but this sounds promising.
Dedicated Electron-based apps are even worse than that: a separate set of processes running their own embedded version of Chrome.
No
“Are the runtimes accidentally bloat?”
Not accidentally
“Is it all the browser stuff and not the JS runtime per se?”
Basically, yes
“Or maybe just bad programming on the dev side?”
No
Essentially the reason Electron apps are so heavy is they run on a browser, not on an operating system.
In the beginning, programs ran directly on hardware, and things were good. (e.g. Pretty much every game would ship with a custom bootloader that knew how to address the hardware and exposed this to the program, you didn’t - couldn’t - have anything else running at the same time.)
Later on, programs ran on the operating system, and things were okay. Operating systems abstracted over all the possible hardware configurations in an acceptable way and users got the benefit of running multiple programs simultaneously without too much of a performance cost.
Now, programs run on the browser, itself a program running on the operating system. Because the browser wants to be a platform for any other program, it has to hook into almost every part of the operating system, so that it can support almost any program. This necessarily brings with it enormous bloat - in effect you’re running one general-purpose pseudo-OS framework per program.
At places I’ve worked there have been discussions about whether to use Electron. Something one dissenter said has stuck with me. “Imagine every Python module you imported ran in its own Docker container. You would quit, but that’s what we’re asking of users.”
I read a comment[0] by a developer who used SwiftUI for his app
> What took me 15 minutes on the web, it could take a day on SwiftUI.
It's just not possible for indie devs (or startups) to put that sort of time into native apps. Not to mention SwiftUI is still extremely broken despite being available for 3 years. Quoting from that article
> Every major iOS / macOS upgrade, I have to refactor my code because something crashes the new version. Imagine this happened on the browser.
At this point, unless Apple and MS provide a good component based abstraction for building native UIs (SwiftUI is a step in that direction) developers will keep going to Electron and other alternatives which let them write React (or svelte or even Flutter in the non-web land -- anything that lets them get actual work done)
[0] https://www.indiehackers.com/post/i-made-session-a-productiv...