ELECTRON: why people HATE it, why devs USE it

  Рет қаралды 177,990

The Linux Experiment

The Linux Experiment

Күн бұрын

Download the open source best practices report here: meet.tuxcare.com/idc-peerscap...
Grab a brand new laptop or desktop running Linux:www.tuxedocomputers.com/
👏 SUPPORT THE CHANNEL:
Get access to a weekly podcast, vote on the next topics I cover, and get your name in the credits:
KZbin: / @thelinuxexp
Patreon: / thelinuxexperiment
Or, you can donate whatever you want: paypal.me/thelinuxexp?locale....
📹 MORE VIDEOS FROM ME
Linux news in Shorts format: / @linuxshorts5136
Gaming on Linux: / @thelinuxgamingexperim...
I'm also on ODYSEE: odysee.com/$/invite/@TheLinux...
🏆 FOLLOW ME ELSEWHERE:
Twitter : / thelinuxexp
Mastodon: mastodon.social/web/@thelinuxEXP
Pixelfed: pixelfed.social/TLENick
Discord: / discord
📷 GEAR I USE:
Sony Alpha A6600 Mirrorless Camera: amzn.to/30zKyn7
Sigma 56mm Fixed Prime Lens: amzn.to/3aRvK5l
Logitech MX Master 3 Mouse: amzn.to/3BVI0Od
Bluetooth Space Grey Mac Keyboard: amzn.to/3jcJETZ
Logitech Brio 4K Webcam: amzn.to/3jgeTh9
LG Curved Ultrawide Monitor: amzn.to/3pcTVDH
Logitech White Speakers: amzn.to/3n6wSb0
Xbox Controller: amzn.to/3BWmIA3
Amazon Links are affiliate codes and generate small commissions to support the channel
This video is distributed under the Creative Commons Share Alike license.
#linux #electron #webdevelopment
00:00 Intro
00:33 Get a free study on open source best practices
01:38 How electron works
02:47 Why developers like electron
06:37 System integration isn't good
10:15 Disk usage and performance
13:03 Linux needs electron
14:54 Get a laptop or desktop that runs Linux out of the box
16:00 Support the channel
Discord issues with electron: theevilskeleton.gitlab.io/202...
OMGUbuntu list of electron apps: www.omgubuntu.co.uk/2019/02/b...
So, what IS electron, exactly?
electron is a framework that lets developers create applications using web technologies, like javascript, HTML or CSS. It's open source, and it's cross platform, meaning that apps built with electron run on Windows, Mac and Linux.
ectly inside of the app, instead of being accessed on the internet.
So why do developers go the electron route?
Developing apps using native technologies on all platforms takes a long time, a different set of skills and knowledge for each platform, and so you need more developers, more time, and more money.
Electron lets you develop ONCE.
Second reason: debugging code for web technologies like javascript is pretty easy compared to lower level languages like C, C++, or objective C. Javascript is interpreted line by line, so noticing where the error is is way easier.
Another reason is that electron apps can auto update very easily: all you have to do is make sure that your electron app can detect when the code for your website has changed, and download the new files on your computer, a quick reload of the page, and you're up to date.
But, electron has a bunch of issues as well.
First, electron doesn't integrate really well with the operating system: it's just a web browser displaying a website that is stored on your computer instead of being stored on a server. This means that if electron doesn't support a specific feature of your operating system, the apps using it also won't.
A bigger problem, though, is the fact that developers often don't update the electron base, or not often enough. Electron, using CHromium, needs to be as up to date as any web browser you'd use everyday, to ensure that security flaws are patched.
That's often not the case. And it gets worse when you take into consideration operating system integration. An example is Discord on Linux. It uses an older version of electron, that doesn't support Wayland very well. electron does have wayland support, and good support at that, but Discord, by not updating the electron version they use, deprive users of that support.
And then there's the performance and resource usage. Since electron apps ship basically the whole of chromium's codebase, they aren't small. Discord, for example, once installed, weighs more than 700 MB. Almost a gigabyte. Even the most basic of Hello World applications would take about 100MB, just to display a line of text.
And there's the performance impact: chromium isn't a lighweight browser at all. Discord, again, on my system, with all its processes, uses about 480 MB. And that RAM usage is the same whether the app is minimized to the tray or fully open. GIMP, when opening a new blank document, uses 500MB.
And still, specifically for us Linux users, electron means we get applications on Linux that we wouldn't have had otherwise.

