The present invention relates to web applications, particularly to the cooperation between web applications.
Portals are an example of web service aggregating applications, which are special kinds of web applications that aggregate content or aggregate web applications from different sources. They serve as a simple, unified access point to web applications. Furthermore, portals provide functions like security, search, collaboration, and workflow. A portal delivers integrated content and applications, plus a unified, collaborative workplace.
Web applications aggregated by a portal are typically implemented as portlets. The term “portlet” refers to a small portal application, usually depicted as a small box in a web page. Portlets are reusable components that provide access to applications, web-based content, and other resources. Web pages, web services, applications, and syndicated content feeds can be accessed by portlets. Any particular portlet may be developed, deployed, managed, and displayed independently of other portlets.
A portlet is a complete application, following a standard model-view-controller design. Portlets have multiple states and view modes, plus event and messaging capabilities. Portlets run inside the portlet container of a portal server, similar to a servlet running on an application server. The portlet container provides a runtime environment in which the portlets are instantiated, used, and finally destroyed. Portlets rely on the portal infrastructure to access user profile information, participate in window and action events, communicate with other portlets, access remote content, lookup credentials, and to store persistent data. The portlet API provides standard interfaces for these functions.
A commonly used specification for invoking remote services in portals is WSRP (Web Services for Remote Portlets). In WSRP, a producer hosts a remote web service that is typically interactive. The consumer represents the entity integrating the remote service, e.g. a portal, whereas the end user is the person that comes to the consumer's web site to use the producer's application in the consumer's context.
At present, cooperation of two different web applications is not optimal. If the second of the web applications, to be invoked by the first web application, is remote, normally the second web application will itself display the response to a request of the first web application without integration into the consumer's context. For local web applications, cooperation is made possible via local APIs (application program interfaces) in terms of exchange of data, a process also called “wiring” in case of portlets.
Published U. S. patent application 2004/0090969 A1 enhances cooperation between portlets by providing a data sharing method. It allows creating a portal page that includes a first portlet and a second portlet, wherein a source field in the first portlet is mapped to a destination field in the second portlet so that the data in the source field is automatically shared with the destination field. This system is static in that destination and source field as well as the mapping have to be defined in view of possible functions and cooperation of the portlets. Thus, only data categories that were expected to be needed by more than one portlet can be accommodated.
A first aspect of the present invention includes a method for providing cooperation between two or more web applications, wherein a first web application sends a request via a request dispatcher to a second web application, and the second web application returns a response to the first web application via the request dispatcher, enabling the first web application to display the second web application's response.
Using a request dispatcher as “intermediary” allows for a flexible mode of cooperation. When the first web application needs some input other than from the end user, it may submit a request accordingly to the request dispatcher. The request dispatcher invokes a second web application capable of returning an appropriate response. Unlike the first web application, the request dispatcher always has the same interface, independent of whether a local or remote second web application is to be invoked. Unlike the second web application, the interface of the request dispatcher is such that the second web application does not need to take into account that the request originated from another web application. The request is received and processed like a conventional request. Consequently, neither the first web application nor the second web application has to be specially adapted to cooperate.
As the request dispatcher runs in the background, the end user does not necessarily notice that the second web application has been invoked.
In preferred embodiments of the present invention, the second web application is remote with respect to the first web application, and the request dispatcher performs a remote invocation of the second web application.
Preferably, the request dispatcher transmits information on the second web application's mark-up to enable the first web application to display the second web application's response. Otherwise it could happen that the display would be according to the environment of the server hosting the second web application, which could be different from the environment of the server hosting the first web application.
In preferred embodiments of the present invention, the web applications are implemented as portlets.
Advantageously, the request dispatcher is implemented according to the WSRP (Web Services for Remote Portlets) specification.
In a further aspect of the present invention, a web application is provided, having access to two or more further web applications and providing an application program interface arranged for forwarding a request of a first further web application to a second further web application, and forwarding the response of the second further web application to the first further web application such that the first further web application can display the second further web application's response.
In preferred embodiments of the present invention, the web application having access to two or more further web applications is a web service aggregating application.
The present invention can be realized in hardware, software, or a combination of hardware and software. Any kind of computer system, or other apparatus adapted for carrying out the methods described herein, is suited. A typical combination of hardware and software could be a general-purpose computer system with a computer program that, when executed, controls the computer system such that it carries out the methods described herein. The present invention can also be embedded in a computer program product, which comprises all the features enabling the implementation of the methods described herein, and which, having been loaded in a computer system, is able to carry out these methods.
Computer program means or computer program in the present context mean any expression, in any language, code, or notation, of a set of instructions intended to cause a system having an information processing capability to perform a particular functions either directly or after either or both of: conversion to another language, code or notation; or reproduction in a different material form.
In the following, preferred embodiments of the invention will be described in greater detail by making reference to the drawings in which:
The present invention is explained below with reference to a portal with portlets. The communication between the portal or the portlets and remote services is based on WSRP (Web Services for Remote Portlets). Detailed explanations on WSRP may be found in a number of references, including http://www.ibm.com/developerworks/library/ws-wsrp, in the document “Specification: Web Services for Remote Portals (WSRP), Note 21 Jan. 2002” by Angel Luis Diaz, Peter Fischer, Carsten Leue, and Thomas Schaeck (WSRP has been renamed since 2002).
When aggregating pages for portal users, portals typically invoke all portlets belonging to a user's page through a portlet API 6. There are two different kinds of portlets. Local portlets or service specific portlets 8 run on the portal server itself. They access general web services 12 via SOAP 10 on a web services platform 13. Remote portlets or remote portlet web services 11 run as web services on remote servers 13 that are published in UDDI directory 4 to allow for easy finding and binding 3. Typically, portlet proxies 7 (generic local placeholders) will invoke WSRP services to which they are bound via the SOAP protocol 9.
While portlets usually provide the base functionality for portals, remote portlets can provide a large number of additional functions without installation effort or need for third party code to run locally on the portal server.
To embody the present invention, the portlet API 6′ may be extended, as shown in
This is shown more in detail in
The calendar portlet 303/403 decides whether it needs data on people that may be added to an invitation. The portlet 303/403 may itself search for an address portlet providing the necessary information, or may use special means of the server 301/401 for doing so. After it has found address portlet 306/406, it sends a request to the request dispatcher 305/405. The request dispatcher 305/405 forwards the calendar portlet's request either by a local invoke as shown in
When forwarding the request, the request dispatcher 305/405 sends it via WSRP 307/407/417, even if the session is local as in
With reference to both portlets 303 and 306, the server 301 is a producer (hosting the address portlet 306) as well as a consumer (hosting the calendar portlet 303). With reference to the cooperation of portlets 403 and 406, server 401 is the consumer, and server 411 is the producer.
The special feature of the request dispatcher 305/405 is that it makes use of WSRP for receiving and forwarding requests and responses. Especially, the request dispatcher 305/405 enables the WSRP producer 301 to handle sessions from local calls, as shown in
As shown in
In addition to the request or response itself, the request dispatcher 305/405 also transmits the address portlet's markup to the calendar portlet to ensure display of the response, in this case the people to pick for the invitation. The information is submitted according to WSRP and includes, for example, user, session, device, markup, locale, and the like. The request dispatcher further provides URL generation for correct display. In local cases, the rewriting is done against the conventional local portlet API implementation. In remote cases, the rewriting is done against the WSRP specific portlet API implementation covering templates and WSRP rewrite URLs. In remote cases, the rewriting may be done in two steps, one on the WSRP level and one on the local level.
There ate two ways of invoking a portlet via the request dispatcher. It can be invoked during rendering of the calling portlet, which includes the markup of the called portlet, or it can be invoked during an action to the calling portlet, which forwards the action to the called portlet.
It will be noted that more explicit instance handling is possible.
Once the instance and the session exist, a getMarkup request is created from the render request (step 515) and the called via the stub (step 517). With this information, the markup is rewritten (step 519) and the WSRP states are updated (step 521). Then the markup is written to the response (step 523) and the portlet id is returned (step 525).
Number | Date | Country | Kind |
---|---|---|---|
05100122.0 | Jan 2005 | EP | regional |