Hacker News new | past | comments | ask | show | jobs | submit login
Firefox OS Simulator – previewing version 3.0 (hacks.mozilla.org)
65 points by rnyman on March 13, 2013 | hide | past | favorite | 53 comments



Firefox OS is two things: an idea, and a particular implementation of that idea.

The idea is that you write apps in HTML/js/etc, using some well-defined APIs to access the underlying hardware capabilities.

The implementation is an underlying Linux system (Gonk), and Firefox's rendering/javascript/etc engines.

If you ask, 'can it run alternate browsers', what exactly are you asking? The browser app of FF OS is written the same way other apps are -- in that sense you definitely can. But it'll still be running on top of Gecko et al.

Ok, so can you replace Gonk/Gecko with some other underlying implementation? Well, that's kind of the whole idea! But if you do that, you won't be running FF OS anymore.

The reason we care about alternate browsers is choice. FF OS enables choice by promoting standards. They want an app written for the system to work just as well on Chrome or Safari (whenever Google/Apple get around to implementing the same APIs.)


> They want an app written for the system to work just as well on Chrome or Safari (whenever Google/Apple get around to implementing the same APIs.)

I'm a fan of what Mozilla is doing, but I encourage you to go look at Gaia code and then come back and repeat this. None of it will run in other browsers for two reasons:

1) They use JavaScript 1.7 features that no other browser is going to implement until ES6.

2) They use -moz prefixes in their CSS but don't include the other vendors: https://github.com/mozilla-b2g/gaia/blob/master/apps/calenda...


> 1) They use JavaScript 1.7 features that no other browser is going to implement until ES6.

ES6 is already here, piece by piece it is being added. It's just like HTML5 - there is no future date when suddenly it will show up. Firefox, Chrome, etc. all have parts right now.

> 2) They use -moz prefixes in their CSS but don't include the other vendors: https://github.com/mozilla-b2g/gaia/blob/master/apps/calenda....

Sounds like a bug, filing an issue would be appreciated I am guessing.


> ES6 is already here, piece by piece it is being added. It's just like HTML5 - there is no future date when suddenly it will show up. Firefox, Chrome, etc. all have parts right now.

Not sure what you mean, here's a compatibility table: http://kangax.github.com/es5-compat-table/es6/

Doesn't seem to be "already here" by any reasonable definition of here. Looks like no one but Mozilla is adding stuff that aggressively. Knowing the companies, I'd say it's very doubtful that Apple or Microsoft implement much until ES6 is finalized.


Firefox might be ahead, but Google is putting a lot of effort into it too as you can see in that chart.

It isn't "here" as in all here, but parts of it are, and more are added all the time. My point was that just like HTML5, it's a gradual thing, at least for Firefox and Chrome - it's possible other browsers will hold off, as you say, although I hope not.


These seem somewhat moot points while there aren't any other implementations. (Which is what I find really odd about the whole "will it run other browsers" question.) It would be kind of premature to provide other vendor prefixes while it was impossible to test whether the app worked or not!

If someone steps up and wants to provide an alternate middle layer under Gaia, I really doubt Mozilla will stand in their way.


A lot of that is simply because we need to ship 1.0. Many of the apps will be heavily improved in a short period of time once we get stuff shipping.


But you're not going to do a

  sed -i 's/const/var/g' *
right? So I'm not sure how any of the Gaia apps are going to run on non-Firefox browsers until other vendors start implementing ES6, so a year from now at least.


Definitely not, I believe the plans are to significantly refactor the apps (carefully) because there's a bunch of good practices that they don't follow. It's true that they probably won't run in other browsers for a while though.


Hi Matthews,

I think that the main idea is that your app should be portable between Firefox OS and other mobile web browsers such as Opera Beta and Chrome for Android.

Gaia is not meant to be run under another browser. I think as other vendors implement the needed APIs, they will be unprefixed.


I think it's pretty clear that the endgame should be that Gaia can run in other browsers when they're ready. The ideal situation would be that the platform is developed and standardized enough that you can swap out the middle layer without any problems, even in complex apps like Gaia.

But it would be a bit silly for Mozilla to pursue that at the cost of an expedient release of FF OS, when there aren't even any other implementations to test with. :)


