

Firefox OS Simulator – previewing version 3.0 - rnyman
https://hacks.mozilla.org/2013/03/firefox-os-simulator-previewing-version-3-0/

======
shardling
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.)

~~~
MatthewPhillips
> 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...](https://github.com/mozilla-b2g/gaia/blob/master/apps/calendar/style/ui.css)

~~~
azakai
> 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...](https://github.com/mozilla-b2g/gaia/blob/master/apps/calenda..).

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

~~~
MatthewPhillips
> 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.

~~~
azakai
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.

------
anon1385
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...](https://blog.mozilla.org/blog/2012/05/09/windows-on-arm-users-need-
browser-choice-too/) [2] [http://news.cnet.com/8301-14013_3-57573440/mozilla-
says-no-p...](http://news.cnet.com/8301-14013_3-57573440/mozilla-says-no-
plans-to-return-to-ios/)

~~~
sp332
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.

~~~
anon1385
>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...](http://news.cnet.com/8301-14013_3-57573440/mozilla-says-no-plans-to-
return-to-ios/)

 _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._

~~~
callahad
> 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.

~~~
pifflesnort
> _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?

~~~
sp332
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.

~~~
pifflesnort
> _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.

~~~
sp332
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.

~~~
pifflesnort
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?

~~~
sp332
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.

~~~
pifflesnort
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.

~~~
sp332
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.

