Title: Professional Java E-Commerce
ISBN: 1861004818
US Price: $ 59.99
Canadian Price:
C$ 89.95
UK Price: £ 45.99
© Wrox Press Limited, US and UK.

Reviews : Java Books :
Professional Java E-Commerce : Approaches for E-Commerce Architectures

CORBA and EJB

CORBA was originally developed to make applications communicate with each other (using interfaces), with the Interface Definition Language (IDL) to support the development of interfaces, and with the ORB providing the infrastructure to facilitate the network-level communication. This is essentially an integration problem. Let us consider two different applications, one written in C and deployed on a Unix machine, and the other developed in COBOL running on a mainframe. CORBA allows interface wrappers on top of these applications. The purpose is to make these applications communicate with each other without any dependency on the programming language or the operating platform of these applications.

You can also use CORBA to develop distributed component applications. In this case, we are not concerned about making applications communicate. The goal is instead to build applications as a set of distributed components. Although reusability is cited as one of the reasons for such an approach, the main advantage is the ability to develop loosely coupled applications. Distributed components can be easily distributed to suit specific deployment and processing needs, without ever affecting the client applications. Secondly, since distributed components are interface-centric, interfaces remain independent of implementations, and implementations can be changed without affecting the client applications.

On the other hand, the primary goal of EJB is not application integration. The basic EJB technology is not meant for building interoperable interfaces for applications developed on disparate platforms using disparate programming languages. Instead, the purpose is to provide a distributed component framework for building applications as a set of distributed components. So, although CORBA meets both these requirements, EJB is concerned only with the latter requirement – that is to build distributed applications. The following figure illustrates these differences:

The blocks on the left show how applications can be wrapped using CORBA. The rectangular blocks are the applications, and with the help of CORBA, these applications can expose language/platform independent interfaces to client applications/components. Here the purpose of the interface is to expose certain services.

Traditionally CORBA interfaces are coarse-grained, as they evolved from interfaces to applications, and applications typically provide a number of (often complex) services.

A coarse-grained interface is one that abstracts coarse concepts. For instance, a Person interface with name and address is fine- grained whereas a Customer interface with not only name and address, but also abstracting the customer relation, history, account status etc. is a coarse-grained interface.

The blocks on the right show the EJB approach. With EJBs, you design and specify a set of interfaces, and provide implementations. The rounded rectangles are objects that implement the interfaces. While traditional object modelling practices focus on abstraction and encapsulation of domain data/logic, such abstractions tend to remain fine-grained. In this case, domain concepts such as Order, Customer, Placing an Order etc. get translated into objects encapsulating respective details, and the remote interfaces (the circles in the above figure) merely expose access to these objects.

How to Add Java Applets to Your Site

New on the Java Boutique:

New Review:

Time Management Made Easy with the Quartz Enterprise Job Scheduler
Why not just use the Java timer API? This open source scheduling API boasts simplicity, ease-of-integration, a well-rounded feature set, and it's free!

New Applet:

Reverse Complement
Reverse Complement is a simple applet that converts DNA or RNA sequences into three useful formats.

Elsewhere on internet.com:

WebDeveloper Java
Lots of Java information on webdeveloper.com

WDVL Java
Thorough Java resource at the Web Developer's Virtual Library.

ScriptSearch Java
Hundreds of free Java code files to download.

jGuru: Your View of the Java Universe
Customizable portal with online training, FAQs, regular news updates, and tutorials.