
An entire Mobile OS built using HTML, CSS and JS - by Mozilla - Mamady
http://mobile.dzone.com/articles/mozillas-web-based-phone?mz=46483-html5
======
ma2rten
I feel like I have just seen the future and it is very bright. This would make
mobile development so much easier and open up a completely new range of
possibilities.

Just imagine ....

\- writing just one app that runs on every desktop and mobile phone out there.

\- apps which update entirely automatically, without any extra line of code,
because they are basically just cached versions of a website.

\- a designer, who just knows CSS & HTML, can make an entirely new GUI for
your phone.

\- an eco-system where the development of the interface (HTML) is completely
separate from the kernel/browser and you can choose which kernels/rendering
engine to run on your phone, independent of the user interface and vice versa.

\- etc. etc.

Kudos to Mozilla for their vision and for not just developing the technology,
but making a good looking prototype to demonstrate it.

However, I am a little bit skeptical that a web-based OS will perform the same
as a native OS, especially in terms of battery consumption. But smartphones
only get more powerful and html rendering engines only faster, so it can only
be a matter of time. Also a little nitpick with respect to the title: the OS
not entirely build using HTML, CSS and JS, it's just the user interface, which
is just small part of the OS (compared to the kernel, etc.).

EDIT: I know most of this is already possible in principle, but the user /
developer experience would be completely different.

~~~
shinratdr
Just imagine...

\- One terrible interface for everything

\- Apps that update to broken versions without asking you and can't be
reverted

\- A web designer, who knows nothing about UI design for an app let alone the
specific UI conventions of each device pumping out apps

\- An ecosystem where it's a complete free for all. That always works out
right?

Yeah I think I'm going to stop imagining now.

~~~
catilac
\- Everything is already one terrible interface for everything. Make a better
interface.

\- The better companies will minimize this. We still depend on cloud services
like Gmail, github et.. on a day to day basis. And they still mess it up
occasionally.

\- There are ready designers who know nothing about UI design for each
particular device pumping out apps.

\- Look at the linux ecosystem. I think its working out.

~~~
shinratdr
* I don't know what programs you're using. I think the iOS interface is great and rife with amazing UIs by both Apple and 3rd party devs that I enjoy using every day. If your devices have terrible UIs that are non-unique, that's your business.

* I rely on those services via clients that beat the hell out of the native web offering. Cloud services are an inbuilt way of life, cloud or web-based apps can go die in a fire as far as I'm concerned. They have two benefits: Developer simplicity and access from anywhere. Everything else is just downsides.

* Of course, but making it easier doesn't help. Just like with all fields, most programmers and software designers are amateur and lazy. IMO making even easier for these people to create terrible apps and making it the cornerstone of a mobile OS is a really bad idea.

* ...You're joking right? I don't even know where to begin with that one, except to look at Linux on the desktop numbers and then come back to me.

------
nooop
"This is now just running the web directly."

This makes absolutely no sense. This is borderline an insult to system
developers -- because system software _is_ what the device is running
directly.

I'm all for people to state a bit of sensationalist statements so they can
sell there shit and be understood by the general public and so over, but this
is going way too far. Being proud of an intrinsically limited product (this is
a linux that runs only one program by design, so this is less capable than an
android or whatever) for the improvements it can brings as side effects is one
thing, but a statement like "this is running the web directly" is misleading
because it will be understood as the real stuff by less knowledgeable people
who will believe in some kind of incredibly innovative magic, like a magical
processor "running the web" or i don't know what idiotic fantasm, instead of
taking the thing for what it is: a system that can do less, with maybe _some_
advantages as a side effects, but of course some inconveniences too.

~~~
eli_gottlieb
>This makes absolutely no sense. This is borderline an insult to system
developers -- because system software is what the device is running directly.

It's ok. We're used to it. From the desktop to the laptop to the netbook to
the phone, Mozilla and Google have been trying to exterminate us for years.

~~~
wickedchicken
> Mozilla and Google have been trying to exterminate us for years.

