Linux Application Development For The Enterprise (Charles River Media Programming)

 < Day Day Up > 


 Download CD Content

Introduction

Developing distributed Java applications is significantly different from developing applets, Swing-based GUI applications, and other desktop applications. Java comes with a feature-rich set of packages and associated framework necessary for Enterprise development. Before considering development of distributed applications, it is important to understand how it differs from desktop development. The primary difference is that distributed applications have physically separated boundaries, as the name suggests. In a typical Enterprise scenario, applications run on different machines located at different remote locations. Because the Java language has grown around the needs of Internet development, the essential features of Enterprise applications, such as security, remote object access, object serialization, and so on are prebuilt into the Java-based distributed architecture framework. Java is capable of supporting a variety of remote object access methods, such as using simple TCP/UDP socket objects, building client and server objects using the Remote Method Invocation (RMI) framework or the industry standard Common Object Request Broker Architecture (CORBA) framework, or implementing business objects using the more robust Enterprise JavaBeans (EJB) architecture, to name a few. Before deciding which type of framework to choose, it is important to understand the differences within each of these frameworks and also to understand what the developers and designers need to incorporate in their applications while using any of these technologies.

Most important of all is the process of data marshalling between the client and the server modules. In simple words, data marshalling is the implementation of an application-level protocol over the communication protocol. For example, it determines what the server response should be when the client makes a request and how the server packages the response and sends it over the wired network. At the same time, the client also should be capable of packaging its request in a way that the server will be able to understand and should be capable of unpacking the response received from the server. The TCP/UDP socket objects provide the basic-level socket implementation and are useful for anyone developing a more custom communication layer over the simple socket objects. The sockets do not provide any support for data marshalling. It is the responsibility of the designer/developer to design the custom data marshalling protocol for the application. It may not be difficult for efficient developers to develop a custom marshalling layer for small applications, but it certainly becomes a burden in large applications. However, the positive side of this is that the custom marshalling layer can be implemented as desired.

As an improvement over the simple sockets, Java comes with the Remote Method Invocation (RMI) framework, which will provide built-in data marshalling and relieve developers from the burden of implementing a custom marshalling layer. The next level of advancement over RMI is the implementation of Enterprise JavaBeans, which is based on the RMI framework and is a more robust architecture. In addition, Java also implements the CORBA-based framework and provides a number of packages incorporating the CORBA architecture to enable non-Java–based client applications to communicate with the Java-based server applications and vice versa. As discussed in an earlier chapter, because Java is a platform-independent technology, all the features of Enterprise application development are as available on Linux as they are on other platforms. For this reason, Linux is an ideal and cost-effective platform for developing large Enterprise Java applications.

This chapter is going to focus attention on the topics outlined above, starting with Java object serialization, as it forms the basis for distributing objects across the network. It should be noted that the different classes that provide distributed application development capability are bundled in both JDK (Java 2 SDK) or J2EE (Java 2 Enterprise Edition) SDK packages. Therefore, the discussion is focused on the specific features of distributed development, rather than being confined to JDK or J2EE SDK. While this chapter is going to discuss serialization, RMI, TCP/UDP sockets, and CORBA-based development and Java Messaging Service (JMS), Chapter 8,Web Development Using J2EE, is completely devoted to Enterprise JavaBeans, Java Server Pages, and the open source Jakarta Struts packages. Together, the two chapters explain the commercial tools such as Borland JBuilder, Borland Enterprise Server, and IBM WebSphere and make distributed application development and deployment an easy and productive task on the Linux operating system.


 < Day Day Up > 

Категории