Live data from Hacker News

Firefox.html: Rebuilding Firefox UI in HTML

mail.mozilla.org

91–100 of 146 posts

Re: Firefox.html: Rebuilding Firefox UI in HTML

#91
post #58

Earlier quoted context omitted.

no more software layers please! my PC was much faster when my programs were native. Apps rendered with chrome rendered with webkit...8GB used to be enough, then all these "developers" with their "development machines" who think it's no big deal that their Hangouts implementation takes 200MB when Pidgin takes 20. people used to complain about Firefox hogging memory, I think it's Chrome we should be worried about...

At the same time, it's likely much more expensive to code native apps than it is to just build an html/css/js app using chrome with a lot of the heavy lifting already done for you (at the expense of increased resource consumption). A lot of these apps wouldn't exist if they couldn't have been built quickly and cheaply.

I don't agree that it's "much more expensive" - and I've been developing applications with UIs in Win32 for a long time.

Also, even if native apps were "more expensive", that's only from the developers' perspective -- and for a good app, the number of users far outnumbers its developers, so any "increased resource consumption" gets foisted on and effectively multplied by all the users. Only the developers get any benefit from this; but even then, since developers are themselves users, if they use apps that others have similarly developed with this culture of "selfishness", they get to experience the "increased resource consumption" too. In the end, I don't think this vicious cycle of waste benefits anyone except the hardware manufacturers.

In general, I think treating resources like they're infinite and "there will always be more" is almost certainly guaranteed to make it so there won't ever be enough.

This Firefox.html is a fun experiment to push boundaries, like WebKit.js and all the other interesting things you can do with JS and an HTML rendering engine (e.g. see Fabrice Bellard's complete PC emulator in a browser), and somewhat reminds me of other tricks like nesting VMs.

Re: Firefox.html: Rebuilding Firefox UI in HTML

#92

I've built that. Just to be clear: this is a personal project, not a mozilla project (even though I'm a mozilla employee). Also - many people find it silly to use HTML instead of the operating system toolkit library. But it's not HTML or native. It can be both. In this case, the HTML code define the layout, and we can draw native widgets inside (look at the tag in HTML, it's a native widget). For example, if you run…

As a guy who works with primarily back end server code. I hate UI stuff primarily because even creating small input UI windows requires jumping though hoops of fire it feels like with strange API calls, and documentation that says, "Just follow the example it'll all be fine in a couple minutes." But I'm 8 inheritance levels deep trying to figure out why my text box isn't rendering. I've often wondered why OS's just d…

> I've often wondered why OS's just don't host browser render engines internally and draw their UI with that.

CSS is, by far, not a good way to try and do UIs. It sort of works, and it is getting better, but it started out with lots of legacy cruft and things have only gotten worse.

One can make any sort of layout imaginable in any of the modern UI frameworks within a few hours.

Want 3 columns boxes at a precise position in CSS? Well thankfully the latest version of the spec has support for that, but up until very recently....

But for code running on the platform, you can take any 1st year CS student who has passed a class or two and have them put that sort of app together in Swing. WPF is a bit more work due to the data binding magic, ignoring that the layout stuff is also incredibly easy!

On the web, getting data is the easy part, making the UI is the hard part. On the PC, getting the data is the hard part, putting the UI together is easy!

Compare the richness of apps even on mobile phones to what you get in the browser. Sure if you hire top notch web developers who have been studying web development for 3+ years you can get something that is just like an app, but holy crap.

tl;dr HTML+CSS is the Win32 of layout engines.

Re: Firefox.html: Rebuilding Firefox UI in HTML

#93
post #89
post #73

Earlier quoted context omitted.

> But with the advent of 8-16+ GB of ram in consumer computers can we really say 2-3GB for windows rendering is heavy? This attitude is why we have phones with 1G of memory and 1Ghz+ CPU's lagging when just trying to read email. Yes, there is more memory available than before, but that doesn't mean we should just waste it for useless stuff. For example if we eat 2-3GB of memory on a system with 8GB of memory, thats o…

> Yes, there is more memory available than before, but that doesn't mean we should just waste it for useless stuff. I disagree. I think the point is that it's not useless, by its own existence. It saves dev time (which allows more - and better! - programs to be built), it allows richer features and interactions, it lowers the barrier to entry for maintenance work, and most of all prevents constant re-inventing/implem…

I'd argue against it saving dev time. See my above comment, HTML+CSS is not the fastest way to design an app. If it is all you know then yes, it is faster, but inherently it is not a /good/ system. It gets worse even faster if you add JS to the mix!

Re: Firefox.html: Rebuilding Firefox UI in HTML

#94
post #7

Color me surprised, but when we get to the point where we run HTML to build a browser that is supposed to be the tool used to render and display such HTML... haven't we gone too far? Is a browser necessary? What is rendering that HTML if not a browser? I mean, I get it, a browser is used to browse (duh) the internet, not necessarily to render HTML, but at this point we really need to ask ourselves "why are we doing t…

In addition to things mentioned by other users, a browser also enforces a security model and (nowadays) provides a Javascript engine and the browser object model, and handles HTTP and session state,

Re: Firefox.html: Rebuilding Firefox UI in HTML

#95
post #41

