从技术上来说什么是Open Web App?
An Open Web App is much more than an HTML application. Think of "Open Web Apps" as Web-standards-built applications or "Web Run Time" (WebRT) applications.
A WebRT application runs outside a normal browser and can be launched from the desktop (or device equivalent) on any of the popular internet-connected devices. Of course, WebRT applications can be run inside the browser too if the user prefers.
Although HTML5 is an evolution of the HTML syntax specification, in practice it is a wave of new or enhanced technologies.
For an Open Web App, you can use:
- HTML5 as the declarative syntax to define the structure of the application's user interface.
- CSS3 as the declarative syntax to define layout, visual aesthetics and portions of the UI behavior. Using CSS3, you can custom-tailor the visual experience to any device that needs a specific presentation without having to re-implement structure or programmatic logic.
- New technologies that are part of the HTML5 wave if not the HTML5 markup specification such as AppCache, WebStorage, WebSockets, WebWorkers, Server-Sent Events, Crypto API, etc.
When appropriate, you can augment WebRT applications with server-side logic, for use when the user's device is in a connected state. Though WebRT applications can run whether or not they can connect to the worldwide Web, you can offer an enhanced experience when connected. You can choose any server-side platform and technology that you like, since the application and the server communicate over HTTP/S using standard mechanisms such as JSON and XML.
In practice, there is usually a great deal more that needs to be done. For more information, see App development for Web developers.
An app can:
- Run outside a normal browser
- Run whether the device is connected to the Internet or not
- Be launched in the same native way any device application is launched
At a minimum, an app is a website that can be "installed" on a mobile device or computer so that it looks to a user like a native application. You can distribute it either on your own website or through an app store. Both can be built using open Web standards such as HTML5. You can control access to a Web app, so that only paid users can access it.
A site that is an app should be designed to work (or at least fail gracefully) when the device is not on the Internet. Building HTML5 WebRT applications (as opposed to building sites that will always be visited in a connected browser) requires some architectural additions to handle "sometimes connected" state, etc.
Building HTML5 sites (instead of apps) tends to focus especially on implementing page structure using the new HTML5 semantics.
Note that HTML5 apps versus sites is not an either-or proposition. You can build HTML5 "applications" that can run either inside a browser or outside it, and you can design them to provide an enhanced user experience when the user's device is connected to the Internet.
Add-ons are extensions to your Firefox browser, which provide specific capabilities to the browser itself. Apps are applications produced on and delivered through the Web. Apps are complete applications such as office applications, productivity applications, image processing applications, games, etc. Apps run in any modern Web browser (both on desktop as well as mobile).
我应该用什么工具来建立Open Web Apps?
Use the same tool set you would choose for Web development on your platform of choice. Most "current" editors and IDEs for Web development support HTML5 syntax.
Hows does an Open Web App work across platforms? Form factors?
If you wish to provide the richest possible experience, you can also write code to detect the presence of "optional devices" like a camera, and leverage them as appropriate for the application.
One way to detect that an app is running in the Web runtime is to check the
window.locationbar.visible property. If the app is in the Web runtime,
window.locationbar.visible will be false.