I highly recommend you take a look at PNaCl: portable LLVM binaries run in the
NaCl sandbox. Since LLVM bitcode can be JITed (or even offline compiled before
execution), you would be looking at optimized code for whichever target you're
running on. Very exciting stuff.

[http://www.chromium.org/nativeclient/pnacl/building-and-
test...](http://www.chromium.org/nativeclient/pnacl/building-and-testing-
portable-native-client)

~~~
eli_gottlieb
Which requires that people use Chrome, running a web-browser to run native
code that gets JITed from bitcode... at that point, why not just pull the
blocks from the Jenga tower and run native code on your processor through an
executable file loaded by an operating system?

~~~
wickedchicken
Because installing software sucks, this is auto-updated by default and will
_always_ be optimized for your processor.

------
mmaunder
This runs a Linux kernel with some components in common with Android like
libusb, so really linux is the operating system and there is a browser running
on top of it.

Lots more info: <https://wiki.mozilla.org/B2G>

~~~
ChuckMcM
Yes, the title is misleading. It should have read "an entire phone user
interface implemented in a browser" which would have been more descriptive.

I love that the mozilla guys have done the legwork of figuring out what APIs
were missing in order to do that. That is a nice piece of work.

~~~
asadotzler
It's more than a user interface though. It's a platform for Web applications
that let those apps reach all the way down to the full capabilities of the
hardware.

~~~
ChuckMcM
Perhaps we share a definition disconnect. Is X11 a platform for a user
interface or is it a OS?

I lean to the former definition but I'll be the first to agree that I come
from an earlier time. When 'windows' came out it really was a user interface
on top of MS/PC-DOS (and it still is IMO) however now several generations of
folks have been brought up saying that Windows was the OS.

~~~
grannyg00se
I don't think recent versions of windows can realistically be thought of as a
UI on top of MS/PC-DOS anymore.

~~~
serge2k
Can any version that was built on NT?

------
awolf
There are a lot of "looks promising" comments here. Am I the only one who
thinks this does NOT look promising?

Aside from games, rendering a markup language is one the most taxing things we
do on our mobile devices. When I get handed a new phone to play with, the
first thing I do is load a non-mobile optimized website and see how it
scrolls. This worst-case scenario is a good indicator for how laggy and
jittery a mobile OS will be at sporadic times throughout the day.

Now a mobile OS built entirely on the worst-case of rendering HTML, CSS, and
JS for every interaction? Sure, devices will keep getting faster as time goes
on. But keep in mind that as device performance over the years increases, so
do our expectations. I am skeptical that this will ever deliver a sufficient
user experience when compared side by side to other mobile OSes.

~~~
asadotzler
And that's why we all still use Outlook instead of Gmail and Encarta Atlas
instead of Google Maps, right?

~~~
corford
I use and prefer Thunderbird over Gmail. Same for Google Earth versus
maps.google.com ...

------
nextparadigms
"You can run on less expensive hardware, because you've got less technology
going on under the covers. You don't have to pay the penalty of a big smart
phone operating system if you're running directly on the web."

That's misleading. Sure, you might need fewer resources to pull something like
a simple web page. But try using web apps that are the equivalent of native
apps on Android or iOS, and you'll need a lot better hardware to run those
just as well.

~~~
sp332
I think they mean that the _minimum_ hardware requirements just got a lot
smaller.

~~~
mbel
Could you explain why? I might be looking at it a bit too naively, but how
system build for running interpreted JavaScript apps can perform better than
one designed for compiled ones?

~~~
sp332
It doesn't perform better. But at the _low_ end, you don't need to bootstrap a
java VM (like Android) just to check your email and browse the web etc. You
can do the little things on less hardware.

~~~
tjoff
No, but you have to bring along a whole browser just to interpret code that
checks the mail...

Anyway you spin it the _low_ end that can't manage android will never in a
million years be able to run an "OS" in javascript. There is a reason they
demo it on a SGSII ;)

