What is scripting?
Beyond this, scripts increasingly allow developers to create a bridge between the browser and the platform it is running on, making it possible, for example, to create Web pages that incorporate information from the user’s environment, such as current location, address book details, etc.
This additional interactivity makes Web pages behave like a traditional software application. These Web pages are often called Web applications and can be made available either directly in the browser as a Web page, or can be packaged and distributed as Widgets.
What scripting interfaces are available ?
The most basic scripting interface developed at W3C is the DOM, the Document Object Model which allows programs and scripts to dynamically access and update the content, structure and style of documents. DOM specifications form the core of DHTML.
Modifications of the content using the DOM by the user and by scripts trigger events that developers can make use of to build rich user interfaces.
A number of more advanced interfaces are being standardized, for instance:
- XMLHttpRequest makes it possible to load additional content from the Web without loading a new document, a core component of AJAX,
- the Geolocation API makes the user’s current location available to browser-based applications,
- several APIs make the integration of Web applications with the local file system and storage seamless.
WAI ARIA offers mechanisms to ensure that this additional interactivity remains usable independent of devices and disabilities. Additional considerations apply to the development of Web applications for mobile devices.
While scripting offers a great opportunity to develop new interfaces and experiment with new user interactions, over time a number of these additions benefit from a more declarative approach; for instance, instead of having each and every developer re-implement a calendar-interface that allows a user to pick a date, defining an input type (
<input type='date' />) that does it automatically saves a lot of time and bugs, and creates a ground for further innovation.
Beyond the set of declarative interfaces made available through HTML, several technologies have been developed to make these Declarative Web Applications possible.