Este artigo e feito para mostrar os pontos iniciais para qualquer pessoa que deseja aprender mais sobre aplicativos abertos para web, se você e um desenvolvedor ou gerente de projetos, ou tem outro papel relevante no desenvolvimento ou entrega de aplicativos. Aqui nós iremos mostrar a você o caminho, o alto nivel de visão para aplicativos abertos para web e a filosofia que os envolve.
Aplicativos abertos para web são essencialmente sem diferenças entre web sites padrões ou páginas web. Eles são construido usando tecnologias de padrão aberto para web -HTML, CSS, JavaScript, etc. - e pode ser acessados usando um navegador para web. A principal diferença e que suas habilidades podem ser instaladas em um dispositivo e trabalharem de modo offline, e acessarem avançadas APIs que permitem interagir com as caracteristicas de seu dispositivo como a câmera, agenda de contatos, e outras coisas. Além disso, eles são construídos com tecnologias abertas tanto quanto possível. Onde a posição das diferenças na implementação da tecnologia entre plataformas, empenha se em ser feita para permitir que ambos sejam suportadas, atráves da combinação de caracteristicas de detecção e apropriado código para plataformas diferentes, e graciosamento destituída.
Vantagens dos Aplicativos Abertos para Web
Vamos mostrar as vantagens dos Aplicativos Abertos para Web em mais detalhes:
- Instalação local e offline no dispositivo:Aplicativos Abertos para Web podem ser instalados no dispositivo, e influênciar API como localmente no dispositivo e indexado DB para prover a capacidade de armazenamento local de dados. Além disso, tecnologias abertas para Web tendem a ser mais leves do que aplicativos nativos e podem genericamente ser atualizadas em partes em vez de terem que ser instaladas por completo em um novo pacote em toda atualização. (com exceçao para estes pacotes de aplicativos, escolha pedir enquanto um novo pacote está sendo atualizado.) Aplicativos são portanto menos dependentes em sempre estar on line em uma conexão à internet, e mais uteis quando as redes são lentas, irregulares.
- Acesso ao Hardware: Os metadados providos como o Aplicativo Aberto para Web pode ser usado para garantir a aplicação permissão de acesso privilegiado a APIs que habilitam o uso dos recursos dos dispositivos de hardware, algumas coisas na plataforma Web não são tradicionalmente apreciado.
- Quebrando a carteira do jardin: A norma para plataformas mobile tendem a ser carteiras de jardim escrita com tecnologia proprietária, então os aplicativos são bloqueados dentro de suas plataformas. E telefones inteligentes (smartphones) tentem a ser caros, e requerem cartão de crédito para a compras de aplicativos. Aplicativos Abertos para Web tendem a ser habilitados a rodar em hardware mais baratos, especialmente no caso do Sistema operacional Firefox (Firefox OS) dispositivos onde voce tem literalmente apenas Firefox executando no topo de um leve Kernel do Linux. E eles são escritos usando tecnologias abertas da Web, escolha a plataforma mais distributiva. Além disso, o Sistema Operacional Firefox (Firefox OS) possui um sistema de pagamento onde você pode simplesmente fazer o pré-pagamento dos aplicativos, ou adicionar a fatura para sua conta de telefone.
- 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 following video also looks at general advantages of open web apps, and developing for the Firefox OS platform:
The Web is the 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 Facebook and Google Chrome are also working on apps platforms backed by the Web. Facebook apps are meant to hook into Facebook 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.
Therefore, when you read the MDN pages that deal with Open Web Apps, please keep in mind that even though much of the information is specific to Firefox right now, it will hopefully enable you to develop Open Web Apps for all browsers in the future.
Web standards
OWA technology is not a single piece, it is an umbrella that groups many different technologies and some of them are very young. At the moment, parts of OWA are standardized (HTML5, CSS, JavaScript, IndexedDB, etc.). Other parts are not yet standardized and the Mozilla implementation is thus specific to Firefox or to some other Mozilla technology. As the Mozilla mission is to share and to empower everyone, this situation is only temporary. That's why in the OWA docs we will try to clearly identify the parts of OWA that are not yet standardized.
Please also note that there may be some OWA-related proposals and potential standards that are not used by Mozilla.
Intended eventual standards
So here are the parts not standardized yet across the different Web platforms and that still are Firefox-only for the moment:
- OWA manifest for defining an app
- The Complete OWA API for working with apps
- Web APIs to access things like phone, geolocation, etc. Also see arewemobileyet.com for a status report.
- Identity (Persona) to work with user data
- WebPayment API to facilitate in-app payments and app purchases from any Marketplace
- OWA Receipts to verify paid apps on any device and sell apps from any Marketplace
Marketplace
Buy Once, Run Everywhere
From the ground up Mozilla has been building an apps system that lets users buy an app once and run it on all of their HTML5 devices. Very soon Mozilla will launch the first Firefox OS phone but that will be just one device on which to run your apps. When you purchase an app through the Firefox Marketplace, the system installs a receipt on your device. The receipt is a JSON Web Token with metadata that links to the Marketplace’s public key and its verification service URL. When an app starts up it can verify the receipt but the receipt on the device is not tied to the Firefox Marketplace. The receipt is just a cryptographically verifiable proof of purchase. Anyone can sell open Web apps if they follow the receipt specs. When you buy an app, it is intended to be portable across any device that supports the Open Web Apps system.
Mozilla is building the infrastructure needed to run Open Web Apps on any HTML5 device. Firefox for Android will let you install and run apps (you can try it today on the nightly build). Installed app icons go to your home screen just like regular Android apps. You can also install and run Web apps on your Windows, Mac, or Linux desktop using Firefox (this currently works in the nightly build). Currently some version of Firefox is required, but it is intended that the Open Web Apps system will eventually be supported by all major browsers as a set of standards. From day one Mozilla has included all major HTML5 compliant browsers in its proof of concepts; you can take a look at this hosted JavaScript shim for ideas on how to support the apps platform on a non-Firefox browser.
In the future the Open Web Apps system will support syncing your installed apps across devices. Since receipts are portable you could just sync them yourself if you wanted to. In case it’s not obvious, you can always run a free open Web app in any browser because it is no different than a website. It might, however, use new mobile specific web APIs which are not implemented on all platforms.
The video below provides a useful overview of the advantages of open marketplaces and an open web approach to app discovery:
WebPayment API
Commerce For Apps
Part of the success of mobile app platforms like iOS and Android is that they make it very easy to try out new business models through mobile payments. Those models are still evolving but commerce is no doubt something that, at the moment, is awkward on the desktop Web and more natural on mobile. Specifically, it’s very convenient to charge something to your phone bill when you’re already accessing it from your phone anyway. With the launch of Firefox OS, the apps ecosystem will support app purchases and in-app payments through the WebPayment API. Supporting commerce is crucial for the growth of an apps platform. The use of the proposed payment API is completely optional. Mozilla won’t prevent any app from using its own in-app payment system.
See also
- Apps: The Web Is The Platform, by Kumar McMillan (the blog post from which lots of the content of this article is borrowed)
- See the Web platform succeed for applications, by Paul Irish