Design


Let's look at the major components of a personal portal.

You will need the following:

  • A Web server You will need a lightweight Web server capable of supporting Java Servlets and JavaServer Pages.

  • Jini Services Implementing a shared content space will require a number of Jini services, including reggie, mahalo, and JavaSpaces.

  • Of course, a connection to the Internet will be required to put your portal on the Web.

We will use Tomcat from the Apache software group to support our content portal. Tomcat is the servlet container that is used in the official reference implementation for the Java Servlet and JavaServer Pages technologies (see Figure 18.2). The Java Servlet and JavaServer Pages specifications were developed by Sun under the Java Community Process.

Figure 18.2. The personal portal uses standard Java-based technologies, all of which are freely available for personal use!

graphics/18fig02.gif

Tomcat 4.0 supports the Servlet 2.2 and JSP 1.1 specifications (see www.apache.org for additional information and to download the software).

Tomcat can be easily installed and is written in Java. It can provide your personal portal with the required HTTP support for serving HTML pages over the Web. It also supports an environment for dynamically creating and fetching Web pages through the use of servlets and JSPs. More information on servlets can be found at www.sun.com/products/servlets and information on JavaServer Pages is available at www.sun.com/products/jsp.

You will extend the servlet architecture through the use of beans. A SpaceBean will provide access to an instance of JavaSpaces. A MetaDataEntryBean and a MetaBean will encapsulate the Dublin Core metadata Set elements and provide a wrapper to the JavaSpace API. A MetaDataEntry will be written and read to JavaSpaces, which includes metadata elements and a location URL for the document being catalogued in your content space. Documents in your personal repository can be local content, or may be distributed across a number of cooperating and collaborating nodes (see Figure 18.3).

Figure 18.3. The personal portal extends centralized content management to include a web of connections to information important to your portal presence.

graphics/18fig03.gif

Use Cases

Our portal will initially support three primary functions:

  • Cataloging Cataloging a document involves adding the metadata elements and the location URL that points to the document.

  • Search Searching allows you to specify one or more metadata elements to find matching content that has been catalogued. Once found, the content can be accessed by following the link to the document using normal browser navigation.

  • View Viewing presents a list of the content currently accessible through your portal.

Typically, you would log in to a content space to authenticate and authorize login credentials. In a personal space, this might be simply a user identifier and password.

You can grant access rights to other users by establishing an account and allowing remote users to access your content repository. You could even allow other group members to update your repository with files located on their Web site or PC.

Once you have been authenticated, you can catalogue documents or search and view content. Authentication is outside the scope of this chapter, but numerous examples exist on the Web that demonstrate the use of session objects to maintain and manage user credentials.

Class Design

The classes used in the personal portal (see Figure 18.4) are as follows:

  • HomePlace Extends HttpServlet and becomes the initial point of request intervention and routing.

  • SpaceBean Implements DiscoveryListener and resolves references to JavaSpaces.

  • MetaBean Provides access to MetaData defined for portal content.

  • MetaDataEntry Encapsulates Dublin Core Metadata in class entry definitions maintained in JavaSpaces.

  • MetaDataEntryBean Provides a link to the MetaDataEntry.

Figure 18.4. The beginning of the class design supporting the personal portal.

graphics/18fig04.gif

It also uses the following JSPs:

  • view.jsp The presentation JSP used to display a table of catalogued content entries.

  • document.jsp The presentation JSP used to acknowledge portal space updates.

  • find.jsp The presentation JSP used to search for specific content.



JavaT P2P Unleashed
JavaT P2P Unleashed
ISBN: N/A
EAN: N/A
Year: 2002
Pages: 209

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net