Live data from Hacker News

Firefox.html: Rebuilding Firefox UI in HTML

mail.mozilla.org

131–140 of 146 posts

Re: Firefox.html: Rebuilding Firefox UI in HTML

#131
post #120

Earlier quoted context omitted.

Adding HTML to the GUI coding is re-inveting the wheel. There are native toolkits for UI, there are crossplatform UI libraries for a reason. They work, they are fast. No need to add extra layers on top of those.

Firefox's UI is already built using XUL markup, which is rendered using the rendering engine.

In case of Firefox, it works. Its single app that runs the UI in a XML based markup thing.

Issue comes when the whole operating system would be run on top of some XML thing...

Re: Firefox.html: Rebuilding Firefox UI in HTML

#132

Earlier quoted context omitted.

I want to use SVG. See issue #24. I just don't have the assets.

It might even make more sense to just use fonts for the icons and leave SVG out of it entirely. I'm referring to the OpenType COLR/CPAL tables Microsoft is pushing: http://opentype.info/blog/2013/07/03/color-emoji-in-windows-...

I was looking for a similar solution recently, and came across Stackicons[0], basically icon fonts with multiple color layers, essentially what Microsoft is proposing.

But there's a huge flaw with the whole approach: you can't have color gradients. Of course you can still emulate gradients by using lots of layers, but it's going to look like crap when you increase the resolution.

[0] http://stackicons.com/

Re: Firefox.html: Rebuilding Firefox UI in HTML

#133
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.

  > it's likely much more expensive to code native apps
No, and not even close. Web tech is primitive compared to the native SDKs and there is no sign of that improving anytime soon. All what happens is reinventation of some MVC and reshuffling the libs.

Re: Firefox.html: Rebuilding Firefox UI in HTML

#135
post #111
post #77

Earlier quoted context omitted.

> 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…

You're right - but the real win here is that hundred of thousands of developers already know HTML + CSS, and very few developers know XUL or even any native UI API. Given that these native APIs change with the platform, many developers have given up on them since HTML + CSS will be useful for the foreseeable future. Is XUL really better than HTML + CSS? Probably. But HTML + CSS is getting a lot better (flexbox, etc),…

I don't know if XUL is better than HTML + CSS, I haven't used XUL. I have used XAML and Qt, and the Android Layout Manager. and they are way easier to deal with.

In HTML, a button is not a button, it's a DIV with an CSS properties (which render differently depending on the browser) + some images + some Javascript. And that abstraction leaks a lot.

The equivalent in native code will be having to deal with Xlib in X11 or GDI on Windows every time you debug.

That said, there is value in HTML/CSS/JS UIs, I don't deny that, and I use them when appropriately. I still think native UIs are 'cleaner' to develop.

Re: Firefox.html: Rebuilding Firefox UI in HTML

#136
post #120

Earlier quoted context omitted.

Adding HTML to the GUI coding is re-inveting the wheel. There are native toolkits for UI, there are crossplatform UI libraries for a reason. They work, they are fast. No need to add extra layers on top of those.

Most desktop applications have a terrible interface compared to modern websites. That wouldn't be the case if the UI libraries were half as good as some people here claim.

Let me add myself to the chorus of people standing up for native desktop applications. Sure, there are bad and good examples of both desktop and web UIs. But whats so horrendous about the original Mac OS interface? What was so bad about Gnome 2?

Re: Firefox.html: Rebuilding Firefox UI in HTML

#137

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…

What's the license on this? I'd like to steal your tab bar for something I'm building :)

Likely MPL because it derives from the Mozilla browser design

Re: Firefox.html: Rebuilding Firefox UI in HTML

#138

>we could drop XUL and close the gap between B2G and Firefox Desktop I hope not. Customisability is always the first thing to die in mobile 'apps'. As soon as that happens on the desktop, I'm moving to Pale Moon permanently.

What about this (using HTML instead of XUL) would make it less customizable? If anything, it's at least more accessibly customizable because more of us know HTML than know XUL.

