609 points · by ash · 11y ago · 144 comments
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 <input type=submit> tag in HTML, it's a native widget). For example, if you run the current build on Mac, you'll see that new tabs use Yosemite "vibrancy" effect. Native look and native performance, can, in theory, be achieved.
I've often wondered why OS's just don't host browser render engines internally and draw their UI with that.
Well I don't for long, I know HTML is much younger then X. Also browser engines are massive resource hogs. But with the advent of 8-16+ GB of ram in consumer computers can we really say 2-3GB for windows rendering is heavy?
Especially if it offers that much empowerment to developers.
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 over 25% of the usage. Then some applications that are actually used. (Let me use my own process mem counts here...) 1.3Gb for Firefox, 0.6Gb for Android emulator, 0.5Gb for Visual studio....
And there would have gone over half of the 8GB of ram!
I am sure my current memory usage would be half of what its now if developers would actually give some shit about memory usage... Not just allocate too much memory because "there is so much memory it doesn't matter"
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/implementing the wheel, which is reflected to the user in a lack of many common types of bugs, annoyances, and accessibility issues.
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.
CSS is good for styling but not for layouts.
people used to complain about Firefox hogging memory, I think it's Chrome we should be worried about...
At my day job I create apps for TV decoders. Most of those render and run in browsers.
The boxes have 1 GB memory, the browser uses just a small fraction of that. A lot of the browser memory is used for graphics (think bitmaps), the JS-heap is only 4 MB, not sure about the rendering engine.
Granted, we use SVG, not HTML/CSS, for most of these apps.
A lot of these apps wouldn't exist if they couldn't have been built quickly and cheaply.
With this setup I can boot to a system that uses about 1.5GB of RAM occupied with Firefox with a couple of tabs open.
Some stuff that I'm trying to eliminate that's a big memory hog: dropbox (150MB), skype (150MB).
I believe Windows 8 can do this.
Even in a thread earlier today there was a post about the state of desktop web apps... node-webkit and atom-shell aren't bad options either.
I always wanted to like XUL, but a shell mode for HTML+JS that can have more control over iframes than is allowed in the browser... it would definitely be interesting. It would be more interesting if it followed node's API (at least for JS-level modules).
Mozilla does that with XUL. That's what they're trying to get rid of.
Why spend time on other UI systems that will only end up requiring more work for a visually worse result?
It may or may not be used in the end, but I'm excited by the potential.
No troll, I thought that was what XUL was.
There might be other advantages of replacing XUL with HTML, rather than developing them in parallel.
Doing the Firefox chrome (heh) in HTML is another way to put our money where our mouth is, like the Firefox OS and Web App Runtime efforts.
There's a more detailed explanation of the situation of XUL here: https://lists.mozilla.org/pipermail/dev-platform/2014-Octobe...
http://opentype.info/blog/2013/07/03/color-emoji-in-windows-...
Edit: some more public details
The default browser on the BlackBerry 10 platform was a completely new browser application. The chrome was written in HTML, CSS and JavaScript. Being able to develop the chrome on your desktop browser or being able to run inspector remotely and using your desktop was very handy. The core was a command line application called webplatform that "launched" a url that was a "webapp". The webapp had API's exposed to it such as creating WebView's in or out of process (yup blackberry has had multi-process tabs for a while now...). One joy was being able to pull up the Javascript console for the browser WebView and dynamically calling exposed c++ API's in any WebView in any process to test out features or diagnose problems.
It started out as a quick little proof of concept I tossed together over a day and the upside was large enough to invest time into. One of the reasons for making the main browser in html was that as a platform we wanted web application to succeed. Eating our own dogfood we made sure webapps could handle the job. The API's that were needed were there, memory usage were low, startup time was fast etc. And if you search for reviews of the blackberry 10 browser you will find that the end result was a success.
Edit 2: Much more in depth information can be found on this video which was a presentation given at Blackberry Jam by several of my colleagues. Skip to the 23 minute mark to see some actual code of what a webapp browser would look like.
I can only imagine there is a fair amount of overlap in Mozilla where there are two developers working on the same thing, one for xul, one for html.
See also this other thread linked from the discussion in the OP, "Moratorium on new XUL features": https://lists.mozilla.org/pipermail/dev-platform/2014-Octobe...
1. Way back when (circa 1998-2001?), the Mozilla project started as a radical redesign of the next gen Netscape browser. One of the core principles of the architecture was that the browser itself would render the UI elements (using an HTML-like tech call XUL).
2. The Firefox browser (then called "Phoenix") was a reaction against the above, which was thought to make the browser too heavyweight and slow. Originally Phoenix was the Gecko engine in a native UI window without all the XUL overhead (and without all the other components of the Mozilla Suite like the email client).
Now we're seeing the reverse trend, 15 odd years later.
EDIT: It turns out I misremembered about Phoenix dropping XUL completely--rather they dropped XPFE for a "new light-weight XUL toolkit", along with dropping all the non-browser components of the Mozilla suite.
Check out the Phoenix 0.1 announcement: http://website-archive.mozilla.org/www.mozilla.org/firefox_r...
"Phoenix is a redesign of the Mozilla browser component, similar to Galeon, K-Meleon and Chimera, but written using the XUL user interface language and designed to be cross-platform."
Microsoft integrated Trident (Internet Explorer HTML engine) to Win95 with the ActiveDesktop refresh (part of IE4 installation) and shipped with Win98 by default. The desktop background wallpaper was a large HTML page, there were DHTML widgets, the Explorer sidebar was HTML. In Windows 2000 and ME you could even preview Videos in the HTML based sidebar. WinXP's sidebar is HTML based too, also the slow applications window where you can uninstall applications, as well as the control panel. Even in Win7 and more modern versions the UI render code for the control panel, some new popup dialogs, and some Office UI and Windows Media Player is based on a forked render code that happened in the XP era. The EU even mandated that Microsoft has to release the API to the public, so that other developers could create such beautiful Windows applications based on that UI code.
Use your favorite PE resource explorer (e.g. reshacker) to verify it. The DHTML source is in various shell related dlls in the Windows directory.
I'm not sure Phoenix was ever a reaction to XUL. Phoenix was more a reaction to the kitchen sink feature-list of Netscape 5 and Mozilla Application Suite, seeking to pare down the feature set to a minimally viable browser.
In XUL (and moreso XBL) Mozilla had a web technology that there was talk of submitting for standardization and which brought with it a level of expression that HTML didn't offer at the time. As HTML, CSS and JavaScript have evolved, XUL/XBL bring less and less to the table.
Also, Phoenix kept using XUL, just a rewrite that didn't attempt to do everything from scratch, but relied upon native components wherever available. Most of the Firefox UI is either XUL or HTML.
https://www.mozilla.org/keymaster/gatekeeper/there.is.only.x...
http://sourceforge.net/p/xul/mailman/message/1494849/
I think Firefox mostly started out from an urge to make a "Browser product", rather than whatever the hell the suite had become. It shows in the release notes:
http://website-archive.mozilla.org/www.mozilla.org/firefox_r...
A bunch of stuff about convenience and fast and fixing problems and usability is in there.
http://www-archive.mozilla.org/roadmap/roadmap-02-Apr-2003.h...
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 wrappers.
5. switch to web development completely and avoid desktop apps all together :)
6. 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 <div> hacks, Bootstrap, Dojo/JQueryUI, different rendering engines, etc) is an exercise in pain compared to basically _any_ modern UI toolkit. (From XAML to Qt, Android, hell even GTK.)
edit: minor correction, I meant to say " build a UI" not "build a native UI"
Is XUL really better than HTML + CSS? Probably. But HTML + CSS is getting a lot better (flexbox, etc), and tons of developers know it now and can contribute. Plus, dogfooding. I think it's a really good move!
Sure, RAM usage will probably get worse, but perhaps it will motivate them to improve that as well, and all users of the browser on all pages will benefit as a result.
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.
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.
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 this, again?".
EDIT: Still impressive though, nice proof of concept!
EDIT 2: As much as I hate the "Why am I getting downvoted?" shenaningans that people usually pull, I want to clarify the intent behind this post. I'm not flaming or hating on the project, it's a cool idea. I was trying to spark some insightful conversation on "where do we want to go from here?" and "do we really need a browser if we have gone this far?". If you want to downvote me, why not just reply to this post and have a nice interesting conversation instead?
I don't think the search-box and tabs are rendering it.
The firefox interface is already described in an XML format (XUL) and rendered from that. Instead of having two markups and two renderers, this allows you to simplify and consolidate to a single one.
I would hardly construe that as having "gone too far".
The rendering engine (Gecko). I guess for it to make sense you must separate the drawing engine from the browser, which adds things like tabs, bookmarks, themes and add-ons.
The browser is rendering it's own UI.
At it's core, a browser is an HTML/JS rendering engine with some chrome to allow users to manage what pages they're looking at – and in most cases, that chrome is actually pretty minimal. It seems like a natural evolution to play with the idea of implementing that chrome in the natural UI language of the browser engine too. Yeah, the tools aren't there yet – but experiments like this will give us some scope to play around with what might be possible and identify the pain points that must be overcome to make it a reality.
Great stuff.
There is a 'browser in a gist' [3] using Breach which is a good example of its use.
[1]: http://breach.cc/
[2]: https://github.com/breach/thrust (I believe this is the new core of Breach by the same people)
[3]: https://gist.github.com/morganrallen/f07f59802884bcdcad4a
chrome://browser/content/browser.xulhttps://developer.mozilla.org/en-US/docs/Tools/Tools_Toolbox...
You may notice a thin layer of XUL.
Anyway I'd hope for something better than XUL/XBL. The potential was always there. Mozilla the platform! —
I massage HTML and CSS professionally since 1996, and I must say I'd prefer something like "XUL2" over my beloved web standards any day. I wouldn't mind if "XUL2" was in actuality created with web components. Though seriously, CSS and DOM (HTML/XML) were created to make you suffer. That's their true purpose.
There is no easy way out of this. And rewriting the web won't work either.
ps: not my work, see : http://www.reddit.com/r/programming/comments/2ow1g0/firefoxh...
That being said, I'm quite excited about that project, I opened a pull request a few hours ago and it was accepted :)
If not for that, Sailfish browser could reuse the UI.
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.
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.
Say, I want to visualize what my site visitors are seeing - and I capture complete request/reply stream of data off Ethernet interface.
1. What do you guys think about sidebars and multiple toolbars? There is only a limited space available on screens these days for most people. I find them very archaic.
2. Dropdown arrows - I also don't understand the purpose of actually showing that if you click here a menu will open. A folder expands when you click it. There is nothing to be said about it.
3. Lack of overlay icons. There is literally a block with yellow background which shows number.
4. Lack of interest in devs to innovate on Firefox. There is a difference in versions of Evernote webclipper for Firefox and Chrome. Diigo extension is in atrocious condition.
Why do you think a solid browser like Firefox is lagging behind in UI compared to Chrome?
For example, Diigo's addon doesn't have overlay icon so it is impossible for me to tell if I have already bookmarked a page or not. Like many addons on Firefox Diigo has both sidebar and toolbar. So basically they have developed 3 UI elements and none of which work well. There is clearly Diigo's fault here but applications are as good as platform.