top | item 32999976

(no title)

MaXtreeM | 3 years ago

With all this Electron and PWA focused development a cannot shake a feeling that we add an extra layer of a "runtime" on top of an operating system, that could be avoided. An extra layer which occupies RAM space and processor time which feels unnecessary but it is where we are headed. I wonder if the reason is simple, that we (myself included) have not provided anything better or the reason is that big corporations who control most of the market have pushed this technology forward. I hope we can learn from this and bring back some of this lost performance while keeping the productivity and security gains.

discuss

order

loudmax|3 years ago

The bottom line is that Electron is portable. Unless native apps become as portable as Electron there will be a need for this layer.

The optimistic scenario is that WASM becomes the single target that everyone settles on, and that the performance penalty is minimized while the security sandbox is strengthened.

_gabe_|3 years ago

I see this all the time, and I honestly do not get it. As someone that has ported a game written in C++ for Windows to Linux... its not that hard. It took me 2 days, about 4 hours of work total, and most of the ports I had to make were because I'm an obstinate developer and didn't use the std lib functions that would handle the OS wrapping for me.

Now, I've never ported an app to mobile, and that may be entirely different. However, and this may be an unpopular opinion, I don't want developers building an app that's meant to be used on a mobile device and a desktop. They're 2 separate ways of using a computer and they should be treated as such.

When I think of desktop apps like Photoshop, Outlook, Word, Chrome, and Da Vinci Resolve, they all look and behave very differently than their mobile counterparts (if they have one). If you want to develop for mobile and desktop, then you need to invest the time to make it a good experience on both. I hate desktop apps that have been mobile-ified to support mobile-first design. Design a proper UI and UX for the platform you're targeting. Otherwise don't bother "supporting" a platform you never test, intend to test, or design specifically for.

fian|3 years ago

Java Swing apps were portable across Windows, Mac and Linux desktops waaayy back in 2004 and probably earlier. Write once run everywhere _was_ very much possible back then.

The biggest complaint was they didn't look native. From working on a Swing application back then, management and marketing would often ask if we could make it look more like other Windows applications, because looking like a native Windows XP application suggested it was modern and cutting edge.

As soon an iTunes landed on Windows, the requests for UI improvement changed from "make it look like Windows" to "make it look sexy" - which meant different things to different people.

Electron, to me, feels like an attempt to take a browser engine and turn it into a poor replacement for the JVM.

madeofpalk|3 years ago

This feature itself has nothing to do with Electron. Electron has long had similar capabilities.

svnpenn|3 years ago

> The optimistic scenario is that WASM becomes the single target that everyone settles on

oh hell no. I reject this in the strongest possible terms. You don't need a web browser to create a program. This is pure laziness. I am a developer. Browser based app is fine for small stuff. But nothing as large as Visual Studio Code, should ever be created as a browser app. This is just an awful idea because it results in dogshit performance, an order of magnitude worse than native solutions.

gw99|3 years ago

This.

I encountered hell the other day. I saw a corporate Citrix deployment that had 45 users running three electron apps on an underprovisioned server with the CPU, disk and memory rammed at 100% lagging out. That’s 135 separate browser stacks basically.

Microsoft are moving office to this stack as well. Ugh.

Of course I was there trying to work out why our simple old fashioned web app was running slowly in a chrome tab…

bluedino|3 years ago

Our hospital system uses Citrix and the application patients have to sign in with runs on some web framework instead of being a native Windows app. Such a frustrating experience using the on-screen keyboard to enter your name to sign in.

whywhywhywhy|3 years ago

It makes perfect sense for the user but developers will always argue for Electron so that they only have to test one browser engine.

I can’t even gets web devs to test on anything but Chrome and when something they code does break I have to listen to the Safari whine even though they all use iPhones so are part of the reason it’s relevant. Dread to think how an argument for supporting 3+ web engines for a “native” app would go.

criddell|3 years ago

A lot of developers are not fans of Electron. Generally, it's a quality vs quantity tradeoff. Are you willing to make a crappier thing if it means more people can use it?

For companies like Microsoft making something like Teams, I think it sucks. They have the resources to make native apps and when you have tens of millions of users, adding support for another platform would cost them pennies per user.

kitsunesoba|3 years ago

What seems even crazier is not even wanting to test against different builds of Chromium to help keep pace with Electron updates. At that point isn't one's code just too brittle?

WA|3 years ago

> Dread to think how an argument for supporting 3+ web engines for a “native” app would go.

Well, on mobile, it's slightly different. If you use Capacitor, it uses the OS' native WebView, which is either Chrome (Android) or Safari (iOS). You gotta test for two web engines, but fortunately, they're relatively close.