Also, I imagine if this truly the way forward, XUL will be removed from the FF code base, thus making a XUL based Pale Moon trickier since it would be so different from upstream at that point.

Re: Firefox.html: Rebuilding Firefox UI in HTML

#139
post #62

Earlier quoted context omitted.

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 reputab…

perhaps you didn't look at the atoms in the picture I linked.

At 4nm no amount of dielectric will save you from the quantum tunneling.

Re: Firefox.html: Rebuilding Firefox UI in HTML

#140
post #93

Earlier quoted context omitted.

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!

I think it's a great system. It's surely the fastest way for me personally, in spite of it not being "all I know". With Bootstrap or Foundation, you need very little code to make something look nice, there is great documentation and lots of online resources.

If I want to make a UI in C#, I can pull up WinForms and use one language. If I want to have nice separation of style from code, I can use XAML (which is purpose designed for making layouts easy) and be using 2 purposefully technologies.

There is a lot more mental overhead to HTML + CSS + JS (and then the DOM somewhere) than to just type in

    Button accept = new Button("Accept!", new size(100, 45));
    form.Add(button, 300, 50);
If I want to style my button, I set some properties on the button.

(And if I want to use XAML, I send a file off to a designer who pops it into a purpose built XAML editor who can play around with the styling and layout to their heart's content!)

The thing is, web tech was designed for a non-interactive page based model, and then interactivity was added.

Then someone wanted curved boarders, and what had to be done to make curved borders was rather nasty. So after a good long time web standards caught up with fashion and an ability to add curved borders was added to CSS.

And damn you to the neither regions of hell if you want squiggly borders (Back to nasty scaling PNGs, or a few thousand 1 pixel DIVs!) However, I'm sure if those do come into style and enough people complain, that squiggly borders will also be added to the spec.

In comparison, a real UI framework lets you override the Paint function and do whatever you want.

On that note, about 2 quarters of freshman Java will have students be able to create custom UI widgets that do whatever is desired.

For someone who already knows programming? Point them at OnPaint, "here override it, draw whatever you want, have fun!" The set of concepts needed to modern UI development on the desktop is tiny. This is a problem space that has had three decades of effort put into making it simple and easy.

Again, want separation of concerns? About 2 hours of XAML will have someone making custom widgets, in fact that is the entire way XAML works! (It was sort of a mind twist for me that the easiest way to make an image button in XAML was not to override an OnPaint method and draw an icon, but rather place the XML nodes for an Icon and a Button together!)

But take someone that knows programming, well first you have to introduce them to CSS, which is a bunch of fields that you have to memorize (or rather just keep looking up) with a number of different types of units supported (none of which do exactly what you want, but I'll grant that is the case for all resolution independent UIs). Then of course they get to learn the newest flavor of HTML (semantic everything, don't you dare use ). Then you get to show them JavaScript (Packages? Namespaces? A language in which imports can silently override my variables causing havoc and dismay? Wow, C's #DEFINE is considered harmful, but this is a whole new level.)

But hey thankfully CSS3 makes 3 box layouts no longer an exercise in pain! So that is a good thing. (I've been using flexible layouts that auto adjust the positioning and sizing of elements since the late 90s, it is nice that the web finally caught up by introducing yet another boxing model!)

Of course the final lesson is "oh and by the way this all sucks so you really want to use a third party JavaScript UI framework. Also CSS is sort of painful so you may want to use a preprocessor. Yeah just shove your content in the middle of your client side generated DIVs. Well yes generating the exact same page on every visitors PC is sort of silly and a huge thermodynamic waste, but it is currently in style so stop complaining about it. Yes I know the comments section takes 10 seconds to load. What do you mean BBSs on a 9600 baud modem responded faster?"

(Edit: Of course the last bit about responsiveness isn't relevant to using a web stack for client side apps, it is just me complaining about the poor state of the web in general)

Post reply on HN