Previous Table of Contents Next


Certainly, four and fivetier applications are possible. Often these applications are grouped under the heading of ntier applications because they combine numerous computers into a potentially deep and complex relationship. Figure 1.3 demonstrates a couple of ntier application designs.

Although these examples provide only the basic design for an enterprise application, they represent an important step in enterprise development. Before you can create an enterprise application, it is important to decide what technologies will be used and to determine the computers that will run them.

Security

Enterprise applications often require some form of security management. The Java security model is undergoing some major changes from JDK 1.1 to Java 2. The new model is beyond the scope of this book, but it does define the standard concepts that we will rely on. First, security often uses the concepts of a username and password to identify people. The Java enterprise technologies use these concepts as well. Users can sometimes be organized into groups or roles. A role might represent the idea of a manager. All managers, regardless of their usernames, might have the same permissions. For example, perhaps all managers could submit a hiring request, while employees cannot.


Figure 1.1  Twotier applications.


Figure 1.2  Threetier applications.


Figure 1.3  Ntier applications.

Java also relies on the concept of permissions. Permissions indicate what operations a user or role can perform. So, in our example, employees do not have permission to make hiring requests, while managers do. The configuration for these permissions is organized into an Access Control List (ACL). In our examples, we will sometimes use ACLs to control who can use a particular resource, such as an Enterprise JavaBean.

The remaining security concepts such as encryption and digital signatures are not used in this book, although they are supported in JDK 1.1 and Java 2. Please refer to the Sun Web site for more information on the latest security model.

Enterprise Technologies

This book discusses a number of Java technologies:

JDBC. The Java Database Connectivity (JBDC) libraries are used to connect a Java program to a data source. The initial version of JDBC was targeted at relational databases, but JDBC 2.0 extends this model to other types of data sources.
JNDI. The Java Naming and Directory (JNDI) interface, like JDBC, is really an enabling technology more than a library for use all by itself. Many of the technologies discussed in this book rely on JNDI to provide access to objects such as enterprise beans and JMS destinations.
Servlets. Servlets extend Web servers. In an enterprise environment, servlets can be used to solve a number of problems. First, servlets replace CGI in providing serverside processing for HTTP requests. Second, servlets can extend dynamic Web pages using serverside includes or JavaServer Pages. Third, servlets can be used to form a gateway between Web clients and other services such as databases, Enterprise JavaBeans, and JMS. Finally, the servlet interfaces can be used as a generic interface for services. For example, programmers might use the service method as an interface for generic RMI objects or even enterprise beans.
JavaServer Pages. JavaServer Pages (JSPs) are used to create dynamic Web pages using Java as a scripting language. JSPs are primarily used in situations in which a Web page changes with each request.
RMI and distributed objects. Like JDBC, Remote Method Invocation (RMI) is an enabling technology. Many applications and libraries use RMI to form their network connections. Other applications may rely on raw sockets or HTTP connections to interact with servlets and the Web Server. The goal of RMI is to provide a transparent link between two Java applications.
Enterprise JavaBeans. Enterprise JavaBeans (EJBs) are designed to be the standard building blocks for corporate server applications. Whenever your application is implemented on a server, definitely consider using an EJB host server, such as BEA WebLogic Application Server, and Enterprise JavaBeans. This combination allows you to rely on heavily tested services from the server provider and focus your resources on applicationspecific programming. The component design of Enterprise JavaBeans makes them a great way to encapsulate business rules and processes. They can also form the foundation of a library that provides standard services that your enterprise applications require, such as data processing or report generation.
Java Messaging Service. The Java Messaging Service (JMS) is designed to act as a front end to messaging providers. Messaging as a technology is a great way to objectify the communication between applications.

Creating an enterprise application involves combining these technologies to create a complete solution to your business problems.

Creating an Enterprise Application with Java

Let’s get something clear. This isn’t a book on designing applications. There are hundreds of books on that topic, and we couldn’t do the topic justice in this small space. However, it is worthwhile to look at the basic steps used to create an application and see how they apply to Java Enterprise development.

The first step for any project is to define the project and its goal. For an enterprise project, this may involve defining functionality across multiple computers or domains. Don’t tie yourself to a particular platform at this point. Instead, focus on what the entire application needs to do, then separate the functionality in later steps.


Previous Table of Contents Next