Welcome!

Java Authors: Liz McMillan, Hari Gottipati, Tad Anderson, Yakov Fain, Pat Romanski

Related Topics: Java

Java: Article

IMHO: Blueprinting Java

IMHO: Blueprinting Java

Last year Sun came out with a new set of design guidelines for building enterprise applications using enterprise Java APIs. These APIs are available as a set of documents called the J2EE Blueprints. They include architectural design guidelines for developing enterprise applications using the Java 2, Enterprise Edition APIs.

The Silver Bullet
The primary benefit of the Blueprints is that after five years and several releases of Java platform products and APIs, there's finally a comprehensive story of how all these technologies offered by Java can plug and play together in enterprise-level applications. Using the Blueprints as guidelines also helps architects and developers make choices between alternative technologies and products, based on the constraints of their business and operating environments.

The J2EE Blueprints address enterprise application development using the design pattern MVC (Model-View-Controller) to build the underlying framework. Designing Enterprise Applications with the Java 2 Platform, Enterprise Edition (Addison-Wesley) covers the Blueprints in detail. A PDF of the Blueprints as well as a sample "Pet Store" application can be downloaded from Sun's web site, http://java.sun.com/j2ee/download.html. The sample illustrates how the Blueprints can be applied in a distributed business application.

The Whole Enchilada?
This is great stuff. You now have a single source to get all the information you need to develop enterprise-level, distributed, transactional applications using only Java technologies. Select your application server, download the appropriate APIs, and off you go. If you can, use Java APIs to create all the building blocks in your application. If you can't, there are well-defined integration points to connect to the outside world.

The real questions you should ask yourself are how much of this do you want to build in-house, and how much do you want to buy off the shelf? If you were developing the Pet Store application in the real world, you could probably build everything using your development resources. However, if you're dealing with applications that span multiple business scenarios, chances are you'll soon run into issues such as resource allocation and maintenance if you decide to build all the pieces yourself. Of course if you're in the business of building frameworks and application servers, it's a great idea to do it all yourself. However, that will be your main product, not the business applications you build on top of such frameworks.

Let's look at the presentation layer. You can use a combination of JSP, servlets, and XML to create your presentation layer. JSP can be used to create the presentation templates and guide the flow of pages by designing the layout manager for your site. Servlets can send the appropriate content into syndicated columns. And XML serves as a great format for exchanging data with the outside world. The combination of these technologies can be used to create a presentation layer for your application.

What happens when you want this framework to be generic so it can be applied across a variety of business scenarios? How much effort will be required to further abstract your design to provide templates that can be configured for different applications? This is where you'll start running into maintenance and resource problems.

If It sounds too good to be true...
Don't get me wrong. It's not that the Blueprints mislead the development community into believing that everything should be done in-house. It's just that they can be interpreted in different ways. Typically, if you were working on applications that span several business scenarios and applications, you would depend on technology vendors such as application server providers to implement the frameworks that make it all possible. And dare I say it, you would also look outside the Java world for some of your needs. A large part of the existing presentation and personalization products in the market are built on Web scripting technologies that complement Java environments. For example, companies such as Allaire, BroadVision, Vignette, and ATG provide the frameworks required to build such applications. That's the very reason they're in business.

More Stories By Ajit Sagar

Ajit Sagar is a principal architect with Infosys Technologies, Ltd., a global consulting and IT services company. Ajit has been working with Java since 1997, and has more than 15 years experience in the IT industry. During this tenure, he's been a programmer, lead architect, director of engineering, and product manager for companies from 15 to 25,000 people in size. Ajit has served as JDJ's J2EE editor, was the founding editor of XML Journal, and has been a frequent speaker at SYS-CON's Web Services Edge series of conferences, JavaOne, and international conference. He has published more than 125 articles.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.