Hacker News new | ask | show | jobs
by toyg 3400 days ago
> Slack has a standalone app? [...] I never even realized Discord [...] I never even realized that WhatsApp [...]

But that's exactly how Electron and friends got popular: they allow for web-first development. Desktop support is a bonus for people who need it.

When Mozilla started working on XUL, the future of the web looked a lot like XML and fat clients. Applications would be built by desktop developers targeting the desktop in a way that would allow for the web to integrate in the background. They wanted to bring the web to the desktop, woo-hoo!

As it turns out, the opposite workflow won: applications are now built by web developers targeting the web, in a way that allows for desktops to come onboard where required. In this scenario, XUL is just too complicated for people who simply need "a web view with a couple of extra APIs". This is still "bringing the web to the desktop", the fundamental role of the runtime is exactly the same; but the paradigm is opposite to what Mozilla had envisioned.

> They're rewriting their UI using CSS/HTML/JS because this is feasible today

XULRunner/Gecko was already built on CSS and JS, but it lived in a desktop paradigm of pseudo-native widgets - because HTML interfaces were terrible back then. It wasn't even a performance issue, but rather that everything was a page refresh because nobody knew any better. AJAX had not been formalized, and XMLHttpRequest was used (guess what) to pull actual XML. HTML4 was considered a hack that was supposed to eventually go away. It wasn't a "this is not possible today" problem, but rather "why would anyone want that?". Already there were lots of arguments on whether JS was "good enough" for desktop development, whether CSS was too verbose, and so on...

> why would Mozilla want to retain XUL

XUL is battle-tested to a different level, having survived almost 20 years, and it's a better option for pure-desktop development than web views. If Mozilla had paid more attention to its evolution, rather than going on quixotic adventures like FFOS, maybe they could have competed with Electron-style apps. Alas, now it's probably too late.

2 comments

> Electron and friends got popular

Maybe I'm just an old fuddy-duddy (I'm in my 20s, jfc), but I don't see how Electron's popularity is considered a given. I know plenty of people who use the given services, but none who use the desktop interfaces. VS Code is the only Electron app that I've ever seen used in the wild. Am I just hanging in the wrong crowds? Which ones should I be looking at, if so?

> It wasn't a "this is not possible today" problem

Hence "feasible" rather than "possible". :P (And conspicuously not "easy" rather than "feasible", either...)

> maybe they could have competed with Electron-style apps

I sound like a broken record by now, but I still don't see what people think Mozilla has to gain by offering a native GUI framework that people have already proven they don't want. And frankly, I think FirefoxOS, while ill-fated, was at least audacious. :P

> VS Code is the only Electron app that I've ever seen used in the wild. Am I just hanging in the wrong crowds?

Just to note: Atom is the original Electron app. I assume you've seen more people use that than Code.

> As it turns out, the opposite workflow won

Maybe for you, definitely not for me. Most of the applications I use daily are desktop ones and I'll refuse to install an electron one unless I have to.

His point was about the fad amongst developers (well, "developers"...), not users.