Rumble in the jungle: J2EE versus .Net, Part 2
Compare how J2EE and .Net build a working enterprise application
By Humphrey Sheil and Michael Monteiro, JavaWorld.com, 07/26/02
- Digg
- Reddit
- SlashDot
- Stumble
- del.icio.us
- Technorati
- dzone
In Part 1 of this two-part series, we introduced Microsoft .Net and J2EE (Java 2 Platform, Enterprise Edition) from the 30,000-foot
level. In this article, in contrast, we actually implement a representative Web based application—the Ice Cold Beer Boutique
(ICBB)—in both J2EE and .Net. To do so, we evaluate the presentation, business, and data tiers for both technologies, looking
at common services such as exception handling, caching, and configuration, as well as the technologies' tool support. We then
bring it all together to implement the sample business application. We finish by discussing the future for both .Net and J2EE.
Read the whole "Rumble in the Jungle: J2EE Versus .Net" series:
Note: Download this article's sample source code from Resources.
Web application overview
For the Ice Cold Beer Boutique application, which Sheil introduced in "To EJB, or Not to EJB?" (JavaWorld, December 2001), we chose a problem interesting enough to be nontrivial, yet simple enough to ensure that we can clearly show
each technologies' features and deficits. With that in mind, what should the ICBB application accomplish?
The Ice Cold Beer Boutique
ICBB, a business-to-business (B2B) company that sells premium beverages to resellers in Europe and the US, wants to reduce
costs and order turnaround time by allowing resellers to create orders on a secure Website. The IT strategy calls for incrementally
building up the site as demand increases.
The application's first release must:
- Be secure by allowing only authorized visitors access the ICBB Website
- Be easy to use; ICBB's CEO intends to test this feature himself
- Allow resellers to view all currently stocked beverage types and prices
- Allow an ICBB system administrator to update the details for a beverage type
- Allow an ICBB system administrator to delete a beverage product
The second release, building on that functionality, will allow resellers to create orders and schedule them for shipment.
Eventually, ICBB will integrate its Web store with its enterprise resource planning (ERP) system Sales order Processing module
so sales invoices can be raised automatically and stock information updated.
Our goal: Produce an application using a technology and design that meets these immediate requirements and admits constant
enhancements as the system expands.
Application structure
We implement a thin slice of the overall application, so you can see how the application layers communicate together. Figure
1 shows the distinct HTML pages planned for the system and how they hang together. All pages apart from the Welcome and Login
pages are secure; only authenticated users can access them.

Figure 1. The system HTML pages in relation to each other, for both J2EE and .Net implementations. Click on thumbnail to view
full-size image.
J2EE notes
Let's see how to design the ICBB application as a J2EE application, then look at the reasons behind the important J2EE-based
implementation decisions. Figure 2 illustrates how the ICBB sample application looks when implemented with J2EE.
- Digg
- Reddit
- SlashDot
- Stumble
- del.icio.us
- Technorati
- dzone
Resources
- In "Letters to the Editor'Rumble' Causes a Stir," Humphrey Sheil and Michael Monteiro respond to a flurry of reader letters
concerning the differences between application development in J2EE vs. Microsoft's .Net
http://www.javaworld.com/javaworld/jw-07-2002/jw-0726-letters.html
- Download the latest version of the Java Development Kit here
http://java.sun.com/j2se/1.4/download.html
- Download the latest version of the .Net SDK here
http://msdn.microsoft.com/downloads/default.asp?URL=/code/sample.asp?url=/msdn-files/027/000/976/msdncompositedoc.xml
- Read Humphrey Sheil's "To EJB, or Not to EJB?" (JavaWorld, December 2001), in which he introduced the Ice Cold Beer Boutique (ICBB)
http://www.javaworld.com/javaworld/jw-12-2001/jw-1207-yesnoejb.html
- GotDotNet is a Microsoft-sponsored site on .Net
http://www.gotdotnet.com
- SourceForge is an open source development Website with hundreds of Java projects hosted and available for download
http://www.sourceforge.net
- For IronFlare's Orion application server, go to
http://www.orionserver.com/
- In "The Great Debate.Net Vs. J2EE" (JavaWorld, March 2002), Jonathan Lurie and R. Jason Belanger compare J2EE's major components with .Net's
http://www.javaworld.com/javaworld/jw-03-2002/jw-0308-j2eenet.html
- Download the Ant build tool; the site also contains comprehensive documentation on getting started (it's easy!)
http://jakarta.apache.org/ant/
- Jennifer Orr's "Java's Top Guns" (JavaWorld, March 2002) lists top Java-based products in 10 categories
http://www.javaworld.com/javaworld/jw-03-2002/jw-0326-awards.html
- The OpenSymphony group produces numerous components that improve the J2EE programming experience, including a JSP/HTML cache
mechanism
http://www.opensymphony.com/
- For more J2EE articles, visit the Java 2 Platform, Enterprise Edition (J2EE) section of JavaWorld's Topical Index
http://www.javaworld.com/channel_content/jw-j2ee-index.shtml
- Talk about J2EE and .Net in our Enterprise Java discussion
http://forums.idg.net/webx?50@@.ee6b80a
- Sign up for JavaWorld's free weekly Enterprise Java email newsletter
http://www.idg.net/jw-subscribe
- You'll find a wealth of IT-related articles from our sister publications at IDG.net