~~~
Trezoid
They had another device running it which really was much worse then the SGSII,
but with a much smaller screen it doesn't make for great video.

------
mhd
Boy, the video's constant use of " _the_ web" really annoyed me. I know that
you have to cut down the jargon to make it presentable, and "HTML, CSS and JS"
gets a bit confusing. What about "web technologies" or even just "a browser"?

Also: _"You can run on less expensive hardware, because you've got less
technology going on under the covers."_

You can't really call a full HTML5 stack light-weight. Sure, you save some
libraries, but that's mostly a space issue. I sincerely doubt that a JS-based
"Angry Birds" would use fewer resources than a native app.

Having said that, I'm really looking forward to this. Hope there's a way to
get it on older Android phones soon, my Nexus One is waiting for new life…

~~~
TazeTSchnitzel
HTML5, or perhaps better termed "emerging web technologies" are an incredibly
heavy stack. You have 3 different means of markup being parsed from the get-
go: HTML/SGML, XML and JSON. HTML is a quite lightweight component, OK. But
then you get CSS. CSS used to be simple, but it's getting incredibly complex
with tons of new standardised features and vendor prefixes. Initially it just
drew lines and boxes in colour with text, positioned correctly on the page
according to a few simple positioning systems. Now it draws coloured boxes and
lines with 3d transformations, animated, with alpha transparency, a drop
shadow and rounded corners, at the same time as rendering text, and
positioning them correctly on the page using several different layout systems.
Then, there's the image formats commonly supported. PNG, JPEG, GIF, and ICO
(Windows, favicons). SVG, a fully-featured vector graphics format which also
uses CSS, as well as having its own, different animation system, and its own
scripting system! Then we have common audio and video formats. MP3, WAV, OGG,
MP4/H264 and WEBM. As well as the subtitle formats. Oh yeah, MathML parsing is
in there somewhere too.

And then we have Javascript, a simple, not terribly complex language. OK. But
we also have tons of APIs for it. The Document Object Model API. The
XMLHttpRequest API. The Canvas API - a complete 2d rendering context AND full
OpenGL ES 2.0. WebSockets. Local storage and session storage. IndexedDB. Game
controller API. Page visibility API. Audio composition API (forgot proper
name). Touch events. BlobBuilder. Geolocation. History API.

Just to name a bit of it.

~~~
cageface
Any serious candidate for an operating system is going to be complex.
Personally I'm a little dismayed at current efforts to turn the browser into
yet another cross-platform utopia. Some things will always be better native
and pushing all this junk into the web browser just gets in the way of making
basic things like a sane layout model that much more difficult.

~~~
johnrob
Then just stick with the DOM and XHR APIs. Those alone have been consistently
crushing most desktop applications since ~2003.

~~~
grannyg00se
Wow. Can you clarify? Are you saying something like Google docs is crushing
Microsoft Office? What DOM/XHR app is crushing photoshop?

I think there is a new class of "apps" that are emerging as web based, but
they are creating a new segment as opposed to crushing an existing one.

~~~
sp332
First, JS & HTML are much more popular than Windows APIs. Second, I think
johnrob meant that the DOM is more sane than most "desktop" APIs for laying
out apps, not desktop publishing layouts.

------
suprgeek
This is a really promising direction to take for Mobile Apps. If I can write
amazing HTML5+JavaScript apps for the Mobile then the logical extension to
this is to write the Uber-app "Phone OS" using these technologies as well.
Lets get this working on at least the Dual & Quad core beasts first and worry
about the lesser-hardware ones as B2G evolves

Good work Mozilla and keep Pushing the "Open Web". A walled garden despite its
many advantages, is still a Gilded Prison for some.

------
JVIDEL
Regardless of how it is, it's too late: Android is the new Windows, iOS the
new System7, and everything else is the equivalent of AmigaOS, OS/2, BeOS,
etc...

