Previous     Contents     Index     DocHome     Next     
Application Builder 6.0 iPlanet Application Builder User's Guide



Chapter 1   Designing Applications


This chapter describes the relationships between files used in creating applications to run on the iPlanet Application Server.

The following topics are described in this chapter:



Parts of an Application

In the iPlanet Application Server environment, an application can contain three types of programming layers. As the developer, you use or create objects to deliver each specific layer, as listed in the following table:


Table 1-1 Application Layers

Application Layer

Objects Used

Data access layer  

Query files, and data models  

Presentation layer  

Java servlets for the presentation logic; JavaServer Pages and HTML files for the presentation layout.  

Business layer  

Enterprise Java Beans  

The relationships among the objects which represent the various application layers are shown in the following figure and are explained in the three sections that follow.




Data Access Layer

Data access logic determines what types of back-end data sources (if any) the application accesses, such as a relational database or a legacy system. In this guide, it is assumed that a data source already exists for use with your application, and that there is someone at your site, such as a database administrator, who manages it. iPlanet Application Builder enables you to access your data sources via data models and data access query files.

To legacy systems, your code may need to call into an extension. iPlanet Application Server includes prebuilt extensions. These extensions allow an application to communicate with transaction-processing systems such as CICS/IMS, IBM MQ Series, and BEA Tuxedo. Additional prebuilt extensions allow communication with ERP systems such as SAP R/3. If you need to create a custom extension, use iPlanet Extension Builder.


Relational Data Sources

If the application accesses a relational database, you use queries to access the data. To use a query, create two types of files:

  • a data model, which specifies the database tables and relationships used by the application.

  • a query file, which contains one or more queries, each of which defines a single interaction with a relational database.

You cannot create a query without a data model. Every query file depends on a data model, but not necessarily the same data model.


Nonrelational Data Sources

If the application is required to access a nonrelational data source, you must write Java code to communicate with the data source. In some cases, you can call into an extension that is prebuilt into iPlanet Application Server. In other cases, you may want to build a custom extension using iPlanet Extension Builder.


Presentation Layer

The presentation layer handles the presentation logic and layout of the application. The following sections introduce these concepts.


About Presentation Logic

Presentation logic controls and processes the data generated from application users by invoking Enterprise JavaBeans to perform business logic functions, and then generating a dynamic page that sets up the next user interaction. Presentation logic is handled by servlets on the iPlanet Application Server. Servlets handle such tasks as page-to-page navigation, session management, simple input validation, and the tying together of business logic.


About Presentation Layout

Presentation layout determines how users experience the application. Typically they use a web browser and navigate from page to page (HTML pages or JavaServer Pages). For example, suppose a user is viewing the left web page in the previous figure. As a result of a user action, such as pressing a Submit button, the web browser displays the page on the right. The intervening processing remains transparent to the user.


Business Logic Layer

Business logic maintains the application-specific processing and business rules of an application. Using iPlanet Application Builder, you implement your business logic via Enterprise JavaBeans (EJBs).

The application components designed for your business logic connect the components designed for the presentation layer (servlets, HTML pages, and JavaServer Pages) to the components designed to implement the data access layer (data models, queries, and JDBC RowSet calls).


Enterprise JavaBeans

In the iPlanet application model, you design session and entity EJBs to implement the various types of business logic.



Assembling the Pieces



To create an application, you assemble files that execute the presentation logic, business logic, and data access logic that the application requires. Assembling files means either creating new files or locating existing files to add to a project, which is a container for your files during development. A project also lists the files you will deploy as an application, after development is completed. The process of creating projects with iPlanet Application Builder is described in "Creating and Managing Projects."


Types of Files in a Project

In developing an application, you assemble the following types of files:

Table 1-2 File Types

File Description

File Suffix

HTML pages  

.html, .htm  

JavaServer Pages  

.jsp  

JavaScript  

.js  

Image files  

.gif, .jpg, .jpeg  

Servlets, EJBs, and other Java code  

.java, .class  

Query files  

.gxq  

Data models  

.kdm  

Connection files  

.props  


How Files Relate to Each Other