I think a solution like this for desktop would make sense. Modern browser engines don't have that many differences and it would make the runtime a lot smaller (thin wrapper around the already installed browser engine).

Sure, it has its downsides, but mobile apps have been written like that forever (via PhoneGap before and now Capacitor) and have come a long way since.

amadeuspagel|3 years ago

The obvious solution to this is to remove the bottom layer so that the browser is not a layer on top of the OS, but is the OS.

kllrnohj|3 years ago

That won't meaningfully change performance at all. Browsers aren't slow because they have to make slow syscalls - they mostly don't. They are slow because web technologies themselves are slow, sometimes by design, sometimes because of security/abuse concerns, but often just because HTML & CSS are absolutely crap platform for interactive UIs, something they were never intended to be and retrofitting that doesn't result in a very efficiency stack.

VyseofArcadia|3 years ago

I have seen this attitude on HN before, and it really confuses me.

You know what an OS is, right? You can't just say, "the browser window is the only window" and say that "is" the OS. At some point some native code is going to need to send bits back and forth between hardware. You will need to provide a filesystem, you will need to provide device drivers, you will need to provide a windowing system, etc etc.

By the time you get from NAND to usable browser, you will have build an OS. Sure, I guess you could throw in a JS runtime and insist all user level software is in node/HTML/CSS, but there is still an OS underneath all that! (And the OS isn't why it's slow anyway.) There is so, so much more to computers than running JS and rendering HTML and CSS.

sanroot99|3 years ago

Hypervisor based os is future ,for eg qubes os

svnpenn|3 years ago

better yet we should just outlaw personal computers and laptops, they are causing too much trouble. Better for everyone to just have iPads and iPhones, kill Android too.

gernb|3 years ago

I choose it for portability. I can ship to my users today, work on new features for all users, or I can spend 3-4-5-6 months dealing with differences in platforms, differences in tooling, build environments, deployment, etc....

I also it choose is because as a programmer it's far easier IMO to make a web tech app look good than a native app. CSS, Unicode text, emoji, images, video, canvas, webgl, it's all easy, portable, and batteries included, vs the various platform specific ways of providing those features.

luvs2code|3 years ago

I'm gradually starting to see X11/Xlib as a solution for cross platform desktop apps. It is the native GUI API for most UNIX operating systems. Ports exist for Windows(win11) and Mac which makes X11 technically portable to them as well.

Its not exactly an elegant solution I have to admit. But the licensing problems with QT make a lot of people nervous, GTK seems to be pretty polarizing, and for whatever reason WxWidgets and FLTK never really got much adoption/didn't progress very far.

[0] https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-...

ColonelPhantom|3 years ago

I think wxWidgets was pretty big in the 2000's, with quite some programs using it. To name one example, the Code::Blocks IDE uses it.

FLTK has never seen adoption even to the level of wxWidgets I think, but to be honest it is also quite simply hideous. I have not found a proper looking theme for it either, since I was mildly interested in using it to add a simple GUI to a Rust tool.

hulitu|3 years ago

They saw it's good so are now deprecating it.

RunSet|3 years ago

When you see decades of Windows version after Windows version, each billing itself as "the fastest Windows ever!" and each having higher minimum system requirements than its predecessor, two conclusions are inescapable:

1. The Redmond wizards have devised a method to make software run faster and all it requires is faster hardware.

2. Microsoft is in bed with hardware manufacturers.

currenciessfe|3 years ago

What are you talking about?

I'm running Windows 10 on a 2009 computer - one which was low-mid end back then. Only upgrade is an SSD.

Night_Thastus|3 years ago

Modern Windows PCs feel very noticeably snappier and more responsive than older ones. For all my complaints about Windows, that certainly isn't one. I've had to go back and work on old XP boxes, and that is not a pleasant experience.

Admittedly a good chunk of that is SSDs, and better hardware plays a role. But hardware was going to get better anyways regardless of Windows - at least they didn't use the better hardware to make the effects fancier/get sloppy and end up at square 1 like so much of other software.

binkHN|3 years ago

> With all this ... PWA focused development a cannot shake a feeling that we add an extra layer of a "runtime" on top of an operating system...

Is this not ChromeOS? A little OS, a lot of browser and little else?

323|3 years ago

Do you think Microsoft loves it that people are building Windows apps with Google tech?

But this ship has sailed a long time ago.

criddell|3 years ago

I think they do love it! I'm pretty sure they chose Chromium for Edge because they see Electron or something like it as the future.

trap_goes_hot|3 years ago

That ship seems to have sailed with the (over?)use of VMs a long time ago.