Пікірлер: 1 000
@TheLinuxEXP
@TheLinuxEXP Жыл бұрын
Download the open source best practices report here: meet.tuxcare.com/idc-peerscape-study
@dwmexe9474
@dwmexe9474 Жыл бұрын
ok :)
@judedashiell5390
@judedashiell5390 Жыл бұрын
I may be incorrect on this one, but past practice and ongoing practice may prove me correct. One of the problems javascript has had in the past was missing screen reader accessibility standards and missing illustrative code examples developers could look at and learn from so accessibility on one level could be possible to implement. So even if a developer could find and clear errors they had no guarantee doing so would make their code accessible. All of this may have changed for the better by now but if I were going to study javascript the first place I'd want to get to for first learning would be that or those sites with the screen reader accessibility standards and illustrative code samples. The reason for that is I've always needed a screen readr be it on dos, windows, linux, vax 1108 computers, Iphone or android phones and tablets. Some of that time got spent testing websites for the Government and that experience was educational for all involved.
@AdamsTaiwan
@AdamsTaiwan Жыл бұрын
Wish PWA's would succeed in replacing Electron.
@sirrobertdowneysenior8080
@sirrobertdowneysenior8080 Жыл бұрын
I have one more task now before picking software to go js website and check whether it's based on electron if yes i just skip it and use other alternative. So much resources it consumes i dare all devs to use low spec machines and use such piece of crap. A simple note taking app why it has to open chromium? Plz don't use some shortcuts. Quality of software is affected using such shortcuts.
@friedrichhayek4862
@friedrichhayek4862 9 ай бұрын
3:14 You are getting it wrong. Native means anything that is not a webapp. Or at least you should take it in such way. And by the way GTK and Qt don't count as native by your own definition because both can export to Windows, Linux and Mac.
@swaggitypigfig8413
@swaggitypigfig8413 Жыл бұрын
TLDR: It makes it easy to develop because you develop once and ship to every platform so devs love it but the end result uses a lot of system resources so users hate it.
@therealsunnyk
@therealsunnyk Жыл бұрын
I think this is a common understanding because "devs" choose it after all, but it's often not clear cut. If a product has designers, then the designers want their own HIGs, not to have to bend to HIGs from each desktop, and Electron works better in that regard. There's also the benefit of having a single codebase, which is a positive if the web is a necessary target. This means that often managers and architects will pick Electron rather than engineers. To look at the counterpoint, why is "electron" not the most common target for mobile platforms? They have a separate codebase and HIGs but companies will often have a separate "mobile" team and "web" team, to the extent that Mac can actually run the same code as iOS now.
@TVPInterpolation
@TVPInterpolation Жыл бұрын
this doesnt have to be the case. there are many electron apps you may not even know that they in fact use electron, while keeping your resource usage low. why do i know that? im working on a interpolation software, and used to uee purely python + pyqt5 for back- and frontend. ive decided to now build the interface on top of npm/html/css/js. the resource usage is relatively minimal (when everything is loaded into the interface, its barely using 60mb of ram and 0.1% of my cpu)
@Freshbott2
@Freshbott2 Жыл бұрын
@@therealsunnyk they can be lazy on the desktop but they’d probs exceed the strict constraints on iOS and some things might not even be publishable on the App Store. On desktop they can get away with wasting resources. On Android even if you can why would you.
@dubbynelson
@dubbynelson Жыл бұрын
@@Freshbott2 ding ding ding
@fus3n
@fus3n Жыл бұрын
@@ZechariahB Yea i made like 2 apps in it the development process was easy but the app did not do well at all, tauri works best
@Al0011235813
@Al0011235813 Жыл бұрын
Another point: unused RAM can be used by the kernel to cache inodes (basically, applications/files that are frequently used by the user). RAM used up by electron to duplicate Chromium libraries can’t be used for caching.
@jan-lukas
@jan-lukas Жыл бұрын
Yeah, I usually get >50% RAM usage all the time, not because I have like only 4GB, but because just so much things are cached
@sefoi
@sefoi Жыл бұрын
Not only metadata , but data are cached also.
@ocsanik502
@ocsanik502 Жыл бұрын
@@ChipEstrada You really just went there....
@styleisaweapon
@styleisaweapon Жыл бұрын
@Xspire users are going to do that?
@diocre7446
@diocre7446 Жыл бұрын
We have Tauri now. No more Electron.
@katech6020
@katech6020 Жыл бұрын
tauri is a new alternative that doesn't share most of electron problems.
@AshtonSnapp
@AshtonSnapp Жыл бұрын
and it uses my favorite programming language for backend
@QmVuamFtaW4
@QmVuamFtaW4 Жыл бұрын
@@AshtonSnapp 🦀
@wclifton968gameplaystutorials
@wclifton968gameplaystutorials Жыл бұрын
There is also the Maui toolkit which is also cross-platform and is a KDE Project and as such integrates into the standard KDE UI Guidelines although I think Electron, Tauri and Maui toolkits are aimed at different types of developers or rather different types of applications...
@ANGELRA
@ANGELRA Жыл бұрын
Now I am learning svelte and I want to start learning to build apps with svelte and tauri
@katech6020
@katech6020 Жыл бұрын
@@ANGELRA I think you can do that easily with vite
@ingframin
@ingframin Жыл бұрын
To be honest, if Sun/Oracle did not screw up JavaFX, most devs would probably use Java rather than JavaScript for desktop apps.
@Rhyrkon
@Rhyrkon Жыл бұрын
TBH, javafx never really took off, same as gradle, despite both been really good.
@SIMULATAN
@SIMULATAN Жыл бұрын
I suppose the HTML and CSS capabilities of electron makes it much more convenient to use
@007arek
@007arek Жыл бұрын
JavaFX with native image would be great. The kotlin team wants to push their solution for desktop.
@ushieru
@ushieru Жыл бұрын
Flutter | Tauri > JavaFx
@w01dnick
@w01dnick Жыл бұрын
@@SIMULATAN html & css are ugly for ui, they were designed for documents, not ui and that is still true
@killermonkey1392
@killermonkey1392 Жыл бұрын
"Noticing where the error is is way easier." I could not disagree more. In TypeScript, sure, but debugging in JavaScript can be incredibly frustrating compared to compiled languages or even Python using type annotations and a capable linter.
@perseo10000
@perseo10000 Жыл бұрын
yeah i remember beign like two hours debugging a js code, and the error was like 50 lines above where the console said, and was a variable named incorrectly. I shutdown the computer after that lol.
@linus.
@linus. Жыл бұрын
Thank you very much for that comment I could not agree more. Other language compilers are much more integrated them the one of JS. The line by line execution argument is also incorrect as you can set Break points in also languages a lot more precise then in js.
@AnnCatsanndra
@AnnCatsanndra Жыл бұрын
Sorta depends. It's easier to make invisible mistakes in JS that can that months to be caught. But troubleshooting mishandling of memory in C can feel like blind guessing when it compiles fine and the errors at runtime is just like "lol garbage data somewhere, heck if we know where." So you have a system trying desperately to assume what was meant unintentionally hiding mistakes vs a system that does exactly what it was told and is just as confused as the writer that something is wrong.
@Chr0n0s38
@Chr0n0s38 Жыл бұрын
@@AnnCatsanndra That's why tools like valgrind exist. They're quite good at telling you what line of code triggers it, so then you can just step backwards.
@anon_y_mousse
@anon_y_mousse Жыл бұрын
@@AnnCatsanndra I maintain that it's mostly bad programmers that make those mistakes in C as not a lot of new developers come to it anymore. And there are a lot of tools for tracking down memory leaks if you really need it.
@nesogra
@nesogra Жыл бұрын
4:30 From a former QA tester: Javascript is only easier to debug if you are using Typescript or a good framework. Vanilla Javascript is one of the worst languages to debug because it can cast data from one type to another without you noticing if you aren't careful and different web browsers will sometimes treat the same Javascript code differently. These can cause bugs in the business logic that can go unnoticed until after the code is in production. Javascript can be awesome IF you have proper tooling around it but the core language itself isn't really that good.
@wallyhackenslacker
@wallyhackenslacker Жыл бұрын
Gotta love how Javascript's equality comparison is not commutative for elements of different data types. Fun times!
@mawnkey
@mawnkey Жыл бұрын
@@wallyhackenslacker I came from Python and C# to JavaScript. The first time I punched in == and didn't get a proper comparison like every other sane modern language on the planet I noped out on being a webdev. The more my JS obsessed webdev buddy showed me about the language, the further I ran screaming from it. Only language I hate more is PHP. Web development really has the absolute worst tools.
@d10valentin
@d10valentin Жыл бұрын
@@mawnkey hey! PHP is quite a respectable language! ... compared to js...
@harleyspeedthrust4013
@harleyspeedthrust4013 Жыл бұрын
agreed. javascript is an abomination and brendan eich should be absolutely ashamed of himself. on the other hand, typescript is a fantastic language with a rich and powerful type system. the type system alone can be used to write programs although i don't know why you would do that in production code. the only thing that bugs me about typescript is the maintainers' refusal to add any form of runtime type information. this is the one thing that keeps typescript from being all that it could be - imagine having runtime typechecking, you could receive some object from an api and with one simple operation you would know if that object would crash your code. i've worked extensively with the typescript compiler and typechecker and i think it could be done pretty easily. i haven't had the time to attempt it but it's next up in my project queue so i'll try it soon
@sonicbhoc
@sonicbhoc Жыл бұрын
@@mawnkey Look into the SAFE stack. F# code that is cross-compiled to JS. So far, I'm really loving it.
@ahsokaincognito
@ahsokaincognito Жыл бұрын
There is Tauri, which is similar to Electron but written in Rust for Rust developement. It's significantly faster and smaller from what I know
@miguelguthridge
@miguelguthridge Жыл бұрын
As far as I'm aware it's a very new project though, so I wouldn't expect many apps to use it for the time being, although it will hopefully be super awesome in the future.
@swordz2330
@swordz2330 Жыл бұрын
@@miguelguthridge it just got the full 1.0 release so its pretty much safe to use now
@knowledgenews5343
@knowledgenews5343 Жыл бұрын
Tauri relies on system webview, so soon you will encounter some web compatibility issues. They will be much harder to solve in Tauri because you have to support some ancient webview versions from outdated systems.
@swordz2330
@swordz2330 Жыл бұрын
@@knowledgenews5343 yeah it'll be interesting to see how that goes and if that will be the dealbreaker. Im really hoping for tauri to be good tho since Im tired with the problems of electron
@MaryamMaqdisi
@MaryamMaqdisi Жыл бұрын
Very excited for Tauri to take off. I hate Electron, it's just too slow and inefficient.
@krtirtho
@krtirtho Жыл бұрын
Just not Chrome. It ships the same JS engine V8 twice. One used inside Chrome & other one used inside Node Have you encountered extreme foolishness for minor simplicity? Well. If you had it was definitely Electron
@TheLinuxEXP
@TheLinuxEXP Жыл бұрын
Ah yeah, I had forgotten about that!
@krtirtho
@krtirtho Жыл бұрын
No problem dude. Imo, Flutter actually has great potential. Is lightweight and resource efficient and looks beautiful in every platform Different platforms has different APIs for refining UI and logic. But has a pretty similar API for painting or rendering graphics on the screen Employees at google took advantage of it and Google created a graphics rendering engine named *Skia* which uses platform specific rendering engines e.g OpenGL in Linux, DirectX in Windows, HTML canvas in web etc & creates an abstraction layer that can be used anywhere. Then using the Dart programming language flutter created an UI component layer & an event handling layer on top of it & that's why flutter is performent & developer friendly at the same time. Where other cross platform UI frameworks tend to use bindings to native UI Components directly which makes it hard to work with & they break really easily on slight dependency version change Here's a flutter app github.com/KRTirtho/spotube that I created which is a Spotify Client. Just compare their performance & size difference Btw, if possible use the nightly version. It has most features & more optimized & is about to be released Also there's tons of other Flutter apps that are really good & also open source. Just bing "awesome-flutter" (ok don't bing, maybe duckduckgo XD)
@quazar-omega
@quazar-omega Жыл бұрын
@@krtirtho I've been developing a Flutter app and in my experience there were several things that aren't really great yet, the UI part of things I really dig, but the things that are platform specific have been a pain to work with for me, for example, it might be my limted knowledge, but I didn't find any library to access common user directories (Desktop, Pictures, Music, ...). I think it has a big potential, but in terms of platform APIs it isn't there just yet
@wallyhackenslacker
@wallyhackenslacker Жыл бұрын
I think there is a blog post from an ex-Chrome developer mentioning how Electron is the most ridiculous case of software obesity because it contains a user-land driver for XBox 360 gamepads despite no developer ever needing such a thing, just because base Chrome has such a driver and Electron didn't remove it. The driver was in fact coded by the author of the post IIRC.
@krtirtho
@krtirtho Жыл бұрын
@@quazar-omega Well, in desktop you've access to entire filesystem so you can do operations on Directories by just providing their paths. But in the case of Android you'll need permissions. In the case of Android you'll need externalStorage permission. In iOS there's no way to access user directories except document/appdata directory since Apple doesn't give any permission to access user directories at all About platform APIs, it depends on what want to achieve. Yeah, the plugin community is relatively small but its growing gradually. Android, iOS, Mac & Web is fine, you can create plugins for them pretty easily if you know Kotlin, Obj-C/Swift & JavaScript which are relatively easy to learn & work with. But the elephant in the room is Windows & Linux's C++ MethodChannels. C++ simply sucks. Yeah its performant & has great lib support but this is not what a developer uses typically. I really hope the Flutter team will add support for an alternative language e.g Rust/Zig/Go for writing Windows & Linux platform specific code
@ProvAlex
@ProvAlex Жыл бұрын
I agree it is better to have apps than not have them. I just don't want Chromium on my computer. I wish there was a Firefox, WebKit, or Servo based solution for developers to make cross platform apps.
@TheLinuxEXP
@TheLinuxEXP Жыл бұрын
Agreed
@oro6768
@oro6768 Жыл бұрын
Firefox used to have PWA support, but got the feature removed recently. Now, Chromium holds pretty much a monopoly in PWAs.
@talkysassis
@talkysassis Жыл бұрын
@@oro6768 For firefox is just bad. But for webkit I can understand the reason. Apple don't want to lose their monopoly on the app store Imagine shipping your app as pwa on iOS just to dodge app store
@epicpasta8100
@epicpasta8100 Жыл бұрын
There's tauri
@w01dnick
@w01dnick Жыл бұрын
Even better, it should be some kind of webpack - bundle of HTML/CSS/JS with resources which could be run by own browser - Chrome or Firefox or some other. In such case at least sone concerns would be eliminated.
@angelobarato5585
@angelobarato5585 Жыл бұрын
Another alternative is also Godot, yes, the game engine. Some devs are creating desktop apps using it.
@TheLinuxEXP
@TheLinuxEXP Жыл бұрын
Damn I didn't know that!
@talkysassis
@talkysassis Жыл бұрын
It ships by using the only sane way to make linux apps You give me the app and the libs (the same way as windows) This way I'm safe from my repo killing my program for cutting packages
@conradfalloff991
@conradfalloff991 Жыл бұрын
My two complaints with Godot are: -You can’t easily strip features. If you’re making a text editor, it want to save space by removing 3d aspects of Godot, you have to build your own version of Godot, which not everybody wants to do. -Godot’s clipboard support only covers raw text. Formatted text, image data, or anything else is not supported (my best guess as to why is because that’s all that vanilla Android can normally handle) Other than that, I love it! Exports to basically everything, has a visual designer, can use GDscript (basically Python) or C#, I love it
@wallyhackenslacker
@wallyhackenslacker Жыл бұрын
The Godot IDE itself is written with Godot's own UI toolkit using Godot's own frameworks IIRC.
@nachnamevorname9801
@nachnamevorname9801 Жыл бұрын
@@wallyhackenslacker * insert hand drawing itself drawing itself image here *
@Bettehem
@Bettehem Жыл бұрын
I'm a developer and I avoid electron whenever possible. Just making a website and packaging it with a browser doesn't make it a good solution, but a lazy one.
@fgsaramago
@fgsaramago Жыл бұрын
Props to you. Especially on older laptop you can really notice how heavy electron apps are on the system
@gogudelagaze1585
@gogudelagaze1585 Жыл бұрын
And you distribute your apps for Windows, MacOS and Linux, right?
@juanignacioaschura9437
@juanignacioaschura9437 Жыл бұрын
@@gogudelagaze1585 It's not lazier to develop and distribute an app to a single OS. OP's point still stands, git gud or get out.
@bltzcstrnx
@bltzcstrnx Жыл бұрын
@@juanignacioaschura9437 if git gud or get out really stands, we wouldn't have this conversation by now. I know you like to be idealistic and such, and I don't like raining on your parade. The reality is most professional IT are done on good enough basis, and Electron is just that, simple and good enough framework that runs on almost any OS.
@juanignacioaschura9437
@juanignacioaschura9437 Жыл бұрын
@@bltzcstrnx With performance issues that cripple low-end PCs? No, thank you. It's lazy. If being able to ship an application to low-end and high-end hardware alike, a BASIC requirement for all software products for daily use and non-productive focus, is "being idealistic", then so be it. Just because the First World is spoiled with multi-core chips and lots of RAM, doesn't mean the rest of the globe is on the same boat. Develop for the masses, not for the classes.
@theodoros_1234
@theodoros_1234 Жыл бұрын
Devs don't have to resort to Electron to make cross-platform apps! GTK and Qt are also cross platform (GIMP and OBS are two examples of apps that meet this criteria). As a dev and KDE user, I've used Qt for my apps a few times, and it seems to work just as well on Windows as it does on Linux. It even picks up the native theme of each OS, but it also lets the dev choose a custom theme for their app (just like OBS does, actually it lets you switch between different themes or the default OS theme).
@hanro50
@hanro50 Жыл бұрын
Issue with QT and GTK is the complexity of getting it going. Sure it is fine if you're using QT Creator as your IDE of choice, but still it takes time to get working. With electron you can hit the ground running quickly and the chromium Dev tools allow you to make GUI tweaks on the fly and immediately get feedback.
@gbfgtki
@gbfgtki Жыл бұрын
Another issue with Qt is the licensing. While Electron is under the MIT license and can be freely redistributed in proprietary apps, many Qt components are under the GPL, which requires any app using them to be under GPL as well, including making its source code available, or to buy an expensive license from the Qt company. Don't think I can put links here, so search for "qt features" for more information
@cromefire_
@cromefire_ Жыл бұрын
And both are sadly a royal pain, if you don't want to use C/C++
@shroomer3867
@shroomer3867 Жыл бұрын
@@hanro50 Qt is easy enough if you know CMake. If not then yes it's a pain to learn but pretty useful. It allows integration of C++ and C libraries which can be really good.
@battlebuddy4517
@battlebuddy4517 Жыл бұрын
Who in the hell designed the qt creator interface
@upolpi3171
@upolpi3171 Жыл бұрын
To regular Linux users out there: Electron isn't the only cross-platform UI toolkit. GTK, Qt with QML, Flutter, Tauri, can do the same and more in a more secure, efficient, and convenient way. To Electron developers: Don't fear native development! I used to think everything outside the modern web stack was too complicated, outdated, and unusable. I've learned Go and then Rust, and saw how JS and Python encouraged bad practices. I saw how CSS was just needlessly weird. If you prefer using TS+Electron for your app, it's fine. Just don't be afraid to learn new things.
@jan-lukas
@jan-lukas Жыл бұрын
THIS It might be really difficult to properly learn languages like C++, but when you're done with it, you have learned something you wouldn't have in python or so. I don't think actually implementing stuff in C++ should be done anymore, developing can be done in python or so, but I strongly encourage everyone to learn more than just the "easiest" languages, to get to know many design patterns you just wouldn't know otherwise. I myself started with Java, and when I started learning C++ I had so many "aha, that's how computers work" moments that I can't even tell you half of them, and I want to learn about functional programming & haskell soon
@KillFrenzy96
@KillFrenzy96 Жыл бұрын
I never really liked Python or JavaScript. Not having explicit types makes my code much less predictable and destroys the ability for an IDE to provide robust autocomplete.
@bogdahn689
@bogdahn689 Жыл бұрын
@@KillFrenzy96 there is typescript for that. It's a pain in this as to code in js...
@NoorquackerInd
@NoorquackerInd Жыл бұрын
The entire modern web stack is way too complicated and unusable lmao People really see 1.5gb node_modules and go "ah yes, cutting-edge"
@gogudelagaze1585
@gogudelagaze1585 Жыл бұрын
GTK looks like utter garbage on KDE, Windows and MacOS. Qt looks like garbage on GNOME and Windows. Flutter/Tauri are strictly better than Electron, but have the same issue of relying on a browser. There's no good crossplatform UI.
@nosotrosloslobosestamosreg4115
@nosotrosloslobosestamosreg4115 Жыл бұрын
I'm on Linux just one year, never into informatics, but somehow Linux made me got this new interest.... Channels like this one shows me how dense and multilayered is the infrastructure our lifestyle relies on.
@wallyhackenslacker
@wallyhackenslacker Жыл бұрын
So basically it is fulfilling the promise of Java back in the 90's, that of letting companies -develop on the cheap by having one team developing for all platforms at the same time- write once, run everywhere. And it still feels as out of place on any desktop as most Java applications. If anything the one reason I really dislike Electron is because it encourages a que será será attitude towards memory and execution time optimization.
@anon2036
@anon2036 Жыл бұрын
write once, debug everywhere.
@knoopx
@knoopx Жыл бұрын
electron needs to be shipped as a runtime and apps as packages, not full blown copies of chromium. that would solve many complaints against it.
@AwesomeOrange1000
@AwesomeOrange1000 Жыл бұрын
This!! Electron is a perfect candidate to become a runtime. It's only when an app uses custom builds of chromium or node that some duplication would occur, but I'd guess that the vast majority of apps don't do so.
@Servidor_Publico_do_Ancapistao
@Servidor_Publico_do_Ancapistao Жыл бұрын
Java 2.0?
@leduyquang753
@leduyquang753 Жыл бұрын
The reality is going in the reverse direction, unfortunately. Oracle is no longer shipping Java runtimes after version 8, instead they tell people to pack the runtime along with their app.
@AwesomeOrange1000
@AwesomeOrange1000 Жыл бұрын
I feel like it'd be fine if Electron was bootstrapped by the installer as an included dependency. Like how many windows programs used to bundle .NET Framework 4 before windows started providing it. And also how old games used to include DirectX versions that they depend on in the installation. Technically it's a bit different from a runtime like Java but close enough. Even now multiple apps include redistributables as part of the install process and if it's already installed then no duplication occurs. I think the main reason why Java couldn't be included in the install process and had to be downloaded separately by the user was because of licensing issues, but I'm not sure so don't quote me on that. Electron as it's own redistributable package dependency thing would be perfect. But it'd need to be standardized by the electron maintainers and electron users.
@judedashiell5390
@judedashiell5390 Жыл бұрын
Electron has serious screen reader accessibility prblems. Microsoft didn't start to clean up skypeforlinux until its second release using electron. Like javascript it's easy to write non-compliant code.
@hindigente
@hindigente Жыл бұрын
Despite personally leaning more towards the user side of the argument, I like your nuanced stance on this sort of things.
@PixelTrik
@PixelTrik Жыл бұрын
The best way IMO to build Linux apps is to design your applications with loose coupling to begin with. From what I've heard about Adobe suite is that their software is tightly coupled with windows and Mac and will require significant work to port to Linux. Eric S Raymond has specified some of the best engineering practices followed on Linux in the book 'The Art of Unix Programming' which includes cross platform applications like GIMP and how they are designed.
@dealloc
@dealloc Жыл бұрын
Unfortunately it's not as clear cut as it may seem. Tight integrations allows software to use the system's features for optimization reasons. Abstractions can add overhead and incompatibility issues (i.e. one system may not support the feature of another). Linux is especially difficult due to the distros having a different combinations of compositors, desktop environments, drivers, and more each with different levels of features and compatibility. Supporting that while providing high performance is not easy; in some cases impossible which results in inconsistencies.
@PixelTrik
@PixelTrik Жыл бұрын
@@dealloc Since I develop games for Windows and Linux in my day job, I got stuff to unpack based on experience. If you're planning abstractions right, the cost will be low, especially with languages like C++ and Rust. That's what senior software engineers are payed for, they work on software to keep them maintainable and performant. From my experience of developing GUI softwares, desktop environments and compositors don't dictate the front end at all. It's the widget set that dictates aesthetic and application programmers don't interact with window managers or compositors. As about drivers, unless you customize your Linux kernel, they're standard across all distributions. The fragmentation isn't as bad as you're saying especially the parameters you've provided.
@dealloc
@dealloc Жыл бұрын
@@PixelTrik Photoshop and other Adobe applications are doing much more than just rendering a GUI.
@PixelTrik
@PixelTrik Жыл бұрын
@@dealloc Not sure how that defends your point.
@uis246
@uis246 7 ай бұрын
​@@dealloc least thing application programmer should care are drivers. What's next? Caring about GPU vendor?
@thingsiplay
@thingsiplay Жыл бұрын
The electron is a subatomic particle whose electric charge is negative one elementary charge.
@TheLinuxEXP
@TheLinuxEXP Жыл бұрын
There's that as well 😅
@Tn5421Me
@Tn5421Me Жыл бұрын
Tragic
@veikkaheikkila7568
@veikkaheikkila7568 Жыл бұрын
As a developer, yes. I love it. As a Linux user, yes. I hate it. It just screws up my full dark themed consistent desktop.
@TheLinuxEXP
@TheLinuxEXP Жыл бұрын
Yeah, the inconsistency is super frustrating
@VictorMartins239
@VictorMartins239 Жыл бұрын
I am a developer and hate it, it's just bloatware. I prefer using Tauri
@vaisakhkm783
@vaisakhkm783 Жыл бұрын
@@VictorMartins239 as a developer who uses less 'c' nowadays, i love electron and make side project on it,while thrashing microsoft for making teams in electron while screen sharing
@VictorMartins239
@VictorMartins239 Жыл бұрын
@@vaisakhkm783 I just can't like electron because of chromium. Have you tried Tauri?
@upolpi3171
@upolpi3171 Жыл бұрын
I used to love web design until I discovered how terrible it is compared to native UI toolkits. The truth is that the web was built for fancy text pages, not full apps, which leads to the tools being less than ideal. GTK, Qt, and Android/iOS UI toolkit are much more productive to work with after you learn the basics. If you like it this way, it's fine, but just give QML or Rust+Gtk4 a try.
@hanzofuma
@hanzofuma Жыл бұрын
I respect the Electron framework. Thanks to him we got a huge number of apps that we never thought it will be available on Linux. it's true that it has performance issues and all that but there is new frameworks like Tauri that hopefully can replace Electron one day. As a developer i understand why devs choose Web tech instead of native GUI toolkits cuz it's way easier thanks espacially to CSS that gives the dev the power to make awesome UI/Animations with less effort compared to Qt, GTK, Winui, ...
@etaashmathamsetty7399
@etaashmathamsetty7399 Жыл бұрын
4:52 it is way more difficult to figure out where javascript messes up, this was actually what caused a kde bug with the floating panel refactoring. JS basically just runs your code (without checking if it's syntax is ok!!!!) and just keeps running it until it crashes and burns, returning some cryptic errors for a simple syntax error like a missing semi-colon or curly brace. (or even reading from a variable you never created (which was what caused the kde bug), yep before you ask JS is that stupid) the creators of other scripting languages actually had a brain and implemented a system where it checks for basic errors BEFORE running the script. this is why most people prefer typescript now days instead of js, the creator of typescript actually had a brain and made a pretty decent language
@circuit10
@circuit10 Жыл бұрын
This is mostly wrong, of course JS checks your syntax. It just doesn't require semicolons, which is quite common in programming languages (Python, Kotlin etc). Curly braces in JS behave the same as in other languages. Here is the error Firefox gives for a missing curly brace (at parse time, not runtime): "Uncaught SyntaxError: missing } in compound statement (debugger eval code:6:2) note: { opened at line 1, column 7" That's not cryptic at all and even tells you exactly where you opened it. Can you link me to this bug? It won't just randomly read a variable that doesn't exist, unless you're using the old var syntax rather than let which does act a bit strangely and lets you read variables before they're declared. I'm not saying JS is perfect, but this is just not true
@etaashmathamsetty7399
@etaashmathamsetty7399 Жыл бұрын
@@circuit10 you can check Nicolo ve's channel its one of the more recent videos And Firefox has a good js linter and whatnot, vanilla js's error checking is just really bad and I hate js for that typescript is what you should be using, because JavaScript doesn't even care if a variable is undefined it just doesn't say anything and dies
@circuit10
@circuit10 Жыл бұрын
@@etaashmathamsetty7399 Oh, you mean JS returning undefined when a property doesn’t exist? True, that is annoying. I’m pretty sure the JS syntax checking is part of the language specification and should be consistent across browsers, though.
@etaashmathamsetty7399
@etaashmathamsetty7399 Жыл бұрын
@@circuit10 good to know I usually just avoid JS these days so yeah
@ajitmali3821
@ajitmali3821 Ай бұрын
whotever you say I like JS😁 You just need more exp for JS
@notarandom7
@notarandom7 Жыл бұрын
I personally use Tauri. An Alternative to Electron that uses Webview instead of Chromium which makes it alot smaller and faster. It also uses Rust for the Backend giving it even more peformance!
@akza0729
@akza0729 Жыл бұрын
Ya. Webview's JS is not really performant enough like V8 is. So Probably most won't bother switching.
@notarandom7
@notarandom7 Жыл бұрын
@@akza0729 actually it is. Webview uses Chromium which is using V8 aswell ofc giving it the same if not more peformance because of how lightweight it is
@akza0729
@akza0729 Жыл бұрын
@@notarandom7 Um. Nope. Android Webview is Chromium. Linux users Webkit Gtk or QtWebview both off which are fork of Apple's Webkit. Mac uses Webkit same as Safari. Windows should be using Edge and new Edge is basically a Chromium. Edit: Remember. Tauri uses the OS's native Webview. It's doesn't ship a Chromium or browser parts.
@notarandom7
@notarandom7 Жыл бұрын
@@akza0729 webkit is faster than V8. You can see that with the recently released js runtime called bun which can be 30x faster than Node and Deno
@jan-lukas
@jan-lukas Жыл бұрын
How about: link an actual benchmark?
@nintendowiids12
@nintendowiids12 Жыл бұрын
Quite frustrating to see Discord, a very big and rich company slacking off at updating the Linux Discord app where its fixes are already upstream, so they don' t even have to bother doing much work!
@TheLinuxEXP
@TheLinuxEXP Жыл бұрын
Yeah, it's really annoying. Porting their patches to electron to a new version would take them a few weeks at most
@DeeezNuts
@DeeezNuts Жыл бұрын
@@TheLinuxEXP they can go open source and get free labor
@TheExileFox
@TheExileFox Жыл бұрын
@@TheLinuxEXP The worst part is when your package manager lags behind. Discord will then lock you out until you obtain the new version. There is no option to skip an update so you just have to wait for it or pull from somewhere else (i.e. Manjaro could pull from AUR) - Alternatively you could run discord inside your browser and never get locked out.
@TuxPeng
@TuxPeng Жыл бұрын
3:13 QT compiles nicely and the GUI in really close to native on Mac and Win. GTK took a bit longer to get there, but is pretty good with cross platform too
@ioneocla6577
@ioneocla6577 Жыл бұрын
Gtk looks pretty horrible on other platforms then linux. And the whole point of electron is is to reuse their web skills for desktop apps. Considering that qt is c++ only and gtk is junky in languages other then C C++ python or rust Don't get me wrong, i really don't like electron too but qt and gtk doesn't seem like a good alternative
@TuxPeng
@TuxPeng Жыл бұрын
@@ioneocla6577 or some things electron does work but I generally don't like it either. Gtk actually looks okay on Windows and not too bad on Mac, I think QT is generally a good compromise. I haven't use them, but there are Go & Rust bindings for QT
@upolpi3171
@upolpi3171 Жыл бұрын
@@ioneocla6577 Qt has different bindings for different languages. It also has QML, which feels like Flutter with JS without the awful developer experience of CSS.
@ioneocla6577
@ioneocla6577 Жыл бұрын
@@upolpi3171 Can you name some well maintained qt binding please ? Appart from pyQT maybe
@bestledisthe
@bestledisthe Жыл бұрын
@@ioneocla6577 ritual for Rust
@FunnyHacks
@FunnyHacks Жыл бұрын
Thanks for covering this. The theming is a massive one for me. For accessibility reasons, I _need_ a black theme (grey doesn't cut it.) And accent colours matter just as much.
@Dichill
@Dichill Жыл бұрын
There is also QT & QML where they allow html and js in their own engine. QT & QML is also used a lot in IOT devices.
@daereanlegrand2471
@daereanlegrand2471 Жыл бұрын
As a electron dev I hate electron so much is easy to use but is the literal bloat hell.
@BenjaminWagener
@BenjaminWagener Жыл бұрын
Microsoft is working on minimizing that problem integrating WebView2 not only in Windows 11, but also in Windows 10 in 22H2. So all the Webapps could share a central, always asap updated instance of Chromium (Edge Version) instead of running each their own, like they also do on Android and in iOS (WebKit). What would mean a way less usage of space in RAM and on Disk/SSD. MacOS has something similar build in based on WebKit. Linux distributions should have no problem to deliver such an option as well. Hopefully the developers will adapt to this very soon.
@ioneocla6577
@ioneocla6577 Жыл бұрын
It already exists with webkit-gtk on gnome/gtk based desktops and gt-webengine on kde/qt based desktops
@BenjaminWagener
@BenjaminWagener Жыл бұрын
@@ioneocla6577 Don't know if they work equally well, but cool if so.
@JeremyKolassa
@JeremyKolassa Жыл бұрын
Thank you for this video. I've long thought about creating a desktop app, but as a JavaScript developer (mainly), I wasn't sure which route to go. This has given me a lot of food for thought.
@mattfromeurope
@mattfromeurope Жыл бұрын
Electron could have gone the Java route by adding some sort of "virtual machine" that's native to the system and build apps from there (installing the VM when it's not yet installed). But instead, they're adding the whole Chromium engine to the app EVERY SINGLE TIME!. That's real bloat!
@Tn5421Me
@Tn5421Me Жыл бұрын
Because using system electron is too hard
@Philipp..
@Philipp.. Жыл бұрын
I hope one day there will be an universal electron web view in every OS so the individual electron apps don't have to ship the whole browser
@imhemish
@imhemish Жыл бұрын
it already exists in linux, just the companies wont do that, if you just install packages like electron, electron13, electron16, all the electron apps can run in same chromium windows. The company does not do that but community does, example arch user repo has discord_arch_electron which uses system electron packages, but there is catch in that too, discord would use electron 13, but other electron apps need electron 16 and some even 17, so in that case too, you would be running three electron separate electron instances
@knoopx
@knoopx Жыл бұрын
@@imhemish to be honest there's a lot of room for improvement to be used as a runtime... that's probably why is not widely used.
@rougenaxela
@rougenaxela Жыл бұрын
What I'd like to see happen, is for Electron to shift to a model where there only needs to be a single instance of the Electron runtime on a computer, and it's updated on it's own independent of the applications built with the runtime.
@uis246
@uis246 7 ай бұрын
But that would mean developers should do what shitty developers can't: remember about package manager.
@narutrixil
@narutrixil Жыл бұрын
As a user and a developer I don't like electron, its too slow and bloated (Also makes XSS possible for desktop apps). 2:56, Are electron apps native to all systems? They still run on the V8 engine, or do they compile ahead of time? 3:10 Gtk and QT are cross platform, you can use them in windows and mac. Its obvious why developers gravitate to electron, the web is the most popular platform to deliver apps, so focusing you effort on your web app and using minimal code to deliver a "desktop" version is efficient for developers. From my experience most electron apps are just clients for a remote service (discord, slack, etc...), and most of them can live inside the sandbox of the browser. For these apps I just prefer PWAs (or even just a bookmark), since at least I won't have to run multiple instances of V8.
@talkysassis
@talkysassis Жыл бұрын
The problem is that some apps have exclusive features to the desktop version
@narutrixil
@narutrixil Жыл бұрын
Also, if you run web apps in your browser you can use extensions to block trackers or force dark mode.
@narutrixil
@narutrixil Жыл бұрын
@@talkysassis Which apps? Web first apps I use on the daily run perfectly on my browser (even stuff like Zoom).
@talkysassis
@talkysassis Жыл бұрын
@@narutrixil Teams have some features that came months earlier on desktop
@narutrixil
@narutrixil Жыл бұрын
@@talkysassis Oh, that sucks :\
@ruckboger
@ruckboger Жыл бұрын
Developers love it because tools we use are based on Electron, like VSCode and Obsidian.
@ProjSHiNKiROU
@ProjSHiNKiROU Жыл бұрын
For resource efficiency, I want to see an Electron shared dependency so Electron is installed once if you have VS Code and Discord installed. To completely quell the complaint of memory usage, share Electron rendering/scripting processes between VS Code and Discord but that’s a security and stability horror story.
@uis246
@uis246 7 ай бұрын
But that would mean developers should do what shitty developers fear to do: remember about user and package manager
@anon_y_mousse
@anon_y_mousse Жыл бұрын
This is why I develop with C. Write once, compile anywhere. As long as I don't use weirdo libraries most platforms have the same basic functionality and layout and things just work. Also, even though I'm a KDE user, I still use GTK to write GUI's because it's written in C and it just works everywhere. I can't recall ever writing something that took up 100mb of space, for just the program itself anyway.
@user-he4ef9br7z
@user-he4ef9br7z Жыл бұрын
C varies vastly on different machines. I don't understand how you get the write once compile everywhere idea. You'd have to write gigabytes of macros for that to happen.
@meowcula
@meowcula Жыл бұрын
Your summation at the end was perfect. It's enriching the ecosystem so have at it. We, as users, can always choose native alternatives where available. I have a sort of system. I will favour a native app over one that's delivered via flatpak, snap etc. Electron falls into that second category.
@nextlifeonearth
@nextlifeonearth Жыл бұрын
I have a far different experience with electron regarding debugging versus C and the like. With something like GDB you can debug just as easily as js in the browser, but if the browser code was a compiler target (like if your application was written in typescript) then the debugging will be bound to said target code, not the source code. There are ways, but it's not as straight forward as you make it out to be compared to compiled languages.
@rathmox
@rathmox Жыл бұрын
I don't hate Electron, but Lunar Client for Minecraft is built on Electron which, in my opinion, isn't really optimized, compared to Discord which is just not donc correctly on Linux
@timothygibney159
@timothygibney159 Жыл бұрын
Try it with Wayland if you 💬 no discord for nodejs is bad
@SurmenianSoldier
@SurmenianSoldier Жыл бұрын
@@timothygibney159 what
@perelmanych
@perelmanych Жыл бұрын
Thanks for the nice video! Btw, image quality is outstanding. What do you use to record it?
@coffee-is-power
@coffee-is-power Жыл бұрын
There's already a electron alternative which lets you write a backend in rust and you can use any JS framework on the frontend, it's called tauri, also the bundle is much smaller and it's much faster, it opens almost instantanously, and also it's a lot safer.
@feralmeow
@feralmeow Жыл бұрын
Someone said electron is like Flash on desktop environment.
@illya3859
@illya3859 Жыл бұрын
It's frustrating when devs don't want to ship applications as PWAs when apps like Discord would run perfectly with it.
@knoopx
@knoopx Жыл бұрын
PWAs support on desktop is lame, you are limited to blink-based browsers and the integration is not great
@specy_
@specy_ Жыл бұрын
I made many pwa, they just don't work that well yet, Firefox and Safari have dogshit implementation of pwa APIs, especially safari for obvious reasons (mehem, AppStore revenue). And even then, pwa lack the most important thing *access to the file system* the ability to write/read files is such an huge thing which is lacking in the pwa world, the best thing you can do is use indexeddb to save things, but then your user data relies on the browser wanting to clear your website data out of nowhere. And you still don't have access to file system
@knoopx
@knoopx Жыл бұрын
@@specy_ fyi, blink implements filesystem api but it sucks (there's no seeking or partial read/write)
@specy_
@specy_ Жыл бұрын
@@knoopx yes I know of it, but it's VERY limited and VERY annoying to use, both for UX and developer experience, you get a huge popup saying that the website wants to access X folder everutime u open it, if they removed the warning for PWA then it would be nice
@RadioTeal
@RadioTeal Жыл бұрын
Hey there Nick. I personally really like Electron. I have been developing software for over 30 years now and started with BASIC in 1989. I am a fan of Rust, Haskell, Go and JavaScript (a few frameworks including React). I am transitioning from Object Oriented into Functional as I do feel it is the future. I think when Sun introduced Java as the ultimate cross platform language that they never saw how ubiquitous the web would become and Microsoft even saw it coming when they launched Windows 95. The idea is that the browser can take the place of the Application layer of the operating system and simplify and make the applications run more efficiently and not care what "platform" the thing is on. The goal is to be truly hardware agnostic and run everywhere on any computer. I am actually a fan of the idea.
@MrSmitheroons
@MrSmitheroons Жыл бұрын
The Electron team are pretty cool people and are on top of at least like 2/3rds of platform integration concerns quickly as they come up. It's a bit of a nightmare to update to a new major Electron version *every 8 weeks* though. This is truer the more complex and deeply integrated with Electron's features and APIs your app is. It's almost like you are punished for making an Electron app that uses Electron to its fullest, by being cursed with harder updates. This is like 1000x truer for devs that make the user-considering decision to develop some app logic as (fast, light) native C/C++ code. NodeJS/Electron allows for this, but it is an extreme pain to build against one version of V8 and Node and Electron, and be faced with major updates of _all three_ every time you update the Electron version used in your app. And using C/C++ code integration to JS modules is really fiddly in general, to tell the truth. Atom struggled hard to keep up for this reason. It not only "was on an old version of Electron" -- Electron as a project came to exist as a re-brand and generalization of "atom shell" -- Atom came first, and its architecture was the basis of Electron. It had the maximum extent of "legacy" code possible for an Electron app, because it is the only one that *literally predated Electron*. Sad that it is going away. But it is a pain in the rear end to update Electron version in Atom. So painful.
@FengLengshun
@FengLengshun Жыл бұрын
Same, as long as it isn't the worst of all worlds like Discord. I can stomach flatpak, I can stomach electron. Just... at least make it function man. Doesn't have to even be the latest, but at least make it close enough that expected functions works, the bugs get fixed, and gets some of the performance improvements. You're lucky you only have 400MB RAM use but mine with all the betterdiscord plugin I use is at 900MB and that's just brutal man.
@TheLinuxEXP
@TheLinuxEXP Жыл бұрын
Yeah, if people at least made sure the integration was working well...
@TheExileFox
@TheExileFox Жыл бұрын
Discord is practically a joke. Because if it notices a new version and your package manager is a little behind, it will lock you out completely. Since there is no option to skip an update your stuck with an unusable version until it gets updated to a matching version,
@MarkDuncan1
@MarkDuncan1 Жыл бұрын
It's a real shame that Firefox abandoned PWAs and that it isn't promoted more in browsers that do support it. The vast majority of Electron apps would be perfectly fine as a PWA.
@SlaggyGaggy
@SlaggyGaggy Жыл бұрын
I remember using Electron and compiling a small utility to make any website into a webapp. Meaning you only need one installation for all the webapps you want. In my opinion, Electron should be turned into a framework so people can have multiple apps without having to install a new instance of the same program again and again. This will also fix security concerns in case a developer decides to not update his app anymore causing it to run at an older version of electron.
@TheParcelDude
@TheParcelDude Жыл бұрын
Great video! Thanks for researching :) I always wondered what Electron was all about 🤔
@devin-little
@devin-little Жыл бұрын
let's be honest, Linux is like 10x better than MAC OS AT GAMING. Years ago Linux couldnt even play a simple game now we can play AAA games. I'm happy
@TheLinuxEXP
@TheLinuxEXP Жыл бұрын
Oh yeah. Linux isn't far from Windows nowadays for gaming
@talkysassis
@talkysassis Жыл бұрын
@@TheLinuxEXP But we still have some problems. We can't use OpenCL outside proprietary drivers (mesa team is working on that) and AMD only ships their drivers to RHEL and Ubuntu Maybe SteamOS (when published) will create a real case to AMD publish the amdgpu-pro driver for all systems
@cacodemon345
@cacodemon345 Жыл бұрын
@@talkysassis AMDGPU-PRO is meant for workstations not gaming devices. Don't expect it to be published for all systems.
@talkysassis
@talkysassis Жыл бұрын
@@cacodemon345 But what of I want to use my pc as workstation AND gaming? I want to make some 3d models on blender and use my gpu to render but still want to play my games
@cacodemon345
@cacodemon345 Жыл бұрын
@@talkysassis Honestly workstation machines do double as gaming as well but machines meant for gaming but not for workstation honestly are a poor choice to target professional drivers at.
@mytho2630
@mytho2630 Жыл бұрын
I use Electron for various projects, thought I'd share a few thoughts. Memory usage is one of the low points of Electron. However, you can reduce it by writing memory efficient code and not creating additional processes. Electron has 1 main process and any number of renderer processes. As you increase renderer processes the usage goes up drastically. I'd assume that each process is something akin to a browser window in chrome. The less of them the better! I have all of my code in 1 process and use less than 200mb. The other way to reduce it is to avoid carelessly installing npm modules. I've seen projects with far too many third party dependencies. If what you want is simple its far better to build it yourself. Many modules have their own dependencies and this results in each module using its own instance of another dependency. This is more of a module/npm problem but it bleeds into electron as well. You really don't want 4 versions of jquery running at the same time... One extra method is to package your app properly. I made the mistake of not doing so because I thought it was solely to protect your source code (I was creating an open source app). While that is a goal of ASAR packaging the real benefit is it can cut load times down a ton. My app loads in abt 2 seconds now. Electron is easy to work with but its also easy to build poorly designed apps. However, if you put the time into it you can likely meet the constraints of your project.
@optimuseprime7887
@optimuseprime7887 Жыл бұрын
A potential alternative to Electron is Tauri. It also allows you to develop cross platform desktop apps; it uses HTML, CSS and JS for the frontend, but Rust for the backend. The end result are much smaller apps and better performance.
@jgcodes2020
@jgcodes2020 Жыл бұрын
Qt is _designed_ to be cross-platform. While it still has the classic "write once, debug everywhere" problem, it's certainly lighter than an entire freaking Chrome instance.
@OmK-st2kk
@OmK-st2kk Жыл бұрын
Not sure about the package size but flutter seems better than electron as of now, for these reasons: 1. It is backed up by google and also incorporates their material design 2. It is compiled so theoretically it should be faster and take up less space 3. It supports Windows, Linux, Mac, Android, and IOS. It can also turn your code into Web 4. It is based on Skia, google’s 2D rendering engine. I saw some benchmarks the other day and the speed was extremely close to the native apps I’m sure flutter still has its own flaws but a lot of developers are actually leaning towards it
@riganburnwal1012
@riganburnwal1012 Жыл бұрын
Flutter along which language?
@OmK-st2kk
@OmK-st2kk Жыл бұрын
@@riganburnwal1012 flutter is based on dart
@riganburnwal1012
@riganburnwal1012 Жыл бұрын
@@OmK-st2kk Can't we use flutter along other languages too? I'm sorry if I sound dumb I'm just curious, I thought it's just an UI toolkit/framework.
@OmK-st2kk
@OmK-st2kk Жыл бұрын
@@riganburnwal1012 I have searched along this topic myself and there doesn’t seem to be a direct way of using flutter with any other language than dart. The only approach is to create a rest API with the unsupported language and then call it in your dart code.
@riganburnwal1012
@riganburnwal1012 Жыл бұрын
@@OmK-st2kk Got it, thanks buddy!
@kote315
@kote315 Жыл бұрын
Funny. Electron and Proton don't work well on Atom :) As far as I understand, Electron is used mainly for proprietary software. In the free software world, it's considered good practice to develop software as little platform-specific as possible from the start. But even if the program is originally made only for Linux, thanks to the open source, someone will be able to port it to Windows if he needs it. A good example is the x11 screensaver. Its developer doesn't make builds for Windows (he hates Microsoft for personal reasons), but the Windows port still exists without any electrons.
@gogudelagaze1585
@gogudelagaze1585 Жыл бұрын
And the plethora of lesser known apps? I'm sure that they also get plenty of developers just begging to go through the joys of writing a native looking GUI for their platform. And then when the bug reports come in, having to figure out in which project the problem actually lies. It's great fun, let me tell you.
@AC-fi8ge
@AC-fi8ge Жыл бұрын
I love this editing - amazing production and script/improv!
@matheussilveriosilva5412
@matheussilveriosilva5412 Жыл бұрын
Hey man what is the distro you have shown on the video for the app store?
@arkoprovo1996
@arkoprovo1996 Жыл бұрын
The solution should be simple really ... standardize and make electron backwards compatible and then open only one instance of electron with multiple windows ... like multiple browser windows on chromium; i.e., if it is already running, just add to it ... basically the same thing a web browser does, minus combining tabs into windows.
@kingofgamesyamiyami6269
@kingofgamesyamiyami6269 Жыл бұрын
You've just described the System WebView, except it's not entirely standardized. MacOS uses Safari WebKit, Windows uses Microsoft Edge Chromium, and Linux is usually webkit2gtk. Tauri already supports this, but as a developer it's fucking awful because the nightmarish hellscape of cross browser compatibility shows up. Also, this wouldn't solve the RAM usage. Load up discord in a browser, that tab will be comparable in RAM usage to the actual native app. In my case, it only saved about 30 MB to use browser.
@arkoprovo1996
@arkoprovo1996 Жыл бұрын
@@kingofgamesyamiyami6269 Hmm. But shouldn't this be more popular? Also, cross-browser compatibility problems - shouldn't they be same for electron and this then?
@kingofgamesyamiyami6269
@kingofgamesyamiyami6269 Жыл бұрын
@@arkoprovo1996 electron ships the entire browser with the app. So your app is never relying on a different browser it's all the same.
@arkoprovo1996
@arkoprovo1996 Жыл бұрын
@@kingofgamesyamiyami6269 Yes but that's why it wastes RAM ... like runs a new browser instance for every app essentially.
@kingofgamesyamiyami6269
@kingofgamesyamiyami6269 Жыл бұрын
@@arkoprovo1996 No, that isn't why it wastes RAM. All modern browsers run separate instances of the browser engine per tab, so there is very little benefit to consolidating to a single browser.
@valwoe6727
@valwoe6727 Жыл бұрын
I don't have anything against electron apps other than the fact that if I open one, my computer is already on the knees...
@IGqy
@IGqy Жыл бұрын
I would generally speaking check if there is a flatpak alternative, as my machines don't have too much ram, and as others, I would love it to not be chrome based. That said, if there is only an electron version, I will use it and be happy
@RajvirSingh1313
@RajvirSingh1313 Жыл бұрын
As being a developer who uses electron, I think the new alternatives like tauri are getting better and better, so I think the future is bright both for devs and users
@uis246
@uis246 7 ай бұрын
Tauri is same electron and has same problems.
@MarkHyde
@MarkHyde Жыл бұрын
Inexpensive way to distribute multi-platform apps when companies like Discord can't be bothered to find other solutions.
@conradfalloff991
@conradfalloff991 Жыл бұрын
My main complaint about Electron? It uses Chromium, which has Google’s handprints alllllll over it.
@smileychess
@smileychess Жыл бұрын
Chromium is an open source project, which is very different from the Chrome web browser.
@m4rt_
@m4rt_ Жыл бұрын
You can develop using the same code, but compile/build for different platforms, but that requires a lot of bug-fixing and extra code. You could technicly build a gui application using C++ and Imgui and compile it for all platforms... but people usually don't do that (as far as I know) and it would require a lot more of the developer.
@datsteves
@datsteves Жыл бұрын
most of the issues you listed here for the user you actually can if you want fix them or at least reduce the issue. for example many system preferences can be read by electron. but most developers and designers choose not to. we at work actually are building an electron version (with extra features and is still highly WIP) of our webapp and at the moment it actually uses about 300-350mb of RAM, which is like 1/3 - 1/4 of that what slack/whatsapp and co use. and that compared when our app is in the foreground and the other are minimized (chromium does some optimizations if its in the background). so there are maybe some optimizations that many companies do not do? most of the RAM usage actually comes from Complex UIs, a lot of images and so on. as a blank page does not even take 150mb. so you only have about 150mb overhead of running electron compared to being everything native. the rest is how chromium renders stuff, so that is something you would get if you open it as a webapp anyways and that even if you run anything but chrome (for those chromium haters out there ;)) but for small apps with less than like 5k lines of code or if its just for one platform, i would certainly build that natively. except if its just for my use only, then i use electron because the javascript world is my expertise :D
@sohangchopra6478
@sohangchopra6478 Жыл бұрын
Only exception I would point out here is VS Code - yes it's an Electron app, but it still performs so good! (And of course, it's full of nice developer conviniences 🙂)
@gbfgtki
@gbfgtki Жыл бұрын
I disagree, ridiculous performance for what it does.
@jongranada
@jongranada Жыл бұрын
I don’t know why, but my favorite part of every video is hearing you say the phrase “a lot.”
@bluephreakr
@bluephreakr Жыл бұрын
At this point, Chromium just needs to be a new SDI web browser which will open applications found in a repository on local filesystem, and all installing an app should do is add the web assets for that application.
@rallisf1
@rallisf1 Жыл бұрын
Surely electron was the first to get there and has the largest community but there are plenty of alternatives. My favorite is neutralino as it's the one closest to how electron works but uses WebkitGTK+ instead of chromium and has like 1/3 of the resource usage.
@thalleshenrique9752
@thalleshenrique9752 Жыл бұрын
I had the displeasure of developing for and of using Electron. On the development side you have a mess they call "main processor" and "secondary processor" that turns sharing data between windows a nightmare. Anything other than a Single-Page Application is awful, hell, horrible or insert your worse curse here to develop. At the user side, at least on Microsoft Teams for macOS we don't have a good support either: I work as an iOS developer at a tech consultancy, and we use Teams for basically everything at the work. Some days it simply refuses to ring my calls, to send my message notifications, just works when it wants, and now I'm using iOS 16 Beta, even in my iPhone it isn't working well (the iOS version was the only one I was able to use properly). So for me, it's just ugly, heavy and lazy.
@wallyhackenslacker
@wallyhackenslacker Жыл бұрын
MS Teams is by far the worst, most bloated, slow and outright painful program I've ever had the misfortune of using.
@mudi2000a
@mudi2000a Жыл бұрын
@@wallyhackenslacker totally agree with that. It’s hard to believe Teams and VS Code (which I really like) come from the same company.
@lokonu
@lokonu Жыл бұрын
this was really informative, could you do one on flutter?
@TheLinuxEXP
@TheLinuxEXP Жыл бұрын
I could!
@adambyte256
@adambyte256 Жыл бұрын
The obvious answer is to take a page out of Flatpak's book: have the browser part of the app be shared by multiple apps (as long as they use the same browser version), in order to save space both in RAM and on disk.
@LuealEythernddare
@LuealEythernddare 7 ай бұрын
I mean there are alternatives to electron. They could use Tauri or NeutralinoJS, those are much more lightweight since they use a native webview rather than chromium.
@Remigrator
@Remigrator Жыл бұрын
I never liked Electrons, they are so NEGATIVE 🤣
@TheLinuxEXP
@TheLinuxEXP Жыл бұрын
🤣
@gdclemo
@gdclemo Жыл бұрын
Guilty as charged. No matter what spin you put on it.
@raagamparmar5602
@raagamparmar5602 Жыл бұрын
Proton should fix that..
@ananon5771
@ananon5771 Жыл бұрын
a native app almost always looks feels alot better while using alot less resources, it's just the way it is. the one good thing i will say is that i can instead of using an electron app, at least just use it in my browser most of the time, which is a good mercy for stuff like discord. and although i get your point, the proton comparison is not perfect cause using proton VS a native game is way less of a difference than a native app VS electron, proton is like 85-100+% of the performance (sometimes better than windows and/or the native port) with tons of nice features, vs electron which is a pretty sizable downgrade no matter which way you slice it.
@angeldude101
@angeldude101 Жыл бұрын
Proton also has another benefit over Electron: _It only installs once._ Games don't come with their own Proton distribution; they just use a Proton installation that's already on the user's machine.
@reshmaislam5708
@reshmaislam5708 Жыл бұрын
I think electron apps should have a dependency or library pack as a prerequisite ( or as optional ) that once installed , all electron made apps can refer to and save space . Like .net framework or c++ on windows , you don't have to install it for each app that uses it , its one install , and use the app kinda deal . Idk though , I might be wrong . Apologies in advance .
@dekeonus
@dekeonus Жыл бұрын
Another major gripe with electron: FHS, of the few electron apps I used ALL of them put binaries in "%AppData%\Roaming". Discord being particularly egregious here by keeping the current version and at least the previous version -but not just the web app code, but also the chromium runtime. If binaries absolutely must be installed to the user profile they should go into "%AppData%\local". Given these annoyances (esp as I use nfs mounts for my home dirs) I don't use electron apps where there is ANY other choice (so now I use the discord website rather than standalone client).
@hiiaminfi
@hiiaminfi Жыл бұрын
I have to be radically honest… I don’t care what an application is built with. I care about what it feels like and if it solves my problem. VS Code is the best non-commandline-editor in my book and I have wasted a thought about it being built with Electron while it was helping me finish an assignment. Edit: and yes it sucks that some companies that distribute 3rd class products to lesser used platforms. But the thing is … why would the spend equal time on a lesser used version of their product when it’s not part of their vision?
@hiiaminfi
@hiiaminfi Жыл бұрын
@@Kuznet609 and I am very happy for the people that use it.
@GabrielM01
@GabrielM01 Жыл бұрын
"cross platform" "devs can focus on making new features and improving the app" Discord screen share audio on Linux: Hold my beer
@mohsengoudarzi8318
@mohsengoudarzi8318 11 ай бұрын
qt is not only for linux, specifically developed to work on all operating systems. a simple google search gives you that
@nocturne6320
@nocturne6320 Жыл бұрын
This highlights another issue, lack of good cross-platform UI frameworks
@kuhluhOG
@kuhluhOG Жыл бұрын
13:00 Actually no, JavaScript doesn't leak memory. It's just that by default you create global variables with JavaScript, "var my_variable = 5; var my_variable = 5;" works and guess what happens if one of these two have a typo.
@Al0011235813
@Al0011235813 Жыл бұрын
Why not just write the app in Python+Qt and then you deploy to Linux, Mac and Windows? You don’t need Electron for easy cross-platform development.
@talkysassis
@talkysassis Жыл бұрын
From my experience Most Electron devs don't know anything outside JS Some guys that work close to me (not on the same company) don't even know what an interpreter is
@Al0011235813
@Al0011235813 Жыл бұрын
@@talkysassis That would explain the terrible quality of so many Electron apps.
@amirrezai9612
@amirrezai9612 Жыл бұрын
Because of Qt license Free version has a GPL license Not many people like gpl
@SurvivalGamingyt
@SurvivalGamingyt 9 ай бұрын
Discord once had a huge memory issue, where it literally after ~3 hours was legit consuming 1.2gb of ram on my system.
@VezWay007
@VezWay007 Жыл бұрын
Lol that ad segue at the start is Linus level. Well played, good sir!
@wolfgangschneider3743
@wolfgangschneider3743 Жыл бұрын
mostly true, except JS debugging is in no way special; this is available in more or less identical form for every serious build system and language.
@milasudril
@milasudril Жыл бұрын
On debugging Developer who works in a permissive language: Let's write the code quickly so we can debug it Developer who works in a strict language: Make sure to write the code correct by design (using language features), so we do not have to debug it
@Gameplayer55055
@Gameplayer55055 Жыл бұрын
I've used electron because it is impossible to make not ugly UI using winforms/qt/gtk/wx/and other ui frameworks. it uses html and css - the best options for adaptive not hardcoded by px things. also magically vscode is faster and better than any other IDEs, so it means that the problem isn't in electron, it is in programmers that either optimize and care about software or install 1000 frameworks to add fancy button
@TheLinuxEXP
@TheLinuxEXP Жыл бұрын
GNOME and KDE apps made with GTK and Qt beg to differ ;) There are a lot of beautiful app made with these frameworks
@SuperSpruce
@SuperSpruce Жыл бұрын
What would be cool is if you had multiple electron apps running on one system, it would use the same Chromium pool to save memory while running many electron apps. Another thing that would be cool is if you could take any website and turn it into an electron app (I'd love to do this with my web games)
@sashankvisweshwaran8386
@sashankvisweshwaran8386 Жыл бұрын
PWAs already do that right
@yolkyhorizon
@yolkyhorizon Жыл бұрын
I love electron, as an intermediate level programmer who is good at web programming and a beginner game dev, it has so much potential. For example, if I want to make a companion app for my future games, I will definitely 100% use Electron
@nomadtrails
@nomadtrails Жыл бұрын
I really hope Tauri catches on. Tauri solves most issues of Electron. It's a similar concept, but the backend runs on Rust, while the front end is a more minimal "web view" as opposed to a chromium instance. It is 1. Far more secure, by design, than Electron, 2. Far less RAM and space hungry, and 3. Increases performance ceiling for applications where actual computation is a bottleneck, as opposed to the more typical i/o bottleneck. And devs still can ship cross-platform and develop UI with web tech. Which to be honest, is great for devs but _especially_ great for product managers. Actually providing support for Linux is basically not on any product manager's radar, unless you get to support it basically for free via this type of tech. Be sure to check it out!
@averagemamil4523
@averagemamil4523 Жыл бұрын
Thoughtful and well-argued video. Thanks Nick 👍👏
@mycollegeshirt
@mycollegeshirt Жыл бұрын
yeah, I've had the distinct displeasure of programming in ajax. Where something is broken in you're app but since javascript is interpreted it doesn't know that part of the code is broken unless you use that part of the app. Which meant essentially any time you made a change you made a system-level change that affected every part, of the application you had to manually go to each part, the more complicated a javascript application gets to see a bug, the more you hate javascript. An experience like that makes you hate not just javascript, but interpreted languages, in general. It's why they invented typescript.
@QuadHealer
@QuadHealer Жыл бұрын
I agree using Electron makes a lot of sense if you as a developer have HTML5 experience, or you can hire someone that has it. It depends on what you are used to, and what kind of apps you are developing. Given the choice, I prefer having a drag’n’drop form editor like e.g. Qt, and writing code in a language that is more strict, but everyone has their preferences. I don’t understand why people like hand coding UI for anything other than special cases. I find JavaScript much more frustrating to debug compared to most other languages, but perhaps that reflects more on my skills than JavaScript itself 😊 Thank for this video - it just goes to show how differently we can view things, as I have the opposite view: I don’t like Electron as a developer, but I like the apps as a user.
@HopliteSecurity
@HopliteSecurity Жыл бұрын
Fantastic work! Thanks again, really appreciate the perspective ❤
@TheLinuxEXP
@TheLinuxEXP Жыл бұрын
You're welcome!
@JayMoog
@JayMoog Жыл бұрын
Nobody seems to have mentioned native Qt C++ apps (Qt being cross platform) or Qt + WebAssembly. Here you get a consistent UI and a single app that works on every platform.
@adisonmasih
@adisonmasih Жыл бұрын
Him: "Its Easier To Find Out Where You Are Wrong In JavaScript.." Meanwhile DiscordJS: You Don't Know Me Yet.
Why are governments and administrations NOT moving to Linux?
13:14
The Linux Experiment
Рет қаралды 290 М.
Electron vs Tauri: This Was Unexpected!!
9:41
DashCruft
Рет қаралды 33 М.
CAN FOXY TRICK HIM?! 🤣 #shorts *FOXY AND NUGGET!*
00:17
LankyBox
Рет қаралды 16 МЛН
小路飞第二集:小路飞很听话#海贼王  #路飞
00:48
路飞与唐舞桐
Рет қаралды 5 МЛН
7 areas where Linux is JUST BETTER than Windows
15:46
The Linux Experiment
Рет қаралды 130 М.
The END of CENTOS matters more than you think!
20:36
The Linux Experiment
Рет қаралды 75 М.
BYE DUCK DUCK GO, here's my new search engine! Private Alternatives to Google
17:41
Beginners Guide to Tauri (Javascript Desktop Apps)
8:10
Code with Con
Рет қаралды 35 М.
Android without Google is now 100% usable
18:47
The Linux Experiment
Рет қаралды 305 М.
My 6 WORST LINUX MISTAKES
16:28
The Linux Experiment
Рет қаралды 148 М.
Don't make these 7 mistakes when you're starting out on Linux!
14:15
The Linux Experiment
Рет қаралды 388 М.
Why You Shouldn’t Build Your Next App in Rust
9:18
warpdotdev
Рет қаралды 75 М.
I built the same app 10 times // Which JS Framework is best?
21:58
Fireship
Рет қаралды 2,4 МЛН
JavaScript Framework Tier List
40:57
Theo - t3․gg
Рет қаралды 266 М.
Рекламная уловка Apple 😏
0:59
Яблык
Рет қаралды 350 М.
Эволюция телефонов!
0:30
ТРЕНДИ ШОРТС
Рет қаралды 4,3 МЛН
🤯Самая КРУТАЯ Функция #shorts
0:58
YOLODROID
Рет қаралды 2,5 МЛН