Java EJP Introduction

 

EJP

 

Programming for the Java 2 Platform, Enterprise Edition

 

The Java 2 Platform , Enterprise Edition (J2EE) is architecture for a java development platform for distributed enterprise application. It was developed by Sun Microsystems, with input from the development community,

 

Why are J2EE application desirable?

 

Client Server Technology:

 

In the early 1990s, information systems frequently used client-server architecture. The User interface to the application usually run on a desktop computer. This was the client tier. The enterprise data being accessed by the client resided in a data base and was "served up" by a server. This approach initially promised improved scalability and functionality.

 

 

Through hard experience , however , the development community learned that building and maintaining a flexible distributed system is very difficult using the client server model.

 

For example, the business logic of the application had to be installed on every client machine in the enterprise. Maintenance became a nightmare. These applications also had to manage transactions, be concerned with security , and process the data efficiently, all the while presenting an attractive, easy to understand interface to its users.

 

Few developers have talents in all these areas. While a client server architecture might be adequate for some environments, most of today's global companies demand considerably more than the client server model can deliver. Once the limitations of the client server approach became apparent, the development community began seeking a better way. The result is the multitier model.

 

Multi Tier Architecture

 

In the multi-tier model, the logic involved in presenting the user interface of the application to the user lives on the middle tier. The business logic is now on the middle tier also. When changes are needed, they can be updated in one place instead of on each client machine.

 

The client in a J2EE application can be an HTML page or applet running in a browser , a java application on a desktop machine , or even a Java client on some portable device, such as a personal digital assistant (PDA) or cell phone.

 

The middle-tier can have java server pages or servlets running on a web server. These elements usually make up the server side presentation logic. An EJB container provide services to the components that run on them. Because these services are always available, programmers don't have to include them in the components they write.

 

The Enterprise Information System (EIS) tier is a repository for the enterprise's data. Usually it consists of the data in a relational database system.

 

Benefits of the Multi-tier Model

 

The multi-tier approach adopted by the J2EE platform has several benefits:

 

Ø It reduces the complexity of distributed development with a simplified architecture and sharing of the work load among roles. The business logic of the application runs in the middle tier inside an EJB container and/or on a web server. These containers and servers can handle many of the difficult tasks for developers. For example , an EJB container can handle transactions, instance pooling , and data persistence without requiring the EJB programmer to write the logic to perform these tasks.

Ø A web server can create and pool instances of servlet classes and handle multiple threads and socket connections. Instead of writing the code to do these things, a member of the development team specifies the desired behavior at deployment time.

Ø Member of the development team play different roles. Each is a specialist in one or more areas. For example, the content of an HTML page or stylesheet would likely be created by  graphic designer or webmaster.

Ø A senior development might be responsible for the business logic of the application encapsulated within Enterprise Java Bean components.

Ø A web developer might develop the user interface and presentation logic using Java Server Page (JSP) and servlets. An application assembler takes the various components of the application and puts it all together , often creating an Enterprise Archieve (EAR) file and creating the deployment descriptor that explains how the applocation is to be deployed. The application deployer and administrator deploy the application. By partitioning the work this way, each step of the development/ deployment process is handled by someone skilled in their area while no one has to be an expert in every area.

Ø It is highly scalable, allowing the development of systems to meet many different needs that can change quickly. When demands on the system increase , the logic can be updated easily in one place on the middle tier without having to load new logic on every client machine.

Ø New applications can integrate well with existing information systems. JDBC, a J2EE technology , is a Java API to SQL databases, permitting the access to any type of tabular data that might exist in the enterprise. The Java Naming and Directory Interface (JNDI) allows applications that use Java technology to access enterprise naming and directory services. The developing J2EE connector architecture will gave Java applications connections to heterogeneous legacy systems. The Java Message Service (JMS) is the Java API for sending and receiving messages though enterprise messaging systems. CORBA services are called using Java IDL.

Ø Security is enhanced . J2EE technologies are designed with security in mind. For example, only users in assigned roles can access certain methods in enterprise beans. Who can access these methods is not coded in the enterprise beans themselves. Instead this information is set in the enterprise beans deployment descriptors, which are used by the deployer to establish their behavior after they are deployed.

Ø Developers can choose from a variety of development tools , servers , and components to develop the applications they need. The development team can select the solutions that are best for their needs, without becoming locked into the offerings of a single vendor.

 

No comments:

Post a Comment