About ease of development being a gateway to shovelware, yeah right as if the
artificially high and expensive barrier to iOS is keeping all the fart apps
away. The fact is if there's money to be made then everyone will try to get
in, even the wantrepreneurs hiring cheap coders to copy some old game and
repackage it as something new (for more information check Harvest Moon).

If Android has more freemium shovelware is simply because it became the
dominant OS in that industry, so wantrepreneurs are targeting that market
instead, same as it happened with Windows and MacOS.

------
EastCoastLA
Looks like with Enyo, the JavaScript app framework, and leveraging this new
Boot2Gecko, smartphone hardware will become the focus rather the phone OS.

~~~
Osiris
As I was watching the video I was thinking the same thing that WebOS has been
out for years. I'm sure the underlying technology and framework is quite
different from Mozilla, but it's not a ground-breaking idea.

Perhaps they should take the opportunity to work on the newly open sources
WebOS which is likely to be able to grab more market share than an entirely
new Gecko OS.

~~~
asadotzler
WebOS uses JS+HTML but it does not expose nor advance standards-based APIs for
all the phone hardware capabilities like B2G. Also, WebOS requires you use
their framework where B2G lets you use any frameworks or no frameworks -- it's
really just like the real Web plus a bunch of DOM APIs for things like the
phone's telephony stack and vibrator and accelerometer and all that.

------
darklajid
Just looking at that demo makes me want to install it. I wouldn't mind running
a unstable version if _basic_ stuff would work (i.e. - calling).

Unfortunately I own this Tegra2 based POS thing and I'm quite positive that
I'll never see even a glimpse of the B2G experience on this device.

Still, this is remarkably close to the WebOS approach and - I like the idea
very much.

------
israelpasos
This definitely blurs the line between calling an app native or web based, at
least from a business-marketing standpoint. However, far more interesting is
to see the waves of innovation that APIs have created. APIs are becoming the
personality of computer systems in the sense that they allow interaction and
shielding from the outside world. As long as developers know how to interact
with a system's personality they can now build just about anything.
Furthermore, experience is becoming the new IP so I believe that such
technologies will bring more and more experience innovation by providing
easier and faster paths for high-level programmers to contribute to the
ecosystem.

------
knowtheory
So, I noticed there was no mention of multi-touch events in the video, and
none of the apps demonstrated used multi-touch. I did some digging to see
whether this was a gap or whether mozilla had been working on multi-touch in
browser (since the consequences of such a change for JS APIs are interesting
to consider).

Mozilla has apparently been working on multi-touch in browser as one can see
in these two links:

<http://hacks.mozilla.org/2009/08/multi-touch-firefox/>

<http://hacks.mozilla.org/2009/10/multi-touch/>

~~~
hammersend
It is possible they see their OS as being suited for one-handed devices. One
of the things I do not like about Ice Cream Sandwich on my Galaxy Nexus is
Google has removed the "+"/"-" buttons in most of their native apps so now I
have to either use some really unwieldy one-handed finger contortions or use
two hands to zoom in and out. I think an argument can be made that in many
instances at least on a smart phone as opposed to a tablet multi-touch while
being fun to use is actually a step backwards in usability.

~~~
Raphael
Did you try double tap to zoom?

~~~
hammersend
Yes. You can't zoom out that way though.

------
jay_kyburz
The reason I'm excited about this that I won't need to wait for the carriers
to update my UI. I imagine there will be a whole rage of interesting 3rd party
interfaces I'll be able to browse and download.

Want and interface that's just command line. Somebody will make it.

What about an interface for Grandma that just has really big fonts in just a
dialer, contacts and photo album.

I feel like I got burnt when I bought my 7" Samsung Tablet because Samsung is
not supporting it anymore and it has some really clunky interfaces.

I would love to see and ecosystem where I have full and easy control to
install and remove apps from my phone easily. Fingers crossed.

------
j45
So, this is WebOS, over again?

What is different about this other than Mozilla making it?

Appreciate any insights.

