The ideal application:
- uses almost no memory
- uses almost no disk space
- is extremely fast
- costs (next to) nothing
- and has all the features in the world
- presented in a manner that automatically shows the user only the exact features (s)he cares about
In the real world, we have to balance the project/product requirements. In the end, only these things matter:
- It yields a net profit (monetary or otherwise) for the company or owner
- It has (and keeps) added value in comparison to similar software
- It's fun to design and develop in/for
- It has bugfixes and new features in a timely manner, without taking up too much development time
- It has a pretty, easy to use interface
- It's quick and snappy enough to run
Adding that all up, and developing in something like Electron is a no-brainer: mean time between iterations is faster, design and development is more fun and the end user has a product that is fast enough for their needs packed with features. Try that in any low level language or without control over the engine and you'll have to severely hamper one of these goals.
The ideal application:
- uses no memory
- uses no disk space
- is instant
- costs nothing
- and has all the features in the world
- presented in a manner that automatically shows the user only the exact features (s)he cares about
The real-world application, when the developers work for the customer and not for themselves:
- uses almost no memory
- uses almost no disk space
- is extremely fast
- costs next to nothing
- and has almost all the features in the world
- presented in a manner that automatically shows the user only the exact features (s)he cares about
Sadly, we need to balance features, performance and expectations with our own expectations about what kind of software we want to deliver.
I sincerely hate Electron and the whole ecosystem of bloated apps it enables BUT having matured a bit i can understand why it exists. People that hold the money want software out and want it fast and they don't care if the customer now needs almost 4 gigs of ram in their phone just to play music or browse the odd website.
A depressing state of affairs imho, specially for us "old folks" which enjoyed our software native and optimized as much as we could.
Disclaimer: I hate Electron. (but really appreciate and admire its developers)
Not everyone on earth is a dev/gamer/video-editor. For regular people, electron is a cancer that needs to be nipped in the bud. Remember, 91% of the desktop on earth is Windows (meaning regular USD 300 machines). And of them I'd wager less than 10% fit have machines where electron is snappy (1.2K Thinkpads).
What the earth needs is a better cross platform native GUI framework. NOT electron.
I always like to use VSCode as an example. It's a tool a use on a daily basis, and I like almost everything about it. It's also a poster-child for a good Electron application, maybe one of the best around. Add to that I completely understand why it was made using Electron, and why it might not have existed in this form (available, up-to-date, and feature-complete on all platforms, regularly improved, etc) at all if it wasn't because of Electron.
But it's not.snappy.enough.
Even though large performance-sensitive parts of it like the editor buffer data structures etc are (AFAIK) implemented natively, the whole user experience is actually quite bad. It's sluggish, inconsistent, it's full of random glitches, and everything feels like an insane amount of effort went into putting more and more lipstick on various parts of a pig to hide that the whole thing is like a house of cards and sluggishness and instability hides around every corner.
I feel a little sad that so many developers defend Electron so vehemently, pretending that it's 'ok', 'fine' or even 'very good' for end users, because it's not. I fully agree it's great for the people (and mostly the companies making money off the people) who develop commercial stuff with it, because it obviously saves a shit-ton of money if you want to deploy something across the 3 major platforms.
All of this is completely unrelated to the end-user experience though, who typically uses just one platform at a time and couldn't care less if the application they are using is also on some other platform. Or if they use it across multiple platforms, how many extra UI devs where needed to make native UI's for each of them.
Any developer who knows how freaking fast modern computers are and why should, when completely honest, should feel ashamed that something like Slack or VSCode is made in a way that makes it so sluggish and memory-hungry, and that we now all accept this because it's cheaper to develop that way, and the applications are (supposedly) 'snappy enough to run'
That's not how I expected that sentence to end. I don't think regular people are nearly as concerned with performance as the groups you listed are. Regular people are probably using Electron via Slack for work and if it's slow and bloated it's ultimately not their problem. Even a few seconds delay won't cost them anything when it's still a faster replacement for email.
> cancer that needs to be nipped in the bud.
Come on with the hyperbole. Electron is effectively (nipped) as it is most usually just the shortest path to giving apps a persistent offline option outside of the browser sandbox. I don't know of _any_ electron app that isn't also a dedicated web app. VSCode is embedded as an editor in a few online code sandboxes.
Electron apps will almost certainly be replaced with PWA akin to the MS strategy. Shared run time, distributed via a 'store' of some kind, etc. It's an arc that we are in the middle of.
I get it, the world needs a better solution. However there isn't one. There isn't even a #2 best option. Electron's success is just the industry's continued failure.
You'd think Google would be close with Flutter, but Flutter doesn't run in the browser. So, fail.
Are there any options you'd suggest using _over_ Electron?
Every couple months an electron thread pops up and gets the same bashing.
The world very much needs electron and that's why it exists. jQuery was the same way forever. People just complained _constantly_ that we should be advancing the spec and using built in calls. That jQuery was some sort of bloated misstep. Well, we're still waiting for web components to be standardized more than 15 years later.
So as I understand it, people that don't like electron would rather us use _nothing_. Thus providing _no_ stepping stone to what should rightfully come next.
I see the same thing with electric cars. They aren't perfect _now_ so why invest in them at all? Why even explore an avenue that could lead to other innovations if it isn't _perfect_ out of the gate? 91% of the world population don't even own cars!
Out of experience can tell you 32 GB is a space that can be killed rather fast.
There have always been questions of adoption, stability, fidelity of the user experience and others.
Meanwhile web apps have kept chugging along and browsers have gotten better and better.
> What the earth needs is a better cross platform native GUI framework.
I contend that "native" is irrelevant. People are "native" web users. They use web based interfaces daily. A browser based UI is the "cross platform native" (whatever that means) GUI.
It can be fast (if you do the work, which may involve firing up external processes) it can be beautiful it can look native and it can deliver great user experiences.
It's not the GUI framework we wanted, but it's the one we deserve :)
My 10 year old netbook runs RStudio? Discord works great on my 10 year old Dell 2nd screen computer. What doesn't run VSCode?
If the regular people expect anything modern to be snappy on those machines then they have been mis-sold to[1] and that isn't our fault as devs.
> What the earth needs is...
Then why don't you put a team together and make it, and gain the fame and fortune that comes from solving the matter?
> NOT electron
Nobody is forcing you to use Electron based apps. If you find them, or anything else, too slow then find an alternative that is in a native toolset or entirely browser based, or what-ever.
A key problem is that people want what the want, they want it now, they want it to work on their platform without needing specific version of anything else (i.e. a browser), and they want it free. If Electron allows the thing to be delivered now, in a cross-platform manner, and people aren't willing to wait or pay for the dev time to develop in something smaller/nippier, then Electron is what devs are going to use.
I remember similar arguments regarding VB way back when: people wanting something that started faster and used less RAM bitterly complaining, but not wanting to use alternatives that were available because they cost more. To my mind Electron has a very similar feel to VB back then: great for prototyping, but can be used to produce fuller solutions too if you are willing to accept the cost in speed and weight.
[1] Oh how I love having to explain that 32GB total storage isn't really enough for Win10, especially when that is slow eMMC and the machine is swapping to it on account of only having 2GB RAM, when the sales person[2] said otherwise.
[2] People don't seem to accept "well go ask the salesman to make Office fit and make it go fast for you, you obviously think he knows more than I do"[3] as a valid response...
[3] Heck, those diminutive laptops/tablets/black-boxes-to-plug-into-your-tv, that are still being actively sold as Win10 compatible, can't even install the latest Win10 updates without some technical jiggery-pokery.
>- and has all the features in the world
In this case it's okay if it uses up all disc and memory. Actually it can even cost something in this case because only one application is needed.
It should be open source though so users can audit it and fix bugs if required. You see, just by requiring consistency in the requirements, one can get very far. Optimizing for typical startup metrics is just one way to do things but not the only valid one.
DeskGap is another try to build an lightweight alternative to Electron. Compared to the existing attempts [0, 1], I choose not to go that far and bundle a real Node.js with it[2].
And to battle test the framework, I wrapped squoosh[3] into a desktop app[4] with DeskGap, and successfully submitted it to the app stores.
[0] https://github.com/pojala/electrino
EDIT: Appears the latter [0]. Great work. I wonder how this affects bundling...does this make it a UWP app?
0 - https://github.com/patr0nus/DeskGap/blob/master/core/src/win...
[0]https://docs.microsoft.com/en-us/windows/communitytoolkit/co...
The webpage mentions the app size, but no mention of RAM usage, which is a bigger concern with Electron apps to me. Can you comment on how it compares?
So for now I consider DeskGap a good place for simple apps. But if you start to build something like VS Code, the RAM usage can’t be good, either.
I have been watching these types of tools (desktop js frameworks) and I'm glad the DeskGap docs[0] explain the difference between existing tools like Electrino and Quark although the most notable difference is that those two projects are no longer maintained.
I just added DeskGap to my list of Awesome Desktop JS frameworks[1].
[0]: https://deskgap.com/#there-are-already-similar-attempts-elec...
- webkit-gtk2 - webkit-gtk3 - qtwebkit - qtwebengine
Additionally I have two Geckos for Firefox and Thunderbird. All of them use skia, which then also gets compiled 6 times in total.
Using Gentoo, I'm a bit sensitive to this sort of thing ;)
I absolutely hated how slow and buggy the app was, until I realised it was down to it attempting to index music locally all the time
my app speed increased massively by going to settings > local files, and turning off all of the options of where to show songs from
Apparently the debate has matured from focusing on technical downsides to making unfalsifiable claims about technical downsides.
- Nobody wants to be testing against multiple browser/rendering engines in 2019.
- Nobody wants to wait for a vendor to update their implementation when Chrome has the feature available almost immediately.
Edit: Since I can already see the litany of armchair-quarterback-desktop-app-authors, I'm just going to link to the comment from the guy who actually migrated Slack away from WKWebView.
https://news.ycombinator.com/item?id=18763449
Blows my mind we're still debating this.
This is like claiming nobody wants to write C because no one wants to manage their own memory in 2019, or miss out on all the cool new packages in the JS ecosystem.
Evidently _some people_ do. I can assure you there's at least number _n > 1_ of people who care more about app size than either of your points.
I personally wrote a side project in system web-view, because I don't want my macOS-only system-tray application to weigh 115+MB to make sure I have APIs I don't need in platforms I don't support.
While this route is probably not for quick app deployment, but boy can it kick ass when properly done in C++ with custom GUI framework.
I love Sublime Text and Sublime Merge. I love their philosophy towards software design. I love how they value user experience above everything else.
There are very few pieces of software that give you so much pleasure and joy in using them on a day to day basis.
Yes, lots of projects want multiple, competitive rendering engines.
It used to be that Windows was the only viable target OS for commercial software. Firefox and Safari gave IE competition and gave developers who wanted to target Mac and Linux a way to get a foot in the door. That kicked off the whole generation of web apps we’ve just lived through. If developers give up on Gecko and WebKit, then they allow a monopoly again. And since Electron is made by GitHub and is now owned by Microsoft, Microsoft will again have the monopoly (with the caveat that Google has primary influence over Blink).
Render engine competition keeps web standards relevant, which keeps the web open. Take away competition & we’ll be back in a world where people build to IE6 for a decade instead of targeting standard HTML/CSS/JS.
Maybe having multiple engines is good (although maybe the benefits are overstated since nowadays most engines align with the spec instead of implementing non-standard extensions like ActiveX), but it's not good for people for who want to quickly, and with low effort, develop desktop applications.
The point of the parent comment was that developers chose Electron over other frameworks for reasons such as speed of development, and DeskGap does not align with those reasons.
The real reason MS and IE were not so good is because they were a closed source monopoly! And moreover the copyright was enforced by the government.
Now even M$ switched over to WebKit / Blink.
Collaboration beats competition in the end.
Wikipedia beat Britannica quite handily. And it beat Encarta, too.
Open source beat closed source over time.
The Web beat AOL and Compuserve.
Science beat secret cults and alchemy.
Today Pharma is using patents and competition. People are prevented from building on each other’s work in microbiology but not in other sciences. Isn’t that wild?
I would rather have lots of people adding to one snowball platform, than having competing platforms. AS LONG AS that platform is open source and anyone can use it for any purpose. If your commits don’t make it into the core, just market them until they get popular enough. Compatibility is the goal, though.
It has nothing to do with the point that trying to make your code work in multiple browsers/rendering engines is painful.
Wanting a project to work with multiple rendering engines just because is an idealogical decision.
That's certainly _one_ reason why.
I would posit that the main reason is that web developers would like to reuse their webapp skillset for building desktop apps. This seems like it accomplishes the goal.
Re: testing against multiple browsers, frankly this is _mostly_ a solved problem. The big gaps between rendering engines is on the real fringe of css at this point, which most of us aren't bothering to use. Also, many people builting on top of electron (and presumably this platform) are using css toolkits like blueprint, and most of those take care of most of your cross browser issues anyway. So, largely not a concern.
The people behind Slack, Spotify, and so on have actually commented on these threads explaining the exact line of reasoning. This stuff isn't limited to just CSS, and it makes total business sense to avoid it.
- Nobody bothers to be testing against multiple operating systems in 2019.
- Everybody gets to wait for Slack to get around to it while the system webview gets the compatibility update almost immediately.
Great for the authors, shit for the users. On the bright side, it was the straw that broke the camel's back, and my org doesn't pay Slack any more.
But size and speed matter (you don’t see much elektron based games..). We as a humanity can’t just always build faster and more powerful computers and then let developers throw these gains away by building more elaborate Rube-Goldberg-machines, that take 100 times the space they need, running more things taking the same old time we are used to wait, with dependencies no single human ever checked at once.
Many of same people who waste tremendous amounts of energy and collective human time writing ineffective applications might end up to be really pro-environmentalists outside their job, but when it comes to computers suddenly we don’t care. As long as it is acceptable on a new machine, who cares, right?
It would be entirely possible to write perfectly fast and efficient GUI applications using HTML and CSS as layout engines without dragging whole browsers into this. Using system webview might not be the solution. But maybe something that doesn’t feel like it has been taped together with duct tape would help. A fully fleged browser engine for a desktop app is overkill in most common usecases and while I understand why one decides for Elektron, I’d rather see a really thought out solution than one that has been duct taped together.
This is such a privileged thing to say. I would guess there are far more important environmental problems to worry about. There are also more things that can be done that have more impact.
> It would be entirely possible to write perfectly fast and efficient GUI applications using HTML and CSS as layout engines without dragging whole browsers into this. Using system webview might not be the solution. But maybe something that doesn’t feel like it has been taped together with duct tape would help. A fully fleged browser engine for a desktop app is overkill in most common usecases and while I understand why one decides for Elektron, I’d rather see a really thought out solution than one that has been duct taped together.
Convince platform owners to agree on a common spec for GUI that's implemented consistently. Otherwise, what you want will ever remain a pipe dream.
That's why DeskGap uses EdgeHTML on Windows. With toolchains such as webpack and babel, building an app that runs on WebKit and EdgeHTML (which is going to be replaced by Chromium[0]) can't be that hard.
> Nobody wants to wait for a vendor to update their implementation when Chrome has the feature available almost immediately.
DeskGap doesn't mean to be a complete replacement for Electron. But after a glance of Electron Apps[1], I suppose many simple apps do not require start-of-art features.
[0] https://blogs.windows.com/windowsexperience/2018/12/06/micro...
Strangely, that would likely make it most conformant on Windows. I can't imagine that KHTML is up to date in terms of specifications (but I could easily be completely wrong about that) and Apple/Safari is taking tips from Microsoft during their IE days.
It would seem that the platform differences would be quite large, but at least the JS engine would be consistent.
As I noted in an above comment...
https://news.ycombinator.com/item?id=18763449
Projects like DeskGap make this out to be a simpler problem than it actually is. ;P
What really blows my mind is that we’ve reached a point in computing where the developers laziness now outranks the customers needs.
> Since I can already see the litany of armchair-quarterback-desktop-app-authors
I think you’ll find those who are offering counter arguments aren’t just armchair critics. Eg I’ve been writing software since the 80s. This includes a considerable amount of desktop software. So I’d like to think my opinion is just as valid as your own. ;)
It's not developer laziness. This is 100% a business decision, and if you've been doing this since the 80s, I'd expect you to know this by now.
Do you really think Slack & co chose Electron because it's making developers lives easier? Companies and people choose it because it. just. works. across platforms. This has a direct translation to money, no matter how much you stick your head in the sand about it. Less resources, less platform-specific wizardry, more focus on core features with faster turnaround time. _That_ is all that matters here at the end of the day, because programming is not - nor has been, for the majority of roles, for some time - been about coding and tinkering with bits. It's about increasing revenue for the company/product/whatever.
When you (the general you, not you specifically) rant about reimplementing everything Electron gives you on three platforms, you gloss over the wealth of shit a web browser provides for free. I have actually implemented some of this stuff outside of a browser, and I wouldn't do it again if you were paying me.
_Furthermore_, very rarely does anyone compare implementing something via Electron to native... but native is a landmine-filled problem area of it's own. macOS alone is horrendously undocumented these days for a good portion of stuff, and you'll end up with a litany of platform specific hacks for the most basic things.
Hell, the easiest response to this comment is this: neither of our opinions needs to be valid, because the market's opinion is that Electron is the better choice.
One I just complained about the other day is Electron apparently doesn’t handle font fallback properly, so if I type an emoji that Slack doesn’t support, such as [frozen face], it just renders as a placeholder square in desktop Slack even though it renders as the emoji on both the website and in the iOS app.
Edit: Apparently HN strips the emoji from the comment [facepalm]
Wouldn’t have this problem with a native app.
Monopoly != multiple large vendors contributing to Chrome/Webkit/etc.
The next time I ran it, it worked on release mode, but panicked on debug mode.
I've just tried again from master and it works, which is an improvement!
You hands-down could not build Slack, Spotify and so forth in a solution like this. You would end up refactoring it very quickly when users start walking away because you can't have a feature they want (playing video, gifs, etc).
Maybe you should consider that a sign that it's not as black&white as you tout it to be? I mean, what a way to just dismiss everything..
So yeah, it's pretty black and white. ;P
Of course not.
Just because people are still having the conversation it doesn't mean the conversation is worthwhile.
You mean like when building websites?
Speak for yourself.
I hate to break it to you, but in the real world there are multiple browsers.
Not testing in more than one is lazy, standards ignorant and an insult to your users.
Let’s not repeat the MSIE-fiasco again. We know better. We can do better.
Slack et al are more successful with users, and have delivered more value to them, than 99% of the work people who post here are doing. Pretty sure this isn't insulting them.
And for the last time, this isn't the MSIE-fiasco all over again. The primary engines used today are all open sourced, it's not vendor lock in on the level it used to be.
I'm so very sorry our 20 years of experience that causes us to reject the subpar monstrosities you like to call "dektop apps" rubs you the wrong way.
So yeah, it does rub me the wrong way. The people who argue against Electron are the programmer's programmer: they like tinkering, they care about the code, and so on. Most businesses don't. Users never see the code. If you want better, you need to beat Electron and stop ignoring or decrying why people opt for it.
Soon they'll all be WebKit or Chromium.
Nobody does. CSS is pretty mature, a difference in rendering between modern engines is extremely rare
From the webview project page: It supports two-way JavaScript bindings (to call JavaScript from C/C++/Go and to call C/C++/Go from JavaScript). It uses Cocoa/WebKit on macOS, gtk-webkit2 on Linux and MSHTML (IE10/11) on Windows.
[0]https://github.com/zserge/lorca
[1]https://github.com/zserge/webview
edit: the link to the video https://video.fosdem.org/2019/UD2.120/godesktopapps.webm
and the presentation slides https://fosdem.org/2019/schedule/event/godesktopapps/attachm...
As a developer, I can appreciate Electron's utility in targeting multiple platforms, but one has to wonder:
Why isn't there a good, open, cross-platform UI library already, that compiles to the native UI of each OS?
Has there even been an initiative to make one?
You'd think the global developer community would have come together to tackle this problem by now, consider how it's such a pain point for all of us and users as well.
It is either "good native" or cross-platform. But not both in reality.
In principle can do something very basic using stock platform widgets - some application that uses only basic widgets: buttons and plain text textareas - all others are too different on different platforms.
If your app is slightly more than that you will have problems even with basic stuff. Consider this native UI example (Notepad++) : https://i.kinja-img.com/gawker-media/image/upload/c_lfill,w_... and something like Sublime Text
Notepad++ is a disaster even native platform API. Sublime Text uses custom non-native renderer - consistent UI styling.
I guess the downside is that that would be just a new .Net Framework, where an app requires you to install the Whatever Webview 2.5 in order to run, but it'd be neat to dodge Safari, while still having leaner Electron apps.
It could possibly be solved by specifying supported webviews in the application.
But it does use HTML/CSS in the same way as WPF uses XAML for UI definitions.
Sciter allows to use best parts of two worlds: flexibility of HTML/CSS/script for UI definitions and richness, power and compactness of native code as Sciter is designed to be embeddable from the very beginning.
In what UI engine you can create your own HTML element with native C++ (Rust, Go, etc) controller when you need to?
And on all Windows versions starting from XP, Mac OS from 10.7, all Linuxes with GTK3 including Raspberry Pi...
https://www.theverge.com/2018/12/6/18128648/microsoft-edge-c...
...as if that's an excuse.
https://deskgap.com/#why-is-the-supported-version-of-windows...
IE has been available as a COM component in Windows applications for ages -- at least as far back as XP -- so it could be done.
Simple, stable, good compatibility.