The Big Brother example application
In this section, you will discuss the project that will showcase the CSS and XML control capabilities of Themes for XPages in Lotus Domino Web application development. The project, a mobile sales tracker application called Big Brother, will use Themes to control the XPages that will deliver your Lotus Domino Web application user interface. Themes in this application will also be used to control the OpenStreetMap APIs integration, further illustrating the power of Themes and giving you a fully functional Lotus Domino and public Web services mashup Web application.
Let's first review your build project, an application consisting of the following components (see figure 2):
- Simple contact management through Lotus Domino forms and views
- Simple location entries management through Lotus Domino forms and views
- Management "Dashboard" through a Custom Theme-controlled XPage
Figure 2. Big Brother application overview
This application will allow salesforce members and managers to update current location information. A sales manager can use the Dashboard, an XPage + OpenStreetMap + GeoCoder mashup, to get an immediate overview of their salesforce by location.
To show that XPages can exist and work seamlessly with existing functional Lotus Domino Web applications, you will keep the document management for this build project in XHTML-laden forms and view design elements.
Using Themes, you will easily modify the visual and functional rendering through CSS and JSF/XML markup generation, allowing for centrally maintained control over a complex design architecture.
Big Brother will use form and view design elements written specifically for the Web browser client to handle all NotesDocument management. This is done so you can focus more on how Themes and XPages can be used to create new entry points into existing Lotus Notes and Lotus Domino-based applications.
You will see several more advanced techniques for handling NotesDocument management than those typical with more Lotus Domino Web RAD methods and techniques. The usage of (X)HTML in the forms and views will play a large part in the NotesDocument Management and in how you will build your XPage-based dashboard.
OpenStreetMap is a crucial component to the Big Brother mashup Lotus Domino Web application. The features and functionality planned for this public Web service will be discussed next.
The OpenStreetMap (or OSM) API, a public Web service (see Prerequisites for a link), will be integrated with your XPage and Theme design elements to deliver the aforementioned sales person pinpointing. Let's review some of the OSM API.
As the purpose of this tutorial is more of a review of how XPages and Themes can be used in Lotus Domino Web application development to extend Lotus Domino Web RAD, you will be keeping the mashup basic, choosing to implement the simple OpenLayers POI (Points of Interest) example in your example project.
Details on this example can be found on the OSM Wiki at the following location: http://wiki.openstreetmap.org/wiki/Openlayers_POI_layer_example.
As the OpenStreetMap POI example relies on latitude and longitude data for map location pinpointing, Big Brother should include a facility to allow for location-based latitude and longitude lookup. To facilitate these lookups, you will look to yet another public Web service called GeoCoder.
The GeoCoder API, a public Web service Prerequisites for a link), will be loosely integrated with your form design elements to allow the user entering their given location the ability to query and return the latitude and longitude data that is required for the OSM pinpointing used throughout the application.
You will be using the free service (which will explain the iframe-based usage you'll see in the finished example project), as that will give you the longitude and latitude information needed to meet the functional requirements of this application. There are other services available from GeoCoder, including several that would allow you to use AJAX queries of location information, which are beyond the scope of this tutorial.
For more information on GeoCoder specific to its usage in this tutorial, review the "Using the Free Service" section (see Resources for a link.