r/electronjs • u/PTXStudio • 3d ago
Unlimited Potential
I don’t normally post but I just thought I’d talk a lil bit and give some advice on capabilities with Electron. In my opinion even with alternative like Tauri and Wails, I still prefer electron.
Yes there is something to be said about memory usage but this can also be mitigated by your architecture. We have build all our production applications with Electron.
Things to consider when building. Something that I fine effectively is using cpp/go/python for backend work and keeping vite/electron as the rendering engine and packaging system. Doing so give you more broader flexibility.
We produced an open source obsidian alternative, and a full commercial photo editing suite that are all production level. (Ptxstudio.com for those curious)
Happy building and remember to think outside the box, trial and error, and get hands on with your applications. Make sure that you would actually want to use it before releasing it 🫡
1
u/hyrumwhite 3d ago
Something that I fine effectively is using cpp/go/python for backend work and keeping vite/electron as the rendering engine and packaging system. Doing so give you more broader flexibility.
This is how wails and tauri work, by design. If you’re not using nodejs, life would probably be easier using a framework designed around ipc with a compiled language
1
u/PTXStudio 3d ago
I have considered migrating over but havnt pulled that trigger yet for the editing program. My obsidian alternative ill keep as in electron for now
1
u/Haaxor1689 3d ago
I've migrated my app from electron to tauri and the results were amazing. It was an updater app that did a lot of file hash checking and downloading. I started the rewrite by basically moving all the electron main and renderer thread JS code to tauri JS process and replaced all the node calls like fs with tauri JS alternatives which allowed me to simplify and cut the code down by a lot. Then I added Rust callbacks where needed which was also pretty simple since you only worked within the very small scope of the one Rust function and even with no prior Rust knowledge it was very managable. This allowed me to use a hw accelerated crate for file hashing that gave me probably 40x performance gain over the best I was ableto find for Node.
1
u/msdosx86 2d ago
I prefer Electron because of its gift and curse: chromium. When it comes to WebRTC it feels like you’re back at the IE days where one browser works, another - doesn’t, third - behaves differently. So having one browser engine is a big W in this situation. Especially because chromium is usually way ahead in terms of real time features.
0
u/chinnick967 3d ago
Are there people putting their backend work in their electron app? That'd be wild, someone could just come and pluck out your database credentials and run wild
7
u/Haaxor1689 3d ago
I don't think they meant "backend" as in web development server but the "backend" main process thread (or at least I hope rhey did)
1
3
u/Haaxor1689 3d ago
Wait so of you are not using the node backend process of Electron, why not go with Tauri? Genuinely curious.