Interesting. But on Android Mozilla already deviated form this approach of "webbiness" in favor of using native UI. Same as Sailfish browser does with Qt and Gecko through IPCembedlite. If not for that, Sailfish browser could reuse the UI.

Firefox OS on the otherhand is HTML.

Re: Firefox.html: Rebuilding Firefox UI in HTML

#96

Can HTMLRunner be used as the basis of something like node-webkit[1]? What's its strength / weaknesses compared to that? [1]: https://github.com/rogerwang/node-webkit

weaknesses: I built it in a couple of days. It's ugly. Designed for Firefox.html only. Don't use it :)

How did you build it? I always thought the Firefox code was huge and monolithic and couldn't be used like this.

Re: Firefox.html: Rebuilding Firefox UI in HTML

#97
post #41

Interesting. But on Android Mozilla already deviated form this approach of "webbiness" in favor of using native UI. Same as Sailfish browser does with Qt and Gecko through IPCembedlite. If not for that, Sailfish browser could reuse the UI.

Firefox OS on the otherhand is HTML.

Yeah. So I wonder if Mozilla is going to switch to HTML UI on other mobile platforms too.

Re: Firefox.html: Rebuilding Firefox UI in HTML

#98

Earlier quoted context omitted.

As a guy who works with primarily back end server code. I hate UI stuff primarily because even creating small input UI windows requires jumping though hoops of fire it feels like with strange API calls, and documentation that says, "Just follow the example it'll all be fine in a couple minutes." But I'm 8 inheritance levels deep trying to figure out why my text box isn't rendering. I've often wondered why OS's just d…

Windows Presentation Foundation does just this with the XAML markup language. It's almost like designing a web app. You can use this markup for designing windows phone apps. I'm sure Apple also has their own markup as well for developing desktop/mobile apps but I have no experience in this so I'm not completely sure.

Windows Presentation Foundation does just this with the XAML markup language.

Mozilla does that with XUL. That's what they're trying to get rid of.

Re: Firefox.html: Rebuilding Firefox UI in HTML

#99
post #62

Earlier quoted context omitted.

At the same time, it's likely much more expensive to code native apps than it is to just build an html/css/js app using chrome with a lot of the heavy lifting already done for you (at the expense of increased resource consumption). A lot of these apps wouldn't exist if they couldn't have been built quickly and cheaply.

well, we're hitting process node limits (5, maybe 4nm) in 10 years so I think we better stop it. http://www.chipworks.com/media/wpmu/uploads/blogs.dir/2/file... You see those little dots? Those are individual silicon atoms from one of a few fins in the gate on Intel's 22nm node. Also, I Am A C Programmer. I Think Everything Should Be Written In C. C Is Close To The Hardware And Is Faster And Use Less Resource Compare…

Congratulations, I thought I'd managed to go a whole year without hearing about process limits and the grim future we face. Seriously, every 6 months or so for the last 15 years or more there is an article published explaining the end of the PC revolution. Google the terms "end of silicon" or "end of moore's law" and add a custom date range like 1998-1999 and you'll get dozens if not hundreds of articles from reputable sources saying that we've come to an impasse or that in 3, 5 or 10 years we will be screwed.

When chips started hitting the limits of the photo-lithography process, they switched to lasers, UV, DUV, and now EUV. Transistors start leaking so they redesign them time and time again. We've gone from completely 2D Circuts to 2 layer 3D to what's it at now 16 layers? The end is nigh and has been since Moore came up with that god damn law.

My point is that there's a lot a really brilliant people in the field who've been working for years if not decades to address problems we haven't even had yet. We're perpetually on the verge of a crisis, and simultaneously on the verge of a solution to said crisis.

We're in an age of ridiculously powerful machines that we don't know what to do with. If suddenly all progress halted in chip development and we had to make due, we'd probably enter into an age of hyper optimization where software engineers would be scrutinizing every clock cycle furthering the annual performance gains we've had for the last 40+ years.

Re: Firefox.html: Rebuilding Firefox UI in HTML

#100
post #77
post #52

This is great. My experience with XML for UI went something like this. 1. build an XML language for abstracting C++ UI MCF or gtk 2. realizing the need for HTML content - embed mozilla/xulrunner 3. realzing xulrunner /mozilla already provide a cross platform toolkit use XUL to build the user interface with xpcomm wrappers 4. realize that HTML is better for user interface, and only write HTML/javascript with xpcomm wr…

> from time to time check in on the state of desktop/app development and see if they've finally figured out html is better for interfaces than any interface builder Is this for real? I can name numerous advantages of Web Apps have over desktop/native Apps, "Building better interfaces" is not one of them. Trying to build a UI with CSS and DOM manipulation (not to mention hacks, Bootstrap, Dojo/JQueryUI, different rend…

see it's crazy. I don't know how to relate and I see it's the same for you. To me there's nothing easier than building UI in HTML with CSS and JavaScript. Using code to tweak padding and positioning in native code with a compile step is much slower IMO then

10.times { alt+tab, edit, cmd+r } -> perfect

[edit] - i should mention I spent a lot of time building desktop apps but haven't put much time into the newer mobile apps ios or android maybe it's improved a lot in ten years?

[edit] - last edit, I know it's improved and I suspect it's a matter of taste and proficiency that makes the difference.

Post reply on HN