Chortle, if only Chrome and IE weren't guilty of much worse.. I guess for a change they can have some 'standards' forced on them if they'd like to remain competitive


so if IE promoted standards it would be ok by you if they disallowed other browsers on windows?


That's not analogous by any stretch of the imagination. Policy around web standards in IE would have zero bearing on why people are actually locked into Windows: the non-portable, native applications.


Exactly. If they called it Internet Explorer OS, why not? But not while abusively using the Windows brand name that most people would blindly get because they don't know better.


Does it support third party browsers yet? To quote Harvey Anderson, Mozilla’s General Counsel [1]:

The prospect that the next generation of Windows on ARM devices would limit users to one browser is untenable and represents a first step toward a new platform lock-in.

If Windows users deserve choice then surely Firefox OS users deserve choice as well. It can't be a desktop vs mobile thing because Mozilla are campaigning for Firefox to be allowed on iOS [2].

[1] https://blog.mozilla.org/blog/2012/05/09/windows-on-arm-user... [2] http://news.cnet.com/8301-14013_3-57573440/mozilla-says-no-p...


Isn't this question essentially the same as "does <device> support other operating systems?", since the rendering engine is built into the system as the underlying graphics toolkit.

(Presumably there is nothing stopping someone implementing a browser in a HTML5 canvas, and Mozilla certainly wouldn't "ban" such an app.)


>the rendering engine is built into the system as the underlying graphics toolkit.

As far as I know Windows RT supports developing apps in Javascript/CSS so it sounds like Trident is pretty built in to Windows RT. That has not stopped Mozilla calling for the ability to bring Firefox to Windows RT [1].

>(Presumably there is nothing stopping someone implementing a browser in a HTML5 canvas, and Mozilla certainly wouldn't "ban" such an app.)

There is nothing stopping Mozilla doing that for iOS but they (rightly) want to be able to release a browser that has decent performance.

[1] http://blog.mozilla.org/blog/2012/05/09/windows-on-arm-users...


"supports developing apps in Javascript/CSS" and "literally everything is Javascript/CSS" are very different things.


I'd call "being wildly impractical from a performance standpoint" pretty effective at stopping someone from implementing a browser in an HTML5 canvas.


> Does it support third party browsers yet?

Firefox OS is a browser. Asking if it supports other browsers is like asking if the Linux kernel supports BSD, Windows and Darwin.

In other words, if you replace Gecko in Firefox OS, you are left with nothing of Firefox OS. Just the underlying Linux kernel basically. So technically this just makes no sense.

The situation is different on iOS, Android, etc. - web browsers are just another app there. Many browsers run on Android, and the only reason they do not run on iOS is policy, not technical matters.


So, all Microsoft has to do is define their operating system in terms of a browser and they can successfully and easily lock out all other browsers?


Not "define" as in changing some words. If they actually made an OS that was almost entirely IE, then sure, it would be pointless to ask for other browsers to run on it - because running another browser would mean replacing the OS with something else, just like with Firefox OS.

The only OSes like that are Chrome OS and Firefox OS (edit: and WebOS). Windows, Android, iOS, etc. are not browser based, so it make sense to ask for other browsers to run on them.


The "browser" in Firefox OS is just another window. Since the whole OS is a browser, they don't have separate code for the browser app.

If you want another browser, you just have to write it up in HTML + JS, like every other app on the device.


>you just have to write it up in HTML + JS, like every other app on the device.

Except the browser.

Mozilla could build Firefox for iOS using the technologies available to other third party apps on iOS. They (rightly) don't think that is good enough because it means they can't build a browser that is competitive performance wise with the built in browser.

http://news.cnet.com/8301-14013_3-57573440/mozilla-says-no-p...

The sticking point for Mozilla is not being able to carry over its sophisticated rendering and javascript engines to iOS. Essentially, the organization doesn't feel like it can build the browser it wants to for Apple's platform, Sullivan told CNET.


> Except the browser.

Actually, Firefox on FirefoxOS is written in HTML + JS. Here's the source: https://github.com/mozilla-b2g/gaia/tree/master/apps/browser

Sure, the HTML + JS runtime on FirefoxOS is Gecko, but that's an implementation detail. The browser itself, as users will experience it, is Just Another Webapp.


> Sure, the HTML + JS runtime on FirefoxOS is Gecko, but that's an implementation detail. The browser itself, as users will experience it, is Just Another Webapp.

Except that it's NOT, because the core of the whole thing -- HTML + JS -- is native.

Apple does the same thing on iOS -- you can use UIWebView to render HTML/CSS, and to execute JS. Yet that wasn't good enough for Mozilla -- why?


> you can use UIWebView to render HTML/CSS, and to execute JS. Yet that wasn't good enough for Mozilla -- why?

One issue is that Apple gives themselves a much faster version WebKit, but doesn't let anyone else use it. If you want to be a browser on iOS, you have to use an intentionally crippled engine.

Another is that Apple's iron grip on iOS is in direct opposition to the Mozilla Manifesto. Mozilla simply can't be a party to that platform without compromising its values.

That second issue is at the heart of FirefoxOS.


Apple doesn't allow 3rd party apps to use their JIT, which means all the JS is slow. http://daringfireball.net/2011/03/nitro_ios_43 And they're not allowed to make certain calls into the OS to make a fast native JIT, even if they wanted to make their own browser from scratch. So due to artificial policy decisions, it's doomed to be slow.


> And they're not allowed to make certain calls into the OS to make a fast native JIT, even if they wanted to make their own browser from scratch. So due to artificial policy decisions, it's doomed to be slow

Yeah, and Firefox doesn't allow native code execution at all either, so, also slow. Mozilla doesn't have the moral high-ground here, in that they're also creating two tiers of developer: Mozilla, and everyone else.


At least if Chrome made a version like they did with iOS (just a wrapper around the native web engine) it would have a JIT. That would be an improvement over the iOS version.


That's pretty much splitting hairs. Let's say Google wants to push forward dart, NaCL, or something Mozilla has never thought of, or would never agree with.

Now what?


That is already the situation with native apps. That's what the real competition is! Not Firefox vs Chrome but open standards vs closed platforms. The point of the Firefox OS project is to make standards-based HTML+JS the most appealing platform for developing and deploying mobile apps. They need to make it better than native apps on any platform, and at least as good as any non-standard web technology. There is very little point in making a Dart app when a JS app is within 10% as fast and runs on every platform.


Except for the fact that world-changing technologies like the web would never have existed if nobody was permitted the first web browsers because platform vendors limited everyone to gopher.

I don't want to live in that two-tier world of web vendors and everyone else.


Maybe that's true, but it's really a different conversation. We were talking about getting your choice of web browser on a mobile OS. You're always going to be at the mercy of a platform vendor - Mozilla, Apple, Linus Torvalds, Intel. Honestly at least Mozilla are trying for an open development process, more than anyone else. Even Android's source only gets published after the code has already shipped. I trust Mozilla more than anyone except maybe the Linux project itself to do right by application developers.


I'm not sure what you mean. Apple rejects apps which duplicate native functionality. It took years for Google to get their Maps and Chrome apps into the App store. And guess what Chrome is on iPhone? It's just a wrapper around the native iOS webkit engine, exactly the same as the Firefox app is a wrapper for the native gecko on FirefoxOS.

Also, the reason you can't get good performance on a 3rd-party iOS browser is that Apple artificially restricts JIT to first-party apps.


> Mozilla could build Firefox for iOS using the technologies available to other third party apps on iOS.

That's not true, Mozilla could build Firefox for iOS the way they want to, they just can't release it on the App Store. It's an imposed limitation, not a technical one.

As others have said, if you can compile WebKit with Emscripten you can build a WebKit-based browser for Firefox OS that gets 2x performance vs. native.


Sounds kind of like what Microsoft said when they were first "integrating" IE into the system.


Well, Netscape etc. cost money at the time MS included IE with Windows. They were using their market position in the desktop space to elbow into the browser space. That was a clear abuse of a monopoly. Mozilla doesn't have a monopoly, so they can't abuse it. And now, most of their competition is also free, so giving a browser away for free isn't anti-competitive.

Besides, the OS is literally a browser. The only way to avoid having a default browser is to remove the little Firefox-branded app that opens a new gecko window. That doesn't seem to promote competition at all.


That smacks far too much of "it's not wrong when WE do it." Microsoft ruined this sort of integration for everybody.


Firefox isn't trying to compete with anyone though. They're not interested in blocking competition. In fact, they're trying to encourage web apps that run on every device over native apps that only run on one platform. If everyone switches to a more open system, the Mozilla team will be ecstatic.


> In fact, they're trying to encourage web apps that run on every device over native apps that only run on one platform.

Not quite. They are encouraging apps that are based on HTML and Javascript, but as far as I can tell Firefox OS includes plenty of APIs that are not available on other platforms, and there are no plans to bring them to other platforms [1].

Yes this isn't necessarily the fault of Mozilla, they can't force Google/Apple/Microsoft/Opera/Nokia etc to add features to their browsers [2], but that of course is one of the problems of using the 'open' web as a platform for everything. Either you remain standards compliant with very limited features dictated by the glacial/gridlocked standards process, or you extend the standards even without the support of the other big players, resulting in apps that only work on one OS (although are perhaps easier to port, depending on exactly what is missing).

[1] https://wiki.mozilla.org/WebAPI I see plenty of grey "not currently planned for this platform" items in this list

[2] other than to release their own browser on those platforms, which brings us full circle… the most important thing is open platforms where anybody can write and distribute native software targeting them


That list is only for various versions of Firefox, not other platforms. The vibration API, for example, is a W3C standard that is supported by Chrome for Android already. HTML media capture (using the camera from a webapp) is supported in Firefox, Chrome, and Opera.


You are so entirely wrong here that I have to guess you are either willfully trying to misrepresent things, or you have done so little research into this issue that your better sense should have told you to not comment.

On the very page you are commenting on as "grey" they explicitly mention that each API will be submitted to the W3C for standardization once they reach a point where it is suitable (ie it has an implementation demonstrating it).

Every single article I have seen about Firefox OS that includes comments from a dev has seen the dev explicitly call out that all the APIs they are creating will be submitted for standardization to allow the apps to run on any browser that supports these open standards.

Please, please either stop misrepresenting the intent of the Firefox OS team, or if you are honestly in error, do more research before attempting to speak authoritatively.


>"If you want another browser, you just have to write it up in HTML + JS"

So basically, with Firefox OS, you're limited to using the Mozilla browser. Sounds like Firefox is trying to lock you into their standards, exactly what they're accusing Apple of doing with the webkit engine in iOS.

Android and Ubuntu Mobile look to be the only solutions that give me the flexibility I want in a phone OS.


"Firefox is trying to lock you into their standards"

Yes, the purpose of the project is to promote open standards for phone-oriented web apps.

"exactly what they're accusing Apple of doing with the webkit engine in iOS."

iOS is not an open system and does not promote open standards. The point of the FirefoxOS project is to make interoperable standards that will hopefully be supported by every future web browser.


That's a fairly paranoid assumption. The current documentation of the Firefox OS front end suggests that it will be happy to run third party applications that run outside the browser/front-end layer:

https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/...


Is it a product yet (which is sort of a pertinent question when you start talking about some definitions of support)?

The intent seems to be to document the OS abstraction layer and have the capability to launch applications that do not depend on the browser layer:

https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/...


Yes, Firefox OS also supports native apps. It is likely that Opera will port their mobile browser.


Yes, you can run any browser you want on Linux.


WRONG. You can run any browser you want on Darwin. iOS uses the Darwin kernel, but you CANNOT run any browser engine under iOS.


Their point was that, deeper down, FFOS is running on Linux.

I have no idea why you brought Darwin into the conversation.


(S)he expressed it badly, but I think the point was fairly clear: just because the Linux kernel is open doesn't mean FirefoxOS allows you to run arbitrary native software, in the same way that Darwin[1] being open doesn't mean iOS allows you to run arbitrary native software.

[1] I'm not sure that the iOS version of Darwin actually is totally open source, but for the sake of argument I'm going to assume that enough of the code is available that you could cobble together a phone that runs Darwin and then run whatever software you wanted on it




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: