Web services provide a method for encapsulating applications and making them usable in new contexts. Web services technologies are based on two concepts: a service-oriented para-digm and shared standards. The service-oriented paradigm supports one-time encapsulation of business processes and their usage in multiple locations. The second, a set of shared standards, allows businesses to expose, discover, and integrate these business processes. Ultimately, Web services enable new business opportunities by reducing business-to-business integration costs and allowing companies to offer their services through more business partners.
The ultimate adoption of Web services technology within organizations depends on the scalability it provides; that is, the degree of ease with which Web services can be delivered to business partners and incorporated into their business applications. The more effectively you can package applications as Web services, the more readily this technology model will be adopted across your organization and its business partners. So, broad adoption of Web services demands practical methodologies and straightforward technologies for sharing and integrating applications.
The potential of Web services has been mainly exploited in application-to-application programmatic interfaces. However, while this model lets application providers expose business logic to other applications, it doesn't address the Web user interfaces, that is, the way the functionality is offered to the end user.
In this article, I'll examine the structure of Web applications, and discuss the technical challenges that arise in integrating Web applications and, in particular, in building a Web user interface on top of Web services. I'll then demonstrate how Web user interfaces can be shared as part of Web services to make the services more accessible to business partners, and to reduce time-to-market.
Web Application Architecture
To understand the requirements that enable application extensibility, we first need to observe
how Web applications are built and integrated.
Web services standards are closely linked to the conventional way of structuring applications as a set of three logical layers: data, business logic, and presentation (user interface).
In this architecture, the data layer is responsible for managing data, handling issues such as storage and retrieval, indexing, and backup. The business logic layer encapsulates the application rules, including data flow and authorization. The presentation - Web interface - layer encapsulates the way infor-mation is pre-sented to the user.
Current tech-nology provides widely accepted mechanisms for integrating the first two layers. XML offers a solution for integration at the data layer while programmatic Web services offer means for incorporating the business logic layer. However, the challenge of creating a Web user interface on top of Web services still remains. To understand why this is so, we need to look at the Web user interface and how it works.
Building a Web
User Interface
Widespread adoption of the Web has made the Web user interface the de facto standard for interacting with end-users. Its further evolution introduced new layers of sophistication and complexity that include presentation, navigation, interaction, and personalization. As a result, developing a Web user interface has evolved into a major development task that requires multiple teams and specialized skills.
The depth of today's Web user interfaces can be described in terms of four elements:
- Presentation
- Navigation
- User interaction
- Personalization
To illustrate how these elements work, I'll use a hypothetical example: an automotive insurance application provided by the BigInsurance company. A page of the application is shown in Figure 1.
Presentation is the way information is presented to the user. It includes visual elements, ranging from
the application's style guidelines, through its concrete graphic design, to branding elements. These typically extend beyond the logo to the way products and services are offered to the user Presentation is central to application usability, providing convenient access to information, and it also includes the content presented to the user. In the BigInsurance example, the presentation of the application includes the brand at the top left side, and the color and font selection. The technologies typically associated with presentation include HTML, DHTML, JavaScript, and CSS at the client side, and XSL at the server side.
Figure 1
Navigation is the path users take to find relevant information within a more complex context. It embraces the overall application flow, from the links between applications to references to auxiliary information and global navigation bars. Navigation's important role in application usability is to ensure that users can find information. In the above example, navigation includes the global navigation bar at the top, as well as links such as the "Other Products" link at the top right corner. The technologies typically associated with navigation include links, image maps, HTML forms and URLs - that is, making sure bookmarks work.
Interaction is the way the user interacts with the application, providing data and receiving information back. It includes many aspects of the application logic:
- Input workflow: what data is requested,
and when
- Input validation: how the data is validated
and how error messages are presented to
the user
- Session management: supporting
multi-page interaction
In the BigInsurance example, the interaction element determines the application flow. For example, after selecting the state and clicking on "OK," the user is presented with a new window asking for additional information. The technologies typically associated with interaction include HTML forms at the client side, and dynamic pages (ASP/JSP) and state management at the server side. Personalization is the ability to present the right offers to the right user at the right times. It addresses many e-commerce merch-andising concerns such as advertisement, up-selling, and cross-selling. A familiar example is the ability to present different offers to users based on their past purchase histories. But personalization extends beyond e-commerce. It can enhance Web funct-ionality by presenting different information views to users with different needs.
In the above example, BigInsurance might present different insurance products to the customer based on age, gender, or state. The technologies typically associated with personalization are:
- Session management and cookies at the
technical level
- Template technologies such as ASP and
JSP as the underlying mechanisms for
custom-izing content
- Rule-based engines and collaborative
filtering as concrete e-commerce
personal-ization engines
Clearly, the development of the Web user interface represents a significant investment for a company in terms of both time and cost. Creating this interface requires the combined efforts of multidisciplinary teams that include business managers, information architects, graphic designers, HTML programmers, JSP programmers, and Java programmers. The development cycle is typically complex and lengthy.
Consequently, Web services providers must recognize that building a Web user interface on top of a Web service demands a sizable development commitment from each partner using the Web service. The magnitude of the effort required can itself defeat the whole point of Web services: to make it easy to
work with many partners. Obviously, a methodology and a set of technologies that can eliminate this development requirement is needed to alter the equation in favor of creating and using Web services.
Integrating the
Web User Interface
One approach that doesn't require business partners to re-engineer the Web user interface is to package the user interface itself as part of the Web service. Sharing the user interface requires serving user interface elements - namely, HTML code - as part of the Web service. This can be implemented directly on top of standard technologies - SOAP, WSDL, and UDDI-relevant Web services can supply a programmatic operation that returns HTML elements to the Web service consumer.
Figure 3 illustrates the concept. In this model, the Web interface layer is packaged as a part of the Web service into what I'll call an "interactive Web service." This Web service can be incorporated into other sites without redeveloping the Web interface. A thin layer that customizes the Web interfaces and integrates it into a new context may be used.
However, to share the complete Web user interface, you can't share any HTML code. You must extend the same principle of shared functionality to all the facets of Web user interface: presentation, navigation, user interaction, personalization.
Handling those issues may require more planning and additional technologies. For example, the HTML code example in Figure 3 presents the code behind the a BigInsurance page, and illustrates the challenge of preserving a complete Web user interface across multiple sites.
Presentation
Because HTML wasn't designed to be transportable, the code in the example above would not function properly when placed in a new location. You must at least "absolutize" the URLs of the images so they can be incorporated into an arbitrary location. In addition, you must resolve other issues: cascading style sheets (CSS), absolute positioning, JavaScript code, global document attributes - such as onLoad - and miscellaneous browser-specific HTML intricacies.
Navigation
A truly complete Web service should provide the application's full functionality, not just a single page. For example, the HTML from Figure 2 contains an "Other Products" link that sends the user to another URL. Placing this HTML code in a new location would cause the user to navigate outside the context of the "container" site. To resolve these issues, you can dynamically "bend" the links; namely, change the links to point to a partner URL (e.g., to http://www.partner.com/next page=other.jsp. This leaves the host application in control over the interaction, yet allows it to re-invoke the Web service when the next page is required.
Figure 2
User Interaction
Sharing the user interaction with business partners introduces yet another layer of complication. As the user interacts with the application, new data is submitted and new content must be returned. For the originator's Web application to work correctly, the application must receive data from the user, yet the "host" application must be able to control the presentation of any information in its own context. In the code example, whenever the user submits the "State" form, the information is routed to the BigInsurance server while the resulting HTML is available to the partner using the Web service. You can accomplish this in several ways. For example, whenever the user submits data to your application, you can save the resulting HTML and redirect the user to the partner site. Whenever the partner re-invokes your Web service, you can return the saved HTML code to the partner application.
Personalization
Sharing personalization elements with business partners isn't a straightforward problem. Typically, Web applications rely on temporary and permanent cookies to store user session information. Personalization logic is then based on that information. When HTML code is transported to a business partner server, user information is "lost" so the originator's application loses visibility of the user. Depending on the business requirements, you may need to require partners using your Web service to maintain cookies and URL parameters, and communicate them back to the Web service.
Summary
Web services are the new standard for encapsulating business logic and sharing it with business partners. The ability to implement Web services is essential to keeping abreast of Internet evolution, and a successful Web services strategy relies on easy integration of Web services with business partners. Key to that ease of integration is the creation of a customer-facing Web user interface that exposes the underlying functionality to the user.
As part of their implementation of Web services, businesses must decide whether to require partners to build the Web user interface or to provide it as part of the Web service package. In many
cases, encapsulating interactive elements within the services reduces implementation costs and increases their ability to work with more business partners.
Packaging the Web user interface with the Web service lets companies appreciably simplify Web services adoption by their business partners and create easily re-usable components. Service providers can leverage their existing investments in Web user interfaces. Their partners can utilize proven customer interfaces.
With relevant methodologies and technologies in place, companies can eliminate the re-engineering of the Web user interface, and create an innovative model that brings businesses significantly closer to fully realizing the potential of Web services.
Author Bio:
Eilon Reshef is the vice president of Products at WebCollage. WebCollage provides comprehensive software solutions for interactive Web Services, allowing
companies to package their existing customer-facing Web applications as Web
Services and rapidly share them with multiple business partners. eilon.reshef@webcollage.com
All Rights Reserved
Copyright © 2004 SYS-CON Media, Inc.
E-mail:
info@sys-con.com