You use iPlanet Application Builder to create a project that ties its files together. The files in a project are related as follows:

  • HTML pages and JavaServer Pages (JSPs) contain the web content. In addition to entering formatted text, you can insert links to image files. You also design HTML pages and JSPs that call JavaScript, Enterprise JavaBeans, and servlets.

  • Servlets contain the application's business logic written in Java. For example, a servlet can call another servlet or return data via a RowSet object. The servlet handles data access, which may involve calling a query file to execute a query against a relational database. And when a servlet returns data via a RowSet object, it merges this output with a JSP.

  • If the application must query a relational database, you create one or more data models, and one or more query files based on a data model.

Although you can use iPlanet Application Builder to manually define the relationships between files, one of the benefits of iPlanet Application Builder is its automated code generation wizards. Wizards guide you in creating sets of related files to perform commonly needed actions.

For example, many applications require login functionality, which derives from the interaction of several files. Using the Login wizard, you can quickly create the needed files, with the links between them automatically defined. For more information on wizards, see "Using Wizards to Generate Project Files."



Getting Started



The general process of creating a project is described in "Creating and Managing Projects." However, before you launch iPlanet Application Builder, the following conditions must be in place:


Understand the iPlanet Application Server Environment

Because you will be deploying applications to the iPlanet Application Server, it is important that you understand the role of these applications within a three-tiered environment. Before using iPlanet Application Builder, it is recommended that you become familiar with the concepts presented in the Programmer's Guide.


Define the Application Environment

What type of application do you want to design? Possible variations include: Internet, intranet, and extranet. Some examples are shown in the following table:

Table 1-3 Application Types

Application Type

Examples

Internet  

E-Commerce, Financial, Security, Portal, Internet Service Provider (ISP).  

Intranet  

Human Resources self-service, Sales force automation, internal help desk  

Extranet  

Supply chain management, insurance quotes, car dealership management  

Workgroup  

Accounting reports, RFE management  


Define the Application Requirements

Once you've defined the application type, the next step is to gather the requirements of that application. Requirements are often determined by answering questions about the application's purpose or functionality. For example:

  • Will users be anonymous, or will they be tracked by a username and password?

  • Will the application support different user interfaces, such as multiple languages or different versions of a browser?

  • What kinds of data can users query or update, and how is it accessed?

  • Additional issues include: performance, throughput, capacity, scaling, reliability, and security.

The previous list is only a sample of questions to consider. For more information on gathering application requirements, see the Programmer's Guide.



Define the User Interface



Defining the user interface determines the page flow, which affects how an end-user navigates through the application. You define page flow by deciding what files will call other files. The general principle of page flow is shown in the previous figure.

The following questions can guide your decisions about user interface design:

  • What is the page layout and flow for the application?

  • What commands and buttons are available on each page?

  • Will the pages use frames or not?

  • Does the application require user validation?

    If so, you may decide to create a login page through which users access the application. Note that iPlanet Application Builder provides a Login wizard to guide you in creating login functionality.

  • How will data be entered and displayed? In particular, the following questions pertain to this issue:

  • How many HTML pages or JavaServer Pages require input forms?

  • What kinds of form elements are required for the HTML pages or JSPs?

  • Will database results be displayed together on a single page or displayed across multiple linked pages?

  • Are there any corporate standards that determine headers and footers, logos, menu bars, or banner ads?

  • Are there any international issues? For example, are the icons or cartoon images meaningful to all users? Does translation pose a formatting problem?

  • Are the commonly used features easy to find?

iPlanet Application Builder provides several wizards that make it easy to create some of the more common page designs.

For additional information on application design, see the Programmer's Guide.


Set Up the Data Sources

A data source can be any of the following examples:

  • relational database

  • directory server

  • legacy system (for example, mainframe files)

  • client/server application (for example, Enterprise Resource Planning, or a spreadsheet)

Most web applications access a data source in some way; for example, when they display query results or when they allow users to update account information.

In the case of a relational database, a database administrator or data architect sets up and manages access at your site. Similarly for non-relational data sources, it is assumed that these systems are available and that they provide access to clients.

If there is one or more data sources for you to work with, you will need to specify which data source(s) to access, and which connection protocols to use. These tasks are described in "Creating Data Access Logic."


Previous     Contents     Index     DocHome     Next     
Copyright © 2000 Sun Microsystems, Inc. Some preexisting portions Copyright © 2000 Netscape Communications Corp. All rights reserved.

Last Updated April 28, 2000