Live data from Hacker News

The Firefox UI Is Now Built with Web Components

briangrinstead.com

111–120 of 260 posts

Re: The Firefox UI Is Now Built with Web Components

#111
post #103
post #98

Isn't this the kind of thing we've been looking to move away from? I personally think that this modern trend of implementing, or even worse -porting-, important functionality in Javascript is very worrying. There was another recent controversial discussion of Electron on HN where I and many others shared our reservations about badly Electron apps perform overall. They're disproportionately resource intensive, shred b…

The problem with electron isn't JavaScript, it's running an entirely seperate instance of an infamously memory hogging web browser, that comes with an enormous amount of features that aren't utilized by the application. The JavaScript runtime itself is not going to cause noticable slowdowns or memory use, especially so if you already have one running anyway as is the case for Firefox.

The Chrome "apps" feature is turning out pretty well for me when using it for YT Music and YT TV, it runs in the same process as the existing chrome tabs do, and you can have dedicated windows for them in Windows/MacOS.

Re: The Firefox UI Is Now Built with Web Components

#112
post #93

XUL was ahead of its time when it was introduced by Netscape/Mozilla many years ago. It was a capable XML based language used to describe rich graphical user interfaces. Together with XULRunner this was supposed to be a generic framework for creating graphical applications. This was long before HTML became what it is today. Back then people still thought Java would take off on the desktop. I believe that most Mozilla…

So is Thunderbird still using XUL or not?

If yes it's only a matter of time until it transitions away from it too.

Re: The Firefox UI Is Now Built with Web Components

#114

Earlier quoted context omitted.

Web 4.0 is the internet of race conditions. Thanks, javascript everywhere.

What? JavaScript is a single threaded language...

And despite this, I've encountered lots of race conditions in JavaScript, thanks to the magic of async programming. Harder to debug than multi-threaded ones, too.

Re: The Firefox UI Is Now Built with Web Components

#115
post #98

Isn't this the kind of thing we've been looking to move away from? I personally think that this modern trend of implementing, or even worse -porting-, important functionality in Javascript is very worrying. There was another recent controversial discussion of Electron on HN where I and many others shared our reservations about badly Electron apps perform overall. They're disproportionately resource intensive, shred b…

But with firefox, you intend to use HTML and JS in the first place. I doubt that the cost to also render the firefox UI is significantly higher that having it native.

Re: The Firefox UI Is Now Built with Web Components

#116
post #98

Isn't this the kind of thing we've been looking to move away from? I personally think that this modern trend of implementing, or even worse -porting-, important functionality in Javascript is very worrying. There was another recent controversial discussion of Electron on HN where I and many others shared our reservations about badly Electron apps perform overall. They're disproportionately resource intensive, shred b…

Unfortunately OS/WM/DE makers didn't provide a common API, so now web browsers are the "Lowest Common Denominator" for cross-platform apps.

This is an odd offshoot issue that comes I think from the larger movement towards web-based applications and hosted "services" replacing bespoke desktop apps.

I have to say I feel a bit old hearing developers say "well why didn't the OS developers provide common APIs for creating applications?" which in my mind, is asking why Toyota Corollas and Ford F-150's don't use the same engine. The answer being they were two entire universes, and still are to a great degree.

That being said, while it is desirable to have standard API endpoints that are accessible, and while standards in general are a Good Thing(tm) to have, it does get a bit tiresome to hear different companies like Spotify[1], especially of that scale, bemoaning that they simply "must" use frameworks like Electron to build their applications because developing for individual platforms is just too expensive. If you want your application available on multiple platforms, and you want it to be a good experience to use, then you should be developing bespoke applications for them. That's just... logic, to me.

Yeah, it's more work. But to take a crap ton of web-content, shove it in a .app file and distribute that is massively wasteful, lazy, and results in what that kind of effort typically nets: bad experiences.

For example: I absolutely LOVE the Atom editor. It's a fantastic tool to use. That said I've had to give it up because it was simply killing my Mac's performance, a brand new, 2019, 15" Macbook Pro would sit there spinning it's fans up whenever it was on the screen, for a text editor. A feature rich text editor to be sure, but this thing can play 4K movies without even running the fans. A text editor should not strain it. I can't help but feel Electron is playing a role here.

[1]: I have no idea if Spotify uses Electron. I just know they've complained about this before.

Re: The Firefox UI Is Now Built with Web Components

#117

XUL was ahead of its time when it was introduced by Netscape/Mozilla many years ago. It was a capable XML based language used to describe rich graphical user interfaces. Together with XULRunner this was supposed to be a generic framework for creating graphical applications. This was long before HTML became what it is today. Back then people still thought Java would take off on the desktop. I believe that most Mozilla…

I learned Smalltalk in the 1980s as a middle school student. There was always the hope that Smalltalk would actually take off...

Ironically, the use of the browser as the target for programming has, slowly, haltingly, and through nearly-infinite compromises and kludges, actually provided the working platform Smalltalk promised us Gen-Xers when we dabbled in programming as kids. I think it's ultimately for the best, even if not the ideal path to have gotten there...

Re: The Firefox UI Is Now Built with Web Components

#118
post #11

Earlier quoted context omitted.

Why would there be security implications?

There is always (most times) _some_ sort of security implications in most larger decisions we take when building software. Especially when receiving generally untrusted input from the internet (websites, extensions, web-workers in this case) and you're suppose to display/use that somehow.

In this case specifically though, what security problems do you think there might be?

Re: The Firefox UI Is Now Built with Web Components

#119
post #98

Isn't this the kind of thing we've been looking to move away from? I personally think that this modern trend of implementing, or even worse -porting-, important functionality in Javascript is very worrying. There was another recent controversial discussion of Electron on HN where I and many others shared our reservations about badly Electron apps perform overall. They're disproportionately resource intensive, shred b…

There are pros and cons to using web tech for the application UI. To be clear, the old XBL code was already using JS/DOM, so the most obvious pro in this case was that it didn't require completely rewriting Firefox from scratch (which hasn't historically worked out well). I also expect that dogfooding web technologies means we can improve the tooling and web standard implementations in Gecko.

Regarding performance, this work didn't regress anything. Performance is measured on every commit and staying at least at parity was a requirement for the project.

Re: The Firefox UI Is Now Built with Web Components

#120
post #25

Poor web components. Everybody rags on them.

Because the API is really ugly. I can't see them ever taking off except maybe as an implementation of another library with a cleaner API.

What are you talking about? There is hardly any API. https://developer.mozilla.org/en-US/docs/Web/Web_Components/... It is extremely simple.
Post reply on HN