Oracle Unified Messaging Developer's Guide Release 2.1.2 A86093-02 |
| Library | Service | Index

# 2
Planning Your Development Strategy

This chapter describes planning your development strategy for the Unified Messaging server and includes the following topics:

- Choosing a Development Approach

- Development Tools

- General Design Considerations for HTML Development

- HTML Application Development Process Overview

## Choosing a Development Approach

Web application developers typically take one of two main approaches in writing application to customize Unified Messaging, though additional approaches are possible. For complex tasks or tasks requiring special processing, you may also choose to extend the JavaBeans APIs in combination with either the HTML approach or the Java approach. The approach you choose, and whether you also choose to extend the JavaBeans APIs, depends on the complexity of the task, the target runtime environment or platform, and the areas of expertise of the developers. All approaches, however, access the Unified Messaging server through the JavaBeans APIs.

- HTML Approach: Using HTML application to access the JavaBeans APIs through the Java Server Pages.

- Java Approach: Using Java application to access the JavaBeans APIs directly.

### HTML Approach

With the HTML approach, you develop templates that consist of a combination of standard HTML and URL syntax. The JSP engine passes templates and executes Java code held within. Variables of the calling URL, browser cookies, and browser environment variables passed in the HTTP request can be accessed using Java servlets. Once processed, sends this dynamically generated HTML is sent to the browser.

This approach offers the following advantages:

- HTML application use only standard ASCII syntax, allowing rapid prototyping and development without the need to compile code.

- You can use scripting languages such as JavaScriptTM, JScriptTM, or VBScriptTM to enhance the functionality or interactivity of your application.

- You can add rich functionality without requiring Java programming expertise.

- It requires only a standard Web browser on the client machine, making it ideal for thin-client solutions.

### Java Approach

With the Java approach, you develop custom Java application that pass instructions to the UM APIs directly. Java application can achieve all of the functionality of HTML application, by directly invoking API methods to access and manipulate attributes. Although the Java approach is a development option, writing Java application is beyond the scope of this document.

## Development Tools

You do not need a special development tool to develop HTML-based application for Unified Messaging. You can use a text or HTML editor or, if you prefer, a Web authoring tool to create and maintain the template files that make up your application.

To create Java applets or use any browser-compatible scripting, you can use development tools. No special development environments or tools are provided with the Unified Messaging SDK.

## General Design Considerations for HTML Development

The visible part of most HTML application will be a collection of HTML templates. Templates are the building blocks of your application and include a variety of programming information.

You can build new HTML pages and use these as templates for your application or you can modify existing templates. Regardless of where you begin, there are several factors to consider before you write the application.

### Consider How to Display Data

You should consider the number of runtime application objects--for example, message titles--that appear in the interface and how template tags are replaced by those objects. Also consider the formatting of objects included by template tags.

### Consider How to Create Links

Links in an HTML application can be static URLs to other pages of the application or detailed functional instructions for the application's next operation.

When you build application URLs, you will specify the next template to use and the error template to use. Before you begin developing your Unified Messaging application, consider how you want to create links from text--like lists of message subjects--and links from forms. When planning a link from an application page, consider:

- What's the next HTML page to display after an action?

- What's the next HTML page to display after an error?

This diagram is a basic example of how various lists and forms may be linked in an application.

Figure 2-1

The diagram also illustrates how you can display error messages in the current HTML template (e.g., the Inbox, View Message, and Address Book templates), or you can build dedicated error message templates.

### Consider How to Use and Create Forms

HTML forms allow application users to enter a variety of information using text fields, radio buttons, check boxes, and selection menus. You should plan to use forms to allow users to log into your application, to search for text, and to enter text for use in messages or as other attribute information.

Submitting a form constructs a URL. The content of the URL submitted by the form is composed of a series of name=value pairs that are taken from the names and values of elements in the form. The name=value pairs can be used to define, create, and manipulate application objects such as, messages using references to existing application objects and the objects in the JavaBeans APIs. The placement order of form elements determines the order of name=value pairs that are submitted in URLs.

Note: When constructing HTML forms, Oracle Corporation recommends using POST for the form method. POST will not display the URL "contents" in the location text field of the browser and allows for larger data transfer. GET is a valid form method; however, it is subject to URL length limitations.

### Consider Your Network Bandwidth

Network bandwidth limitations may slow application performance and decrease user productivity. For example, if you are building a mail application for use over modem lines, it might be frustrating to the user to have to wait while a list of the subject lines of the 3000 messages in the user's inbox is created and sent out down the line. It is important to consider your network bandwidth prior to developing and deploying your application. For example, if you build a limit to the objects displayed, you must also build ways to show the remaining objects.

You should also consider bandwidth when you are planning sophisticated graphics, multiple frames, or any other HTML structures that create processing overhead.

### Consider Browser Limitations

Make sure to consider the limitations of the Web browsers that will support your application. For example, if you plan to use scripting for HTML form validation, your choice of a scripting language may depend on the browser being used to run the application. In addition, since scripting is processed by the Web browser, heavy use of scripting in your application increases the load on the browsers running the application and may decrease performance.

Make sure you consider the browser versions you intend to support, and the size of the typical machine that the browser will run on when planning your application.

### Consider Using Existing Application Designs and Templates

Another approach to application development is to use HTML application templates provided with the Unified Messaging SDK as a starting point for a new application or to add Unified Messaging capabilities to existing Web pages.

For example, if you are developing an application with the messaging JavaBeans APIs, you can begin your application design by looking at the included admin and user application. The sample application is a HTML template with calls to the Unified Messaging APIs.

You can copy and modify any or all parts of these application to build a comparable application that meets your needs. To view the source code of any of the HTML application templates for the sample application, go to the application files in the following directory:

    $ORACLE_HOME/um/templates/um

## HTML Application Development Process Overview

As you write HTML templates, you may find that your application development is easier if you take the following steps:

1. Design and create regular HTML files as static templates.

     Start by creating a set of industry-standard HTML files that define the graphical user interface and flow of the application. At this point, data is hard-coded, not retrieved from the Unified Messaging Server, and clicking a link or an icon displays another HTML file.
2. View your static templates through personal Web server software.

     So that the links to images and other templates work as they will in the running application, view the static templates through a personal Web server, rather than viewing local files through a Web browser.
     During this step, you can experiment with the look and feel of the application, as well as the execution flow. You can also work with end users, managers, Web designers, or other developers to refine the application before you start building live Unified Messaging functionality.
3. Create the directory structure.

     Create a directory for your application in `$ORACLE_HOME/um/templates`. In your application directory, create separate directories for templates and images, like this:

     `$ORACLE_HOME/um/templates/um`

     `$ORACLE_HOME/um/templates/images`

4. Change the static URLs to application URLs.

     Start with the first template, which by default has the same name as the application. Change the static URLs, which call other HTML files, into application URLs, which call methods from the JavaBeans APIS and specify the next template that will be displayed.
5. Replace static data with template tags that call the JavaBeans APIs.

     You can then transform the static HTML files into dynamic HTML templates by replacing static data with template tags that call the JavaBeans APIs. For example, in developing an e-mail application, you might begin by displaying a hard coded list of messages and replace this list with template tags that display actual messages stored in the user's inbox on the Unified Messaging server. You can handle repeating data sets or conditional processing with template tags.
6. View your finished application through a Web browser.

     Once you have modified all of the templates, the application is complete. You do not need to compile or link anything.

| Copyright © 2001 Oracle Corporation. All Rights Reserved. |
| Library | Service | Index