Rumble in the
jungle: J2EE versus .Net, Part
1
Tutorial Details:
Rumble in the jungle: J2EE versus .Net, Part 1
Rumble in the jungle: J2EE versus .Net, Part 1
By: By Humphrey Sheil and Michael Monteiro
How do J2EE and Microsoft's .Net compare in enterprise environments?
ith the advent of .Net, Microsoft introduced an enterprise computing platform able to compete toe-to-toe with Sun Microsystems' J2EE (Java 2 Platform, Enterprise Edition). Microsoft's move leaves J2EE developers with two options: ignore .Net or analyze it. In this article, we choose the latter, analyzing and comparing the two technologies.
Both platforms feature innovative ideas?ideas that should cross pollinate, not stagnate on one specific platform. Furthermore, we all want technologies that add the best business value and are cutting edge, not bleeding edge! So, which language works better?.Net's C# or Java? Is .Net poised to sweep all before it or is Microsoft's mighty marketing machine simply desperate to make you think so? Well, in this two-part series we'll dive into the technologies to find out.
Read the whole "Rumble in the Jungle: J2EE Versus .Net" series:
Part 1: How do J2EE and Microsoft's .Net compare in enterprise environments?
Part 2: Compare how J2EE and .Net build a working enterprise application
In this article, we first examine J2EE and .Net in turn, then line the technologies up to understand how each approaches common enterprise problems. To actualize the terms and concepts introduced here, we briefly introduce our sample application: the Ice Cold Beer Boutique. In Part 2 we will focus exclusively on its background code and architecture of both J2EE and .Net implementations.
What is J2EE?
When thinking of the Java 2 Platform, Enterprise Edition, the key word is platform. Java represents more than just a programming language, as it encompasses the VM technology that lets compiled Java programs run unaltered on various machine architectures; tools to compile, analyze, debug, and deploy Java programs; and other components, such as browser plug-ins, rich media, and more. Talk about feature creep!
The three faces of Java
About two years ago, Sun reorganized the Java platform into three profiles:
The Java 2 Platform, Micro Edition (J2ME), for handheld and other lower-end devices
The Java 2 Platform, Standard Edition (J2SE), targeted at desktop machines
The Java 2 Platform, Enterprise Edition (J2EE), installed on servers and responsible for the heavy lifting in the Java world.
Although it's something of a simplification, you can think of J2ME as a subset of J2SE and J2EE as a superset of J2SE.
Our J2EE definition
Definition: J2EE is a Java-based technology stack, built on top of J2SE, that provides developers with the development tools and runtime capabilities necessary to build enterprise applications meeting rigorous uptime, security, scalability, and maintainability requirements.
The latest version of J2EE is 1.3. Sun uses the J2EE platform to synchronize the constituent technology specifications for specific releases. Here's a partial J2EE components list:
JavaServer Pages (JSPs): Generate dynamic content for Web browsers and mobile devices. JSPs resemble HTML, especially when developers use custom tag libraries to remove Java code from the JSPs themselves, making them easier to maintain.
Servlets: Build control and navigation logic into J2EE applications, typically following a Model-View-Controller design pattern in conjunction with JSPs.
Enterprise JavaBeans (EJBs): The mainstay of the J2EE platform. There are two main types of EJB: session beans that model business logic and entity beans that model persistent data. When coded correctly, EJBs provide transparent scaling, a security framework, a transaction model, and a container-managed life cycle.
Java Connectivity Architecture (JCA): Lets Java enterprise applications interface with existing non-Java enterprise applications like SAP. Specifically, transactions and security roles can propagate, allowing you to fully utilize legacy applications in a J2EE architecture.
Java Message Service (JMS): Provides asynchronous messaging capabilities to the J2EE platform. Established message-oriented middleware (MOM) vendors like IBM (MQ Series) and Tibco (Rendezvous) provide JMS faces to their products.
Java Management Extensions (JMX): Manages J2EE servers and applications.
Java Naming and Directory Interface (JNDI): A required part of the J2EE platform, JNDI provides component location transparency in a clustered J2EE environment.
Although the following components are technically part of J2SE, they prove important for J2EE applications as well:
Java Database Connectivity (JDBC): The real bread and butter of any enterprise application! JDBC handles all database input/output via SQL.
The HotSpot Virtual Machine: Can run in server mode to better profile long-running applications with stringent requirements for thread and memory management. The HotSpot VM has addressed most of the initial concerns about J2EE's performance. Figure 1 depicts these components as a J2EE technology stack.
Figure 1. High-level overview of the J2EE technology stack. Click on thumbnail to view full-size image.
The Java community: Spirit and ethos
In addition to these technologies, the Java platform boasts another important feature: the Java developer community.
With Java, you'll find free, open source tools, such as Ant (a build tool), JUnit (a testing framework), JBoss (an application server), and NetBeans (an integrated development environment, or IDE). More exist? SourceForge lists hundreds of Java-related initiatives.
Moreover, look at the curriculum for any third-level teaching institution. In many such schools, students learn programming by studying Java. The same phenomenon pushed Unix from a 1970s research curiosity to the operating system that it is today. What's my point? The students of today are the programmers of tomorrow, and they are learning in Java and Unix.
What is .Net?
So what exactly is .Net? Unlike J2EE's specification set, .Net is a suite of shipping products (although some parts of .Net have been ratified as international standards by the European Computer Manufacturers Association (ECMA)).
According to Microsoft, ".Net is a set of Microsoft software technologies for connecting your world of information, people, systems, and devices."
Well, that clears things up! The truth is, .Net evades easy definition because it covers so many topics. Some define it as a development platform for building XML Web services, while others think it's a set of enterprise servers. Both lines of thinking prove correct, although neither tells the whole story. To get a clearer picture, let's peek at .Net's basic elements:
Smart client software: Software for running a variety of smart clients, from personal computers (Windows XP), to small-footprint devices like PDAs (Windows CE .Net), to set-top devices (Windows XP Embedded).
XML Web services: Let applications share data and consume services provided by other applications without regard to how those applications were built, what platform they run on, or what devices access them. .Net includes implementations of the latest accepted Web service standards, such as the XML Schema standard. In addition, Microsoft plans to provide many commercially available foundation services, called My Services, to serve as application building blocks. As a recent example, the MapPoint.Net Web service integrates maps and driving directions into applications. (That effort, however, has recently lost some momentum because partners have been slow to jump on board.)
Enterprise servers: Products that support enterprise applications by addressing different parts of the overall solution. Among the offerings in the mix are Application Center for deploying and managing Web applications, BizTalk Server for coordinating XML-based business processes across applications and organizations, and the SQL Server database application.
Development tools and the runtime environment: Includes Visual Studio .Net, a single integrated development environment for building .Net applications, along with the .Net Framework, which in turn includes the Common Language Runtime (CLR), ASP.Net (a new Web development environment for building Web applications and XML Web services), and an extensive set of framework class libraries.
Figure 2 below illustrates the pieces of the .Net Framework.
Figure 2. The .Net Framework. Click on thumbnail to view full-size image.
As you can see, .Net covers a lot of ground.
Note: From here on out, when we talk about .Net, we're specifically referring to .Net Framework.
Line them up
In this section, we show how J2EE and .Net solve common issues developers face when architecting a system. To help frame the discussion, we present each issue within the context of the layer where it is most relevant. The four layers we'll cover are presentation, business, data, and runtime. Additionally, Figures 3 and 4 depict the logical architecture of Part 2's sample application for J2EE and .Net, respectively.
Figure 3. Illustration of the sample application architecture under J2EE. Click on thumbnail to view full-size image.
Figure 4. Illustration of the sample application architecture under .Net. Click on thumbnail to view full-size image.
Presentation layer: HTML generation
How do the two competitors handle HTML generation?
J2EE: JSPs and servlets generate HTML for J2EE applications. The servlet containers include such features as session state, a security framework, and configuration. Tag libraries allow the developer to cleanly separate presentation code from control and business logic and also make the JSPs readable to HTML coders. A new initiative called JavaServer Faces aims to extend JSPs to allow developers to specify UI (user interface) components, event handling for HTML widgets, data validation, and navigation. Currently, you can handle such tasks with presentation frameworks such as Struts, Webwo
Read
Tutorial at: Click here to view the tutorial
Rate Tutorial: Rumble in the
jungle: J2EE versus .Net, Part
1
View Tutorial: Rumble in the
jungle: J2EE versus .Net, Part
1
Related
Tutorials:
Programming Java threads in the
real world, Part
1 - JavaWorld -
September 1998
Programming Java threads in the
real world, Part
1 - JavaWorld -
September 1998 |
The state of Java middleware, Part II: Enterprise JavaBeans - JavaWorld - April
1999
The state of Java middleware, Part II: Enterprise JavaBeans - JavaWorld - April
1999 |
JavaWorld - Net News
Central
JavaWorld - Net News
Central |
JDBC drivers in
the wild - JavaWorld July 2000
JDBC drivers in
the wild - JavaWorld July 2000 |
C# : A language alternative or just J--? (part1)
C# : A language alternative or just J--? (part1) |
Take control of the servlet environment, Part 2 - JavaWorld December 2000
Take control of the servlet environment, Part 2 - JavaWorld December 2000 |
XML messaging, Part 1 - JavaWorld March 2001
XML messaging, Part 1 - JavaWorld March 2001 |
Breathe intelligence into Java - JavaWorld April 2001
Breathe intelligence into Java - JavaWorld April 2001 |
Web services hits
the Java scene,
Part 1
Web services hits
the Java scene,
Part 1 |
Achieve strong performance with threads,
Part 1
Achieve strong performance with threads,
Part 1 |
Rumble in the
jungle: J2EE versus .Net, Part
1
Rumble in the
jungle: J2EE versus .Net, Part
1 |
Rumble in the
jungle: J2EE versus .Net, Part
2
Rumble in the
jungle: J2EE versus .Net, Part
2 |
Jini's relevance emerges, Part
1
Jini's relevance emerges, Part
1 |
Java is here to stay (JavaWorld / January 2000 / by John Rommel)
Java is here to stay (JavaWorld / January 2000 / by John Rommel) |
A first look at JavaServer Faces, Part I
A first look at JavaServer Faces, Part Learn how to implement Web-based user interfaces with JSF |
Let the mobile
games begin, Part 2
Let the mobile
games begin, Part 2 |
JLAN Server v3.3
JLAN Server v3.3
JLAN Server is a high performance JavaTM based file server supporting Windows file sharing (SMB/CIFS), NFS and FTP protocols.
Write your own virtual filesystems with the core server handling all protocol exchanges with the client.
Incl |
JavaRSS.com 2004: Review of the Year
A look back at the major events of 2004 in Java. |
Interoperability with Patterns and Strategies for Document-Based Web Services
In Part 2 of this article, we demonstrate interoperability for document-driven web services with Microsoft .NET (C#) using strategies discussed in Part 1. |
Domain Registration Guide
Domain Registration Guide
Domain Registration Guide
What is Domain?
Internet is the large network of computers. On the Internet there should be some way to identify the computers. Domain name is the solution for this. Domain Name is the unique |
|
|
|