------
Random_Person
Is everything cached to the device? What are my limitations in "airplane
mode"?

I don't mind the concept of making cross-platform apps. My limited knowledge
of HTML/CSS has shown me that while it is extemely difficult to make robust
content look good across multiple browsers/platforms, it IS possible... but
will developers really have the access to multiple platforms to test their UI
on?

------
lukejacksonn
This is awesome.. and it is the way forward if every device can just run a
browser then what is the need for an OS, you can port anything straight to the
browser.

With the likes of HTML5, jQuery, WebGL, AWS everyone could be making their own
OS on the web.

It is really not that hard or revolutionary it's just using existing services
effectively.. Let's carry on this way.

+rep for mozilla (gone up in my estimates)

------
johnrob
I love the mentality behind this effort. More stuff can and should be done in
the browser on mobile devices. For this to succeed, the most important problem
is not exposing mobile hardware (camera, gps, etc) - it's user input. The
cornerstone of the web is typing a url into the address bar, and typing is
still a miserable experience on phones. Clicking links on touchscreens isn't
exactly stellar either (hence the new verb 'fat-fingering'). If someone can
solve these problems, the browser stack is already powerful enough to do to
phones what it already did to the desktop.

~~~
projct
FYI, 'fat-fingering' or 'fat-fingered' isn't really that new and I've more
often heard it used in regard to keyboards on computers.

<http://www.urbandictionary.com/define.php?term=fat%20finger> has a definition
from 2005 but I think I had heard it as early as 1997.

------
veeti
The user interface doesn't look very smooth. It doesn't matter how good the UI
looks (and it does look good) if it doesn't feel right.

~~~
Trezoid
It's improved significantly since that video.

~~~
damncabbage
Interesting. Do you have a video or link?

~~~
Trezoid
No, unfortunately. Most of the videos going around (read: all of them) are
from MWC where B2G was demoed.

The development group is VERY active on IRC and there was some chatter at the
time about that. Some of the slight lags in the demo were actually parts of
the CSS transition they use (originally intended to avoid accidental swipes
when they wanted taps) and was tweeked to be much better not long afterwards.

More recently there have been significant improvements in the actual CSS
animation on the gecko side (improvements which will hit firefox in the
future) which means everything feels even faster and more natural.

At this point B2G is making significant progress _every day_ so about the only
real way to get an up to date idea of how it runs is to either read the github
commit log frequently or put it on a device (and currently that means a GSII)

------
NHQ
He is right about one thing: every device should be able to download and run
html apps natively.

------
yaix
That would be awesome if it actually became a mainstream mobile OS.

Otoh, what about security here? Having JS from a web site dial the phone or
taking pics? How will they make sure that lazy I-don't-read-popups-but-just-
click-okay users will not get pwned?

~~~
chime
Dialing the phone and taking a picture work no differently than they currently
do on iOS/Android - your app simply calls the device's native functions and
then the OS takes over the operation. And once the operation is
complete/cancelled, focus can return to your app if you set the proper
callbacks.

Potential security concerns would be akin to the Chrome-extension snoop and
inject issue where a random app or web-page could potentially try to
read/write the data of other apps if the security model isn't setup right. But
these are problems fixable in the short-term. On the plus side, as the phone
owner, I might be able to redesign the OS dialer by changing some CSS and
finally have a phone pad that goes 7-8-9/4-5-6/1-2-3 like a num-pad instead of
1-2-3/4-5-6/7-8-9.

------
hughw
We already have a lot of miles on ChromeOS. Why isn't it more popular? Is
there anything fundamentally inferior about a device that is all web browser?
Will B2G have the same barriers?

------
dannyr
Google is laying the groundwork for this as well. Chrome is slowly making its
way into Android & my guess is that Chrome Apps are going to be next.

------
Qweef
Pretty cool. This is like a spiritual successor to WebOS, which was awesome
btw.

Though, WebOS didn't take the API idea nearly this far.

