While Web sites are now familiar to developers and consumers alike, widgets and Web apps are relatively new technologies, and these terms are often confused or used interchangeably. This topic clarifies the usage of these terms in this library. We hope that this distinction will come into general use beyond the scope of Nokia browsers.
Web sites require a server, a user agent (Web browser), and one or more HTML files. In addition, image, CSS, and JavaScript files are often included. The user agent makes a request to the server specifying a URI, and the server sends back the corresponding HTML page. Every time the user clicks on a link, a new request is made to the server and a new page is served. An HTML page might refer to other content such as images, CSS files, and so on.
Web applications, known as “Web apps”, look and behave like native applications, but are developed using Web standards and technologies like HTML, CSS, and JavaScript. Unlike Web sites, Web apps can change their page layout and content using JavaScript.
Instead of making a request to a remote server for a new page, a Web app can change the content of the page based on information it already has. Alternatively, the Web app could request only the small portion of data that it needs from the server. This behavior requires a different design; in many cases the entire navigation is managed by JavaScript. As a result, the URL might never change and pressing the back button of your browser might not take you to the previous view. When well designed, Web apps are more efficient than standard Web sites.
Web apps can take advantage of local storage. When possible, most of the needed files are present locally. The W3C, Symbian Web Runtime, and others traditionally referred to this type of Web app as a widget. However, the industry trend is now moving away from making this distinction and toward calling this special case a Web app also.
In addition to the Web standards that developers and designers have used for years, several new APIs are being developed to access device data. For example, new APIs enable data to be stored for a single session or permanently. Other APIs enable devices to provide their geolocation, which is then used in Web apps. This adds substantial functionality to make Web pages behave a lot more like native applications.
A widget is a type of Web application in which the HTML, CSS and Javascript files are packaged and installed locally on the device instead of being hosted on a remote server. Of course, the widget can request additional information from the Internet. Widgets usually have a file descriptor or manifest that tells the device which HTML file to launch first. The manifest may also contain information about the author, the source of the widget, and security and authentication information.
There are several different standards for defining a manifest and for packaging a widget. Nokia launched the Web Runtime (WRT) many years ago. Later, the W3C defined its own packaging standard, Widget Packaging and Configuration, that is very similar to Nokia’s WRT.
Widget engines normally expose a set of extra APIs to access device details. Examples are Nokia’s WRT and WAC applications (based on W3C’s Widget Packaging and Configuration recommendation).
The industry trend is currently moving toward referring to widgets as Web apps, removing the distinction of this special case