Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

The ultimate mashup -- Web services and the semantic Web, Part 6: Give the user control

Use semantic techniques to enable mashup users to control services, information, and presentation

Nicholas Chase (ibmquestions@nicholaschase.com), Freelance writer, Backstop Media
Nicholas Chase has been involved in Web site development for companies such as Lucent Technologies, Sun Microsystems, Oracle, and the Tampa Bay Buccaneers. Nick has been a high school physics teacher, a low-level radioactive waste facility manager, an online science fiction magazine editor, a multimedia engineer, an Oracle instructor, and the Chief Technology Officer of an interactive communications company. He is the author of several books, including XML Primer Plus (Sams).

Summary:  This is the final tutorial in a series that shows you how to create a mashup application. At this point you have a working application and the framework in place so that the system can use semantic reasoning to understand the services at its disposal. In this tutorial, you will give the user control to choose a type of service, the data to pull from the Web service, and the presentation of that data.

View more content in this series

Date:  08 Mar 2007 (Published 31 Oct 2005)
Level:  Intermediate PDF:  A4 and Letter (1027 KB | 59 pages)Get Adobe® Reader®

Activity:  13180 views
Comments:  

Before you start

This tutorial is for developers who want to learn more about using semantic techniques and applications. Specifically, it teaches you how to use semantic Web techniques to pull data from an arbitrary Web service on-the-fly and display it in the form of a user's choosing.

This tutorial assumes that you are familiar with Java programming. You should also be familiar with the concepts of XML and Resource Description Framework (RDF) in general, and Web Ontology Language (OWL) in particular. If you need a refresher on these three topics, check out Parts 3 and 4 of this series.

About this series

It seems you can't turn around on the Web these days without running into a Web site that either offers access to its data through a Web-services-based API or uses data from another site obtained through a Web-services-based API. When you consider the advantage of using existing information in your own applications, that's probably not terribly surprising. It was also just a matter of time before someone started to combine the data from these disparate systems to create something entirely new. These applications, called mashups, are the latest rage on the Web, from community-based sites to specialized search sites to the ever-present mapping mashups.

They're (almost) all useful, but one thing that they have in common is that they were all developed for a specific set of services, and if one of those services changes, or if the preference for a specific service of a particular type changes, you'll have lots of work to do.

The purpose of this tutorial series is to create a mashup application so smart that users can literally add and remove services at will, and the system will know what to do with them. The series progresses as follows:

Part 1 introduced the concept of mashups, showing how they work and building a simple version of one. Serious performance problems involved in making potentially dozens of Web calls were also discovered.

Part 2 solved some of that problem by using the new pureXML™ capabilities of IBM® DB2® to build an XML cache, which saves the the results of previous requests and also enables you to retrieve specific information.

Ultimately, you will need to use ontologies, or vocabularies that define concepts and their relationships, so in Part 3 you began that process by learning about RDF and RDFs, two key ingredients in the Web Ontology Language (OWL), discussed in Part 4. Part 5 takes the ontologies you created in Part 4 and used them to enable users to change out information sources.

Now, in this tutorial, things get really fun. At this point, you have a working application and the framework in place so that the system can use semantic reasoning to understand the services at its disposal. In this tutorial, you give the user control, enabling him or her to choose from services in the ontology and to pick and choose the data that is used for a custom mashup.


About this tutorial

This tutorial, Part 6 in a series, explains how to add semantic capabilities to an existing Web services mashup application. In Part 5 (see Resources), you took an existing ontology and implemented it to enable the user to easily change services. In this tutorial, you'll use semantic techniques to give the user complete control over the information displayed and its presentation.

In this tutorial, you will learn to:

  • Invoke a reasoner on semantic data
  • Programmatically determine subclasses of a class
  • Programmatically determine the available properties of a class
  • Programmatically determine specific property values
  • Build an application that pulls information based on semantics rather than XPath expressions

In this tutorial, you will take the mashup you built in Parts 1 through 5 and give the user the ultimate control. The user will be able to choose a type of service, a specific Web service to use, the data to pull from the Web service, and the presentation of that data. In the end, you can add new functionality and new services to the application by simply adding them to the ontology rather than touching the application at all.


Prerequisites

To follow along with the code in this tutorial, you will need to have the following software installed and tested.

  • IBM® DB2® 9 (formerly known as "Viper"): This relational database also includes significant XML capabilities, which you'll need for this tutorial. You can download a trial version of DB2 9: DB2 Enterprise 9 or DB2 Express-C 9, a no-charge version of DB2 Express 9 data server.
  • Apache Tomcat or other servlet engine: This tutorial assumes that you will build Web applications using servlets, so you'll need a servlet engine such as Apache Tomcat. If you choose to build the application using another environment, just make sure you have the appropriate software on hand. Download apache-tomcat-5.5.17.zip and install into a directory with no spaces in the directory name.
  • Java: Apache Tomcat 5.5, with which this tutorial is built, requires Java 1.5 or higher. Download the J2SE SDK.
  • To make things easier, you can use an IDE such as Eclipse or IBM Rational™ Web Developer for your development. You can download Eclipse at Eclipse.org, download a trial version of Rational Web Developer, or use your favorite development environment. You won't be doing anything fancy as far as compilation and deployment are concerned.

1 of 10 | Next

Comments



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=XML, Open source, Web development, Java technology, Information Management, SOA and Web services
ArticleID=168998
TutorialTitle=The ultimate mashup -- Web services and the semantic Web, Part 6: Give the user control
publish-date=03082007
author1-email=ibmquestions@nicholaschase.com
author1-email-cc=dwxed@us.ibm.com