------
kellenfujimoto
I like how that video in the "HTML5 zone" was using a flash player...the irony
was amusing.

------
mpg33
Would this not dramatically increase data usage? ie data fees to carriers

~~~
stasm
It's 'the Web', i.e. a set of HTML pages with some CSS and JS, with access to
a few newly developed APIs, like the one for dialing the phone, but running
locally on the device, not remotely.

~~~
jpravetz
Does anyone know how the sandboxing works to allow a camera, gallery and
dropbox app to access the same locally stored image files? Or for local
contacts to be shared?

~~~
Trezoid
A media API is being developed (in co-operation with the W3C) to allow exactly
that.

Further, apps will be able to request "trusted app" status to run with less
cross domain restrictions.

------
aritraghosh007
Its just like what ChromeOS did to the Desktop/Laptop world.

------
melvinng
Mozilla should skip working with the carrier just go to the phone
manufacturers and develop their own phone. Once they have their own phone it's
only an matter of time before carrier jump on board with them.

Imagine the $50 smartphone!!

------
dfc
Who decided to market this as an _operating system_?

------
wavephorm
This is actually a battle cry for Mozilla. The desktop GUI paradigm is done
for, it's at the end of the line. Once desktops die off in popularity there
will be no growth for web browsers like Firefox unless they own the whole
stack like Apple and Google have successfully done, and Microsoft and RIM are
attempting to do. Mozilla is developing Boot2Gecko because without expanding
into a full mobile platform Mozilla is in a really tough spot in the
smartphone/tablet markets. Predictions for the future put Apple/Safari at 45%
marketshare, Google/Android at 54% marketshare, and the 1% scraps left over
for RIM, Microsoft and now Mozilla.

Mozilla will to have sell an awful lot of these phones for their organization
to be viable in the future.

~~~
eli_gottlieb
I'm sorry, desktop GUI applications are _done for_.

Someone please notify _my entire computer setup_ of its impending death. Also,
my wife, my mother, my brother, my stepfather, my father, and _everyone else I
know_.

Hey, everyone, your computers are dead! It's time to convert to
WebSmartiPhonePadTablets running nothing but web-browsers! Sure, you don't
want to because they run like crap compared to _actually writing native
programs_ , but they're a growth market for corporate behemoths!

~~~
wavephorm
Ah yeah I should have expected such pedantry on HackerNews. You know very well
I didn't mean you were going to stop using Windows immediately. I said nothing
of the sort. You didn't even have the respect to read anything else I said or
even acknowledge that I said anything else. Instead you pointlessly nitpicked
at a generalization and added nothing to this thread.

------
rsanchez1
"This browser-based OS will revolutionize how users interact with their apps
and how developers write their apps, allowing everyone to take their apps
everywhere." -Jon Rubinstein, January 2009, commenting on webOS

(not a direct quotation)

------
Radzell
Didn't they try this with HP web OS. That failed I wouldn't put money on this.

~~~
MitziMoto
I had the original Palm Pre with WebOS. The OS itself was actually top notch.
I absolutely loved it. I believe it failed because Palm just didn't have
enough weight behind it (like Google or Apple have) to make it reach critical
mass.

That said, this isn't the same as WebOS. WebOS ran javascript apps, but they
ran on the device itself. From what I can gather, B2G is running everything on
the actual web. It's very different.

\--

Edit: I may have been wrong there. Apparently it is running locally. This
quote from the web page through me off:

"You don't have to pay the penalty of a big smart phone operating system if
you're running directly on the web"

That's a bit misleading.

~~~
asadotzler
B2G runs apps from the web and locally cached for offline use. B2G apps are
not required to use some non-standard library to get at the phone hardware
like WebOS did. APIs for camera and telephony and vibrator and accelerometer
and all that in B2G are proper DOM APIs that will be web standards.

------
geoffroy
looks promising!

------
andyzaharia
As a prototype this is cool, as a daily use phone, it kind of sucks.
Scroll/swipe latency, anyone ? P.s iOS user here...

