Open Web Apps are essentially no different than standard
websites or Web pages. They are built using standard open Web technologies —
HTML, CSS, JavaScript, etc. — and can be accessed using a Web browser. The main
differences lie in their ability to be installed on a device and work offline,
and access to advanced APIs that allow interaction with device features such as
the camera, address book, and other such things. In addition, they are built on
open technologies as much as is possible.
Advantages of Open Web Apps
Local installation and offline storage: Open Web Apps can be installed on the device, and
leverage APIs such as local storage and IndexedDB to provide local data
storage capabilities. In addition, open Web technologies tend to have a much
smaller footprint than native apps and can generally be updated atomically
rather than having to install a complete new package each time there's an
update. (An exception to this is packages apps, which require a whole new
package when updating.) Apps are therefore less dependent on an always-on Web
connection and more useful when networks are patchy.
Hardware access: The metadata provided with Open Web Apps can be used to grant the
application permission to privileged APIs that enable usage of device hardware
features, something the Web platform has not traditionally enjoyed.
Breaking the walled gardens: The norm for mobile platforms tends to be walled
gardens written with proprietary technologies, so apps are locked inside their
platforms. And smartphone tend to be expensive, and require credit cards for
app purchases. Open Web Apps tend to be able to run on much cheaper hardware,
especially in the case of Firefox OS devices where you've literally just got
Firefox running on top of a lightweight Linux kernel. And they are written
using open Web technologies, which is the most distributed platform around. In
addition, Firefox OS devices feature payment systems where you can simply
prepay for apps, or add the cost to your phone bill.
Open Web App stores: Following on from the previous point, you can choose to host your apps in
an existing marketplace (such as the Firefox Marketplace), or host them
somewhere else entirely. It's up to you. Mozilla aims to put the developer back
in control of every aspect of the app experience — from easy development to
distribution to direct customer relationship management. And the apps can be
searched for just like any other Web-based experience.
The Web is platform
An open
web app as it exists as installed on a platform like Firefox OS is not a
bookmark — it’s a proper part of the system. Open Web Apps hold that great
promise. They are an opportunity that we should not miss; otherwise the Web
might become fragmented once more. With this in mind it should be made clear
that Open Web Apps (OWA in short) are intended to be standardized and to become
part of "the Web". If successful, OWA should eventually work on all
browsers, operating systems and devices.
At
Mozilla we are working hard to create this apps platform that is backed
entirely by the open Web. It’s not intended to be a “Mozilla platform” or a
“Firefox platform”. The Web is the platform. We’re creating a
set of open APIs and implementations to show how portable apps can exist on the
Web without vendor lock-in. Other groups like Face book and Google Chrome are
also working on apps platforms backed by the Web. Face book apps are meant to hook into Face book and Chrome apps are designed for Chrome OS devices and
Google servers. Chrome apps are the most similar to Open Web Apps. We continue
to collaborate with the Google Chrome team as app standards evolve and we
definitely share a lot of the same vision. There is tremendous potential for
all Web based app platforms to converge and we invite all vendors to help us
build the right Open Web App APIs.
Even
though currently you must have a Mozilla Firefox-based engine ("Web
runtime") to use Open Web Apps, it is not intended that this always will
be the case. Many parts of the Open Web Apps project are still being worked out
and it isn't possible to implement everything in all browsers at once. Although
many parts of Open Web Apps are already standardized, many other parts are still
in flux. It is intended and hoped that Open Web Apps will be a standard
capability that is available in all major browsers.
App Tools
App validator
Is your app ready for the Firefox Marketplace? The App
validator will check your manifest and show you any errors it may
have, or warnings you should consider.
Firefox OS simulator
Installing and using the Firefox OS Simulator is the
easiest way to get up and running with your app. After installed the simulator
is accessible via the Tools -> Web Developer -> Firefox OS Simulator
menu. The simulator launches with a JavaScript console so that you may debug
your application from within the simulator!
App manager
The new kid on the block with regards to testing tools is
called the App Manager. This tool
allows you to connect desktop Firefox to a compatible device via USB (or a
Firefox OS simulator), push apps straight to the device, validate apps, and
debug them as they run on the device.
Firefox developer tools
Firefox now ships with a default set of developer tools built
from the ground up to ensure a great development experience that is both snappy
and efficient. To find out more about how these tools work, and see a detailed
list of what else Mozilla has to offer, head on over to our Tools
zone.
App publishing
options
The Firefox Marketplace is our
own dedicated app store for distributing free and paid apps. Submitting an app to the
Firefox Marketplace is a simple process, involving uploading the app itself
plus surrounding information, and waiting for it to go through our thorough
review process to make sure it is high quality and not malicious. Submitting to
the Firefox Marketplace also confers other advantages such as increased
publicity, no need to implement special APIs on your own web site, and the
possibility of publishing paid apps more easily. You can submit both hosted
apps and packaged apps to the Firefox Marketplace.
Hosted apps
A hosted
app is basically an app hosted on a web server just like a regular web page. If
you want to let people install a hosted app straight from the site, you must implement
some JavaScript code on your Web site to manage installing and updating your
app into users' browsers, and make sure your app code includes a valid manifest
file. Please see our write-ups of manifest files and Install API functionality for how simple
these steps are to implement.
Where
you host the app is really up to you, but the two options listed below are
probably the most common and easiest
GitHub - If the Web app is purely static
(HTML/CSS/JavaScript, but no server-side processing), GitHub Pages is a
solid hosting option. It will serve your manifest with the correct MIME type if you give it a .webapp extension.
Generic hosting
solutions - For dynamic websites, use
a generic hosting option (like a Web server you may already own or have access
to) with the right capabilities or a hosting provider specifically tailored to
the needs of your app, like Heroku or Google App Engine.
Packaged apps
A
packaged app is an Open Web App that has all of its resources (HTML, CSS,
JavaScript, app manifest and so on) contained in a zip file, instead of having
its resources on a Web server. A packaged app is simply a zip file with the app manifest in its root directory. The manifest
must be named manifest.webapp. One difference from a hosted app is that a packaged app
must specify a launch_path in the manifest, whereas it's an optional manifest field
for a hosted app.
Self publishing apps
You can
also choose to self-publish apps. For hosted apps, this just involves putting
them up on web hosting, as detailed above. You can self-publish a packaged app
by hosting it on a server along with a mini-manifest in the same directory that
identifies the app and is used in the install process.