Allow me to give a different perspective here. While in many other mobile operating systems you can build apps with HTML (saying HTML from now on but meaning HTML/CSS/JS, ok?), the API the vendors make available don't cover the same features as what is native on that platform. We can say that Firefox OS is important because of the following things:
MAKING THE WEB A FIRST CLASS CITIZEN
Makes the web a first class citizen. Its not like "you can build apps with web technology", its more like you don't need native because all you need is available thru the web apis. While in other platforms, there is a barrier on what can be accomplished with HTML alone, on Firefox OS HTML is the way. Let me give you a silly but practical example:
Suppose you have an intranet on your small company built by IT in PHP or something. This intranet has an address book for everyone in the company. Using the Web API, you can detect the contacts API and offer the user the ability to import contacts from the web directly to the phones contact book. This is done in a secure way, with permissions granted by the user, its not like "hey, open this page and flood the contact database". The security model is good. This is a silly example but it is useful for many people. Its the tiny APIs that make your life easier and your experience better.
GIVING YOU THE FREEDOM OF THE WEB
In platforms such as iOS, your only venue to distribute your apps is the iTunes App Store. All money passes thru Apple. On Android, you can have third party stores but the default setting is to allow apps from Google Play only (unless you're a kindle or nook). Most of the other platforms are about controlling the ecosystem to make money for the vendor.
On Firefox OS you have the Firefox Marketplace that is a mixture of Chrome Webstore and Google Play. It allows distribution of apps for desktop, android and firefox os (all using gecko runtime). You are not tied to Firefox Marketplace though. You have an install API that you can use on your app or your site to install apps on the users phone (Again, it asks permissions, security is good). You can even fork the Firefox Marketplace code and build your own.
Talking about payment, you have the usual credit card charging on the marketplace but you also have carrier billing (if the carrier implement it) allowing users to buy apps and have it charged to their prepaid cards or monthly bill. Remember that in many markets, people don't have credit cards. If you're not happy with both solutions you can roll your own payment solution using the payments API and receipt protocol. You are free to distribute and monetize your app as you see fit, just like on the web.
ITS NOT A REPLACEMENT FOR YOUR IPHONE OR GALAXY S3
If you have an Android device, you can just install Firefox Mobile and be happy since we'll eventually have feature parity between Firefox Mobile and Firefox OS. These Firefox OS phones are being created for emergent markets. People from U.S. and richer parts of Europe don't really realize how things are in south america and asia. An Samsung Galaxy S3 will cost USD 1000 in Rio right now while the minimum wage is about USD 350. Buying such expensive phones require a plan and saving for a long time. 78% of the Brazilian market is on feature phones.
By offering an inexpensive handset that has a full smartphone experience with a price that is affordable is key in these markets. It is about bringing the next million people online on the mobile web for the first time. Firefox OS is here to be the first smartphone for people that are still on Symbian or S40. In some markets you can buy a cheap android with decent performance, in others you can't.
Firefox OS offers the best cost-benefit ratio once you think about how much performance you have against your hardware specs. If you pick the same low-end hardware with Android or Firefox OS, Android will have a worse experience, not because Android is broken in any way, Android is great but because there are more things going on on Android than on Firefox OS. Firefox OS is just a tiny hal, gecko and gaia, while Android has a VM and lots of other things going on.
As I said before, this is not about fighting Android, its about offering a new choice for those that can't afford a good Android or iPhone. Here in Brazil, we have some very cheap Android devices since we have Samsung, LG and others building them locally. Most of these devices are pretty crap to use. The same hardware with Firefox OS would be a much better experience.
ITS ABOUT THE WEB API
The objective here is not to sell phones or be dominant. Firefox OS is about preventing vendor lock-in. Right now, each platform is an island. iOS has Objective-C/Cocoa Touch, Android has Java, Windows Phone has something that I can't recall. If you want to build cross platform apps, you're in for a world of hurt. You can use phonegap but this is not something offered by the platform vendor, this something that was built to bridge the web and native.
The Web API is the next step in this direction. Each of the APIs in the collection known as Web API is being standardized with the W3C and other interested parties. The idea is that other vendors adopt these APIs and that open web apps work anywhere equally. Firefox OS is not about an exclusive experience, it is about openness and freedom. Even if Firefox OS fail but the Web API succeeds, it will be a huge victory for the open web.
ITS ALSO ABOUT BEING CREATIVE
Right now there is a steep learning curve regarding developing native apps for most platforms. Objective-C and Java are easy languages for CS people but for the layman they are pretty hard. It requires a lot of effort to be good with them.
Why is the web a success? If the web required such effort, we'd still be using gopher and news. One of the reasons the web was a success was that it required less effort to produce something useful. I am not saying good, I am saying useful. Anyone could host a server, anyone with a text editor could build pages. Firefox OS is about bringing this to mobile. It requires less effort and your open web apps can be deployed on other platforms such as iOS and Android (with phonegap or other runtimes). Yes, these days it requires a lot of effort to build good web apps but not much to build useful ones. Firefox OS has the potential and openness to bring all web developers to mobile with ease. Open Web Apps are king of local content. Niche apps that are only useful for those in a neighborhood or profession are a web editor away from being born and available. The web is king for local content and Firefox OS is nothing but an mobile extension of the web.
WHY I THINK FIREFOX OS WILL SUCCEED?
As I said above, Firefox OS is nothing but the web and the web can't fail because it already succeeded. Right now the only technology that bridges smart tvs, video games, smartphones, desktop and laptop computers together is HTML/CSS/JS.
Remember how much progress we had in JS runtimes the last year, try to imagine where we're going to be next year. Javascript is already reaching 1.5x native speed in some cases, two years from now, this won't matter because it will as fast as it needs to be. One could argue that for most mobile app needs, it is already fast enough.
Apps built for Firefox OS can be deployed as web pages and made available on a server. They can be sold on Chrome webstore and Firefox Marketplace. They can be wrapped with phonegap and deployed to iOS, Android, Windows Phone, BB10, Bada, Tizen and webOS. They can be wrapped in other runtimes and be used on Smart TVs and video games. The web is the king of cross platform, of vendor neutrality and without lock-ins.
I think that the future belong to HTML based solutions and all platforms that embrace it.
PS: I am a Mozilla Rep and a Firefox OS Launch Team member in Brazil.
I love what Mozilla is trying to accomplish with Firefox OS. I hope it succeeds, and I don't want to be negative. But I'm not convinced about this part:
> Firefox OS offers the best cost-benefit ratio once you think about how much performance you have against your hardware specs. If you pick the same low-end hardware with Android or Firefox OS, Android will have a worse experience, not because Android is broken in any way, Android is great but because there are more things going on on Android than on Firefox OS. Firefox OS is just a tiny hal, gecko and gaia, while Android has a VM and lots of other things going on.
Let's look at some of the components that a modern mobile OS needs:
* Kernel
* Hardware abstraction layer
* OpenGL ES implementation and compositor
* 2D vector graphics API
* UI toolkit
Android and Firefox OS both also have a VM to run managed code, along with a JIT compiler. Android's VM, Dalvik, was specifically designed to be memory efficient in the case where several apps are running as separate Unix processes. Is the same true of SpiderMonkey?
So Android and Firefox OS share many of the same types of fundamental components, and in some cases, the same components (the kernel, some aspects of the HAL). But on top of this, Firefox OS and its apps add:
* Markup language processor and layout engine designed for hypertext documents, not UIs
* Parser for a poorly designed programming language (JS), and advanced JIT optimizations that in effect extract the latent static types from a dynamically typed language. By contrast, Dalvik accepts bytecode as input, and the program is already statically typed, so the JIT compiler can be much simpler
* Hacks on top to turn this combination of hypertext markup language and poorly designed programming language into a tolerable UI toolkit and application platform
So how can you say that Firefox OS is more resource-efficient than Android? Perhaps the Android platform developers have gotten sloppy lately, since they're primarily concerned about high-end phones. But that can be remedied. What matters is that, as far as I can tell, the Android platform was designed for efficiency, while the Web platform was not.
I hesitate to bash the Web platform, because for better or worse, it seems to be the best way of achieving Mozilla's mission, and I believe social ends outweigh technical means. But I believe I have accurately described the current reality.
> * Markup language processor and layout engine designed
for hypertext documents, not UIs
Unlike XML which Andorid uses, right? I mean XML was made for designing arbitrary (potentially hyper-linked or linked) documents, no?
> * Parser for a poorly designed programming language
and advanced JIT optimizations.
So are you talking Java or Javascript?! At this point it doesn't matter. Without doing any benchmarks and solid number crunching your claim is empty air.
This doesn't mean Firefox OS is more resource efficient than Android. Without benchmarks on same hardware neither can claim performance high ground.
> Android and Firefox OS both also have a VM to run managed code, along with a JIT compiler. Android's VM, Dalvik, was specifically designed to be memory efficient in the case where several apps are running as separate Unix processes. Is the same true of SpiderMonkey?
Short answer: yes, SpiderMonkey has been designed to be quite memory efficient.
> But on top of this, Firefox OS and its apps add:
Actually, let me clarify something, if not for you, then for our readers: "on top of this" means essentially "on top of the kernel and HAL," rather than "on top of Android."
> [valid points] So how can you say that Firefox OS is more resource-efficient than Android? Perhaps the Android platform developers have gotten sloppy lately, since they're primarily concerned about high-end phones. But that can be remedied.
All your technical points are valid. However, you have not taken into account the fact that Android is much larger than that not to mention, conceptually, very old. Just the Core Libraries, for instance, offer at least three or four ways of reading/writing files. Most of these APIs should be removed for the sake of performance, as they were based on Java 1.0 designs from the 1990s, a time at which industry believed that disk speed would keep improving as fast as CPU speed and that concurrency was too expensive to be used. But these APIs cannot be removed, simply because too much code depends upon them, both in Android itself and in applications that Google would not want to lose. Sadly, this means that all such code is a performance hog, especially on mobile devices, since mobile storage is horribly slow in comparison to PC storage.
Now, while I am less familiar with the rest of the architecture of Android, I seem to remember this is true of many features and that many features are accidentally implemented several times in the kernel, Dalvik, the libraries and/or the frameworks, in the interest of (partial) compatibility with Posix, Linux, J2SE, etc – and tutorials.
While it would theoretically be possible to get rid of all these inter-layer duplications, and to only keep the good APIs, this effectively means breaking too much of both Android itself and of many applications. Google cannot afford to do that, as they would risk driving away all developers and users. Moreover, Google does not need to do that, as Android has always been targeted towards high-end phones. A new operating system, by opposition, with everything to win and nothing to lose, can start from a blank state. Moreover, since Firefox OS offers only high-level APIs and no NDK-style access, it is easier and will remain easier for a number of years, to perform whichever low-level refactorings are necessary to improve performance and/or memory efficiency without breaking applications.
Note that this is almost the reverse of Chrome vs. Firefox. Firefox is burdened by the number of add-ons that need to be supported, and the low-level APIs provided to these add-ons, while Chrome, starting with a blank slate and restricted public APIs, managed to rise the stakes of performance quite harshly.
Your argument is quite plausible. Android has indeed accumulated several APIs: ANSI C, POSIX, various Khronos APIs (OpenGL ES, OpenMAX), a subset of J2SE, and Android APIs (both Java and native, with some overlap between the two). I can accept that offering only web APIs leaves much more room for streamlining the lower layers of the stack. Maybe a future Firefox OS phone will run a new processor that was specifically designed to execute JavaScript.
And perhaps my earlier point about HTML+CSS and web layout engines being designed for documents, not UIs, was too handwavy. One might argue that there is a sort of Greenspun's tenth rule of UI toolkits: Any sufficiently complex UI toolkit contains an ad hoc, informally specified, bug-ridden, slow implementation of half of HTML and CSS -- and then probably contains a full Web browsing engine, too.
It seems to me that the Web technology stack has plenty of inelegance of its own. But no platform is perfect. Maybe the Web platform, exposed to developers on its own without making the lower layers available, really is the best we've got.
Can you explain why you think the Java storage APIs are ill-suited to mobile devices?
> Maybe a future Firefox OS phone will run a new processor that was specifically designed to execute JavaScript.
I haven't heard of any such plans, but that would be fun. Ah, the good (?) old days of the Lisp machine...
> Any sufficiently complex UI toolkit contains an ad hoc, informally specified, bug-ridden, slow implementation of half of HTML and CSS -- and then probably contains a full Web browsing engine, too.
Let it be said that the Mwcampbell Law was first enunciated on Hacker News on the Ninth of July, 2013.
> Can you explain why you think the Java storage APIs are ill-suited to mobile devices?
Generally, it's a set of simple things. The File API, for instance, should forbid execution of any I/O call on the UI thread, or on any high-priority thread, as the duration of any I/O call is unbounded (Dalvik can be executed in a "strict mode" that prevents I/O calls on the UI thread, which is good, unfortunately that's not the default mode).
Also, the default manner of doing any copy with the File API is a read/write loop, which is very inefficient in terms of memory copies, especially when Linux offers in-kernel copy.
No, they are not plausible. The whole idea of using HTML, CSS, and JavaScript as the back end technology for a low-end smartphone is nuts. Even the best HTML rendering engines are CPU and memory hogs. CSS was never designed for and is nearly impossible to hardware accelerate, and JavaScript is notoriously difficult to optimize and even the best VMs run orders 3-10x slower than native code, while the JS VM takes up much more memory than the efficient dalvik.
All the early reviews of Firefox OS describe it as laggy and slow. For example this one from the verge:
"Lag is a major concern — apps took multiple seconds to load, to change toggles, and to make UI transitions"[1]
Or this one from CNET:
"unresponsive screen makes typing a laborious process requiring painstaking precision. Every action from swiping to tapping onscreen controls takes a beat until you see results, so using the phone for a prolonged period steals minutes of your time... Lag carries into the camera, which is slow to launch, snap, and reset."[2]
>"designed for documents, not UIs, was too handwavy" Not for anyone who's had to work with DOM for Web apps. We know all too well as its name suggests that it was never designed for apps and is well past its expiration date.
My 3yr old similarly spec'd SGS runs CM 10, Jellybean like a champ. My mom's worse spec'd 3GS is still smooth and fluid. Of course, a low end Android phone running the most resource intensive skin, TouchWiz, is going to perform poorly, but in my experience vanilla AOSP scales down quite nicely on low-end hardware.
So how does this phone benefit Joe User? It's an android kernel, but the user is cut off of the diverse android app ecosystem. The performance looks terrible, and the user is locked into the Firefox browser, like Safari on iOS.
That's not all that surprising. IPhone 3GS and Samsung Galasy X had launch prices four to five times higher than the phones you are talking about. Of course they are faster, the same way that old BMW M5 is faster than new Ford Fiesta.
But that's not the point. FFOS can't really offer that much to rich people in US or Western Europe where iPhones grow on trees and streets are paved with high-end Android phones. It is not supposed to compete with the next iPhone or Nexus, but with the next Nokia Asha, cheap Bada phone or the next cheap ZTE, Alcatel or Huawei Android phone that is still sold with Android 2.3.
I'm guilty of handwavy explanation, so I will try and get back to concrete cases.
The reviews by CNet and The Verge were accurate a long time ago – given the date, CNet's review was done with an early beta, and I have no clue about the date at which The Verge's review was done, but I suspect that the review was published long after the actual review. I have seen the speed of my phone increase considerably since then, both when I was running 1.0.x and now that I'm running 1.1.x.
If you want to know for yourself the actual performance of a FirefoxOS phone, the only way is certainly to get your hands on one. My personal experience is that, comparing with equivalently-spec'd unmodified Android phones, my FirefoxOS phone runs absolutely great. I have not attempted to compare with Cyanogen-ed phones.
> The user is locked into the Firefox browser, like Safari on iOS.
Actually, with effort, it should be possible to port WebKit/KHTML or any other rendering engine to FirefoxOS, e.g. by using Emscripten or Mandreel. Of course, this port will have to use the platform's display API (typically, Gecko's implementation of <canvas>) and the platform's VM, so the benefit might be limited. But if somebody considers this useful or fun, please, by all means, do port any other browser to FirefoxOS, we will be glad to help you.
That's not quite the answer you would get from Apple if you wanted to port Firefox or old-generation Opera Mobile (not Turbo) to iOS.
> So how does this phone benefit Joe User? It's an android kernel, but the user is cut off of the diverse android app ecosystem.
Several comments have already provided an answer to that question. I will try and sum up a few of them quickly:
- all your private data doesn't belong by default to some company;
- the Mozilla community has proved time and time again how it is able to provide applications localized for regions/minorities that big companies simply ignore, and I expect that this will also be the case for FirefoxOS phones;
- payment APIs implementations are adapted to local markets, i.e. in countries where people typically don't have a credit card, they do not have to use one if they wish to buy an application;
- users are even more free from the Marketplace than on Android - I expect that this means we'll soon see numerous marketplaces specialized in local interests (e.g. Venezuelian marketplaces, Catalan marketplaces, but also a company's internal marketplace, etc.), or in application domains (e.g. Gaming, e-books, adult stuff, safe-for-kids stuff, etc.);
- cheaper phones through higher-performance on entry-level hardware – recall that, in Spain, the phone is sold at 69€ including 30€ prepaid communications, without contract;
- no vendor lock-in – if you change phone or if you use your desktop computer, your applications follow you;
- breaking monopolies in regions in which you have the choice between a feature phone or a 600$ smartphone + contract.
I realize that people following Hacker News are no Joe Users and that they often have access to technologies that Joe User hasn't even heard about, both in terms of hardware and in terms of software (e.g. Cyanogen). But this first generation of FirefoxOS phones is not designed with them in mind. It is designed primarily for Joe "I'm ignored because my region or my language is not fashionable or rich enough" User.
I appears that new project starting from clean slate, and being able to use newest research and learn from mistakes of others, and therefore being better than the original project, is a pretty common pattern.
For example, see LLVM and GCC. LLVM is better compiler simply because it has much less legacy code to understand, maintain and support, less platforms, and mostly because it's twenty or more years younger. Similar thing can be stated about screen and tmux, apache and nginx, X and of course wayland (the whole point of Wayland is to do just this), and perhaps other tools.
While this may look sad, it shows, that despite the fact that everyone is still using algorithms from the 60's to find shortest path in a graph (1) it shows that our field is evolving. And that's a good thing.
(1): at least I hope. If there's a new one, please tell me!
In the high-end market, it doesn't matter, everyone is good. In the low-end market, Firefox OS has better performance than Android.
From a high level analysis, your comment appears spot on but unfortunately it is not that simple. Dalvik VM is GREAt and we all know the bad parts of JS. The problem is that there is a lot going on on android phones. Its not as if there is only Dalvik and your app. In Firefox OS Gecko is so close to the hardware that it doesn't need to go thru hops. Firefox OS can be said to be nothing but a browser running on bare metal. Android is not slow, but on low-end hardware it is not as responsive as it should be. Pick a Galaxy Ace for example, its specs are similar to ZTE Open (ZTE Open has better specs) and the price is similar but the experience is much better and more responsive on ZTE Open.
Dalvik was created to be efficient, and it is. My comment is not about Dalvik being bad, it is not. Its about low end phones running android offering a bad experience. I don't know if you ever used those phones or if you ever tried a Firefox OS phone.
> Hacks on top to turn this combination of hypertext markup language and poorly designed programming language into a tolerable UI toolkit and application platform
HTML evolved. The current standards and practices are pretty good. Check out new JS proposals, the language is evolving and becoming better. While you may perceive the combination of HTML/CSS/JS as something horrible, others like it. Check out enyojs at http://enyojs.com for example, it is a great framework for app development that shows the potential for pure web based solutions.
As you said:
> What matters is that, as far as I can tell, the Android platform was designed for efficiency, while the Web platform was not.
And yet, the web runs pretty well inside a browser in Android right? Even with all Android around it, open web apps running in a browser (when built correctly) do pretty great. Now remove Android and just leave the browser. Imagine how much complexity went away. How much CPU cycles and memory you saved if you have nothing but a web runtime.
We all agree that Android is a great platform. As I said, this is not an attack on Android. Firefox OS is a return to simplicity where you have just a web based architecture that is being optimized and refactored into a great mobile platform. We're not picking Desktop Firefox and shoehorning it into a mobile device. Firefox OS is being built for mobile.
You certainly know your tech and so I will leave you with an invitation. Android development is not open, Google releases new versions of Android when it wants to and then you see the source code. Even so, Android is hard to hack. On the other hand, Firefox OS is developed in the open. All source code, including whats is being worked on is live on github.
Better than me sprouting opinions and experiences here is for knowledgeable people such as you to check the code out. See how it is being built and how things work together. Help shape a better platform for everyone. Everyone is encouraged to contribute to Firefox OS. If you think SpiderMonkey (or IonMonkey or OdinMonkey) is slow, help improve it, we could all use some help! :D
As I said, one of the key thinks about Firefox OS is how open it is. Want to try to develop new features? Check out the repo, hack away and if it good enough, talk about a pull request on IRC.
For example, you will notice that we use the Android kernel and parts of Android SDK tools such as adb and fastboot. The cool think about open source is that you can reuse the good bits and not use what you don't want to.
So I invite you to check out the platform. The web may appear badly designed and not build for performance but there are more and more people working on it and it just grows and surprises us. No one believed in JS for gaming until people saw the unreal engine running inside the browser without plugins. JS and its friends will keep improving and cross-plaform open solutions tend to win in the long run.
Allow me to give a different perspective here. While in many other mobile operating systems you can build apps with HTML (saying HTML from now on but meaning HTML/CSS/JS, ok?), the API the vendors make available don't cover the same features as what is native on that platform. We can say that Firefox OS is important because of the following things:
MAKING THE WEB A FIRST CLASS CITIZEN
Makes the web a first class citizen. Its not like "you can build apps with web technology", its more like you don't need native because all you need is available thru the web apis. While in other platforms, there is a barrier on what can be accomplished with HTML alone, on Firefox OS HTML is the way. Let me give you a silly but practical example:
Suppose you have an intranet on your small company built by IT in PHP or something. This intranet has an address book for everyone in the company. Using the Web API, you can detect the contacts API and offer the user the ability to import contacts from the web directly to the phones contact book. This is done in a secure way, with permissions granted by the user, its not like "hey, open this page and flood the contact database". The security model is good. This is a silly example but it is useful for many people. Its the tiny APIs that make your life easier and your experience better.
GIVING YOU THE FREEDOM OF THE WEB
In platforms such as iOS, your only venue to distribute your apps is the iTunes App Store. All money passes thru Apple. On Android, you can have third party stores but the default setting is to allow apps from Google Play only (unless you're a kindle or nook). Most of the other platforms are about controlling the ecosystem to make money for the vendor.
On Firefox OS you have the Firefox Marketplace that is a mixture of Chrome Webstore and Google Play. It allows distribution of apps for desktop, android and firefox os (all using gecko runtime). You are not tied to Firefox Marketplace though. You have an install API that you can use on your app or your site to install apps on the users phone (Again, it asks permissions, security is good). You can even fork the Firefox Marketplace code and build your own.
Talking about payment, you have the usual credit card charging on the marketplace but you also have carrier billing (if the carrier implement it) allowing users to buy apps and have it charged to their prepaid cards or monthly bill. Remember that in many markets, people don't have credit cards. If you're not happy with both solutions you can roll your own payment solution using the payments API and receipt protocol. You are free to distribute and monetize your app as you see fit, just like on the web.
ITS NOT A REPLACEMENT FOR YOUR IPHONE OR GALAXY S3
If you have an Android device, you can just install Firefox Mobile and be happy since we'll eventually have feature parity between Firefox Mobile and Firefox OS. These Firefox OS phones are being created for emergent markets. People from U.S. and richer parts of Europe don't really realize how things are in south america and asia. An Samsung Galaxy S3 will cost USD 1000 in Rio right now while the minimum wage is about USD 350. Buying such expensive phones require a plan and saving for a long time. 78% of the Brazilian market is on feature phones.
By offering an inexpensive handset that has a full smartphone experience with a price that is affordable is key in these markets. It is about bringing the next million people online on the mobile web for the first time. Firefox OS is here to be the first smartphone for people that are still on Symbian or S40. In some markets you can buy a cheap android with decent performance, in others you can't.
Firefox OS offers the best cost-benefit ratio once you think about how much performance you have against your hardware specs. If you pick the same low-end hardware with Android or Firefox OS, Android will have a worse experience, not because Android is broken in any way, Android is great but because there are more things going on on Android than on Firefox OS. Firefox OS is just a tiny hal, gecko and gaia, while Android has a VM and lots of other things going on.
As I said before, this is not about fighting Android, its about offering a new choice for those that can't afford a good Android or iPhone. Here in Brazil, we have some very cheap Android devices since we have Samsung, LG and others building them locally. Most of these devices are pretty crap to use. The same hardware with Firefox OS would be a much better experience.
ITS ABOUT THE WEB API
The objective here is not to sell phones or be dominant. Firefox OS is about preventing vendor lock-in. Right now, each platform is an island. iOS has Objective-C/Cocoa Touch, Android has Java, Windows Phone has something that I can't recall. If you want to build cross platform apps, you're in for a world of hurt. You can use phonegap but this is not something offered by the platform vendor, this something that was built to bridge the web and native.
The Web API is the next step in this direction. Each of the APIs in the collection known as Web API is being standardized with the W3C and other interested parties. The idea is that other vendors adopt these APIs and that open web apps work anywhere equally. Firefox OS is not about an exclusive experience, it is about openness and freedom. Even if Firefox OS fail but the Web API succeeds, it will be a huge victory for the open web.
ITS ALSO ABOUT BEING CREATIVE
Right now there is a steep learning curve regarding developing native apps for most platforms. Objective-C and Java are easy languages for CS people but for the layman they are pretty hard. It requires a lot of effort to be good with them.
Why is the web a success? If the web required such effort, we'd still be using gopher and news. One of the reasons the web was a success was that it required less effort to produce something useful. I am not saying good, I am saying useful. Anyone could host a server, anyone with a text editor could build pages. Firefox OS is about bringing this to mobile. It requires less effort and your open web apps can be deployed on other platforms such as iOS and Android (with phonegap or other runtimes). Yes, these days it requires a lot of effort to build good web apps but not much to build useful ones. Firefox OS has the potential and openness to bring all web developers to mobile with ease. Open Web Apps are king of local content. Niche apps that are only useful for those in a neighborhood or profession are a web editor away from being born and available. The web is king for local content and Firefox OS is nothing but an mobile extension of the web.
WHY I THINK FIREFOX OS WILL SUCCEED?
As I said above, Firefox OS is nothing but the web and the web can't fail because it already succeeded. Right now the only technology that bridges smart tvs, video games, smartphones, desktop and laptop computers together is HTML/CSS/JS.
Remember how much progress we had in JS runtimes the last year, try to imagine where we're going to be next year. Javascript is already reaching 1.5x native speed in some cases, two years from now, this won't matter because it will as fast as it needs to be. One could argue that for most mobile app needs, it is already fast enough.
Apps built for Firefox OS can be deployed as web pages and made available on a server. They can be sold on Chrome webstore and Firefox Marketplace. They can be wrapped with phonegap and deployed to iOS, Android, Windows Phone, BB10, Bada, Tizen and webOS. They can be wrapped in other runtimes and be used on Smart TVs and video games. The web is the king of cross platform, of vendor neutrality and without lock-ins.
I think that the future belong to HTML based solutions and all platforms that embrace it.
PS: I am a Mozilla Rep and a Firefox OS Launch Team member in Brazil.