topical media & game development

talk show tell print

object-oriented programming

Programming the Web -- a search for APIs

subsections:


Leaving the Object Web for what it is, in construction obviously, we may raise the question as to what support should be provided for developing Web applications that are more finely tuned to the needs of end-users. To answer this question, or more appropriately, to gain insight into the requirements and state-of-the-art technology that was available, I organized a series of two workshops, one for the WWW5 Conference, entitled `Programming the Web -- a search for APIs', and one for the WWW6 Conference, entitled `Logic Programming and the Web'.

In this section we will discuss some of the issues treated in these workshops. In particular, we will reflect on the computation model underlying the Web, taking the views of Luca Cardelli presented at the WWW5 workshop as a starting point, to establish general requirements for APIs for programming the Web. Then we will look at another interesting phenomenon, intelligent agents on the Web, and discuss what would constitute a suitable framework for agent technology.

Models of computation

The Programming the Web workshop was intended to focus on concepts and requirements for high-level APIs suitable for developing Web-aware applications. The papers that were submitted, which are available on the CDROM accompanying this book, covered a wide range of interests, including computation models, applications and user requirements, software architectures and libraries, as well as heuristics and guidelines for API developers.


Complaints


Observations
Requirements
Behavior
Answers
slide: Requirements for APIs

The kickoff for the workshop was given by Luca Cardelli, who raised the question `What is the Web's model of computation?'. This question appeared to be of critical importance for understanding the requirements for APIs and for evaluating possible solutions. In summary, we may observe that there is some notion of global computation for the Web, but that computation on the Web is fraught with many obstacles, such as the lack of referential integrity (e.g. dead links), unreliable services (both in availability and quality), failures (due to servers or network congestion). What we need, in conclusion, is some (formal) model of computation that captures these properties. In addition, we need to be able to deal with such properties in our Web programs, for example we may wish to anticipate on the possible unavailability of a Web server, and provide an alternative in that case.

In slide api-requirements, an overview is given of the complaints about the functionality of the Web, observations concerning its `nature', general requirements for open systems development, a wish-list of desired behavioral characteristics and potential (technological) answers.



Actions


Perspectives


Interests


slide: Dimensions of APIs

Not surprisingly, there did not seem to be a canonical approach to the definition and development of APIs and Web applications, perhaps not in the last place because the demarcation between computation models, languages and APIs is not clear-cut.

Nevertheless, as summarized in slide api, it seemed clear that we need to define a suitable computation model as well as (abstract) object models that capture the requirements for resources and application domains (such as for example e-commerce). In addition we must distinguish between client and server perspectives, with autonomous (intelligent) agents as a possible third perspective. And, naturally, our own (technological) interests play a role as well, to the extent that it may determine possible solutions.

Considering the basic needs for the development of Web-aware applications, as expressed by the workshop's participants, which ranged over resolving URLs, billing and payment facilities, and quality of service constraints, we may observe that facilities for Web programming are nowadays as a standard provided (as extensions) by languages such as Tcl, Perl, Python and Java. More domain-specific facilities are being developed in a CORBA context, or for frameworks such as San Francisco.

Document Object Model

Client-side scripting has been popularized by Dynamic HTML (DHTML) as originally introduced by Netscape and Microsoft. Nevertheless, scripting facilities are not standard accross the various browsers. To remedy this situation, the W3C has developed a recommendation for a Document Object Model (DOM), that provides a standard application programmer interface to access the structure and content of HTML and XML Web pages. The DOM allows XML and HTML pages to be treated in an object-oriented way, providing facilities for access, navigation and manipulation.

slide: Hierarchical structure of DOM

Since XML is increasingly being used for other applications, such as Electronic Data Interchange (EDI), the DOM may in effect provide a foundation for developing Web applications.

The W3C DOM Recommendation provides interfaces, described in a language and platform-independent way in IDL, for the structural components that may be used in XML and HTML documents, as indicated in slide dom-structure. These interfaces have been refined independently for both XML and HTML, to allow programmers to access XML and HTML-specific features. In addition to the IDL interfaces, a language-binding is specified for ECMAscript, which may serve as an example for similar bindings for Javascript and other languages, such as Java.

Intelligent agents

In  [Negro], intelligent agents are characterized as autonomous, intelligent processes aiding the user in complex tasks, such as answering email, gathering information and planning activities. In practice, agents on the Internet may help in monitoring changes in Web pages, collecting information on topics of interest, or searching based on personal preferences. See [_Agents],  [Search]. Other types of agents, such as the shopping agents described in  [Mobile] or even virtual players as those described in  [VR], might become possible in the future. However, despite the range of possible examples, the notion of intelligent agent is not very clear.

In  [Survey], two definitions of agent are given, a soft definition, characterizing agents as autonomous processes that show some intelligence, and a hard definition attributing agents with mentalistic properties such as belief, desire and intentions. At this stage, the hard definition is clearly no more than a metaphor, since there is no technology that actually supports it. Taking the soft definition, one could argue that it is (partly) realized by modern object technology, as embodied in Java and CORBA, omitting the intelligence that is.

Whether or not adopting the agent metaphor, there is definitely a challenge of making applications more intelligent, and perhaps even more human. Cf.  [WebWord] and  [Maes]. To my mind, one fundamental problem that we must solve to realize this goal is to define the technology, or the combination of technologies, needed to support the anthropomorphic metaphor of agents.

Given the merits of logic programming in a variety of application areas, encompassing areas such as diagnostic expert systems, natural language processing, and control systems, it seemed natural to organize a workshop called Logic Programming and the Web to investigate how logic programming technology might be deployed to make the Web more intelligent. Nevertheless, although the presentations at the workshop indicated that logic programming could fruitfully be applied in for example the creation of virtual worlds, e-commerce applications, and intelligent rental advisors, it did not shed any light on how to bridge the gap between the (mentalistic) agent metaphor and its software realization.

In the remainder of this section we will discuss the Web Agent Support Program research project to delineate the requirements for a framework providing agent technology support for Web applications.

Web Agent Support Program

The WASP project, of which an outline is given in  [WASP], concerns the development of Web Agent Support to enable average users to keep track of relevant information on the Web.

The project was envisaged to result in a framework providing support for:

  • intelligent navigation and information retrieval,
  • information and document maintenance,
  • user interfaces for Web-aware applications,
  • dynamic documents with user-defined applets,
  • declarative descriptions of agent behavior based on user preferences,
  • declarative modeling of coordinated and cooperative behavior of software agents, and
  • programming single and multi-agent systems.
As an target product for the WASP project, we envisaged developing Pamela (Personal Assistant for Maintaining Electronic Archives), an application combining the functional and architectural features mentioned above.

In summary, our project aims at providing insight in and solutions for

  • modeling the behavior of cooperating agents,
  • generic means for realizing actual agents in a Web-aware context,
  • architectural support for programming agent-based systems.
The aspects of our research as indicated above address the problems involved in defining and realizing the potential of the agent metaphor as a human--computer interface in the distributed information system domain, in particular the Web.

The architectural requirements for realizing agents in a Web-aware context consist of (a) high-level support for distribution to allow for notification and the communication between agents, (b) access to the Web both in terms of server-side and client-side computation, and (c) support for information retrieval and data management.


Framework components

Web-aware agents


  • a methodology for developing agent-based applications, as well as
  • a logical foundation for modeling agent behavior; and in addition
  • guidelines for realizing actual agent applications, and
  • software components that can be used as building blocks, including
  • a language for programming agent behavior.

slide: Framework components

The WASP project is aimed to result in a framework (in its extended meaning) for the development of agent-based Web-aware applications. The components provided by such a framework are listed in slide agent-components. In addition to the proper software components, the framework includes a methodology, as well as a logical foundation. Further we wish to develop guidelines for realizing actual agent applications, and our hope is to develop a language for programming agent applications, based on the language DLP, described in appendix DLP.

(C) Æliens 04/09/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.