J2EE versus .Net

J2EE (Java 2 Enterprise Edition) and .Net are both in their youth, but both are already de facto standards. They will be at the heart of the software development and deployment stack for the next decade or more, dominating application architectures more thoroughly than Borland, PowerSoft and Microsoft’s Visual Studio did in the 1980s and 1990s.

Should Microsoft’s .Net framework actually go on to become the preferred stack, then the company will enjoy the kind of power and influence that IBM exerted in the 1960s, when the computer industry was in its infancy.

For Sun Microsystems (the inventor of Java) and its allies – principally IBM and BEA Systems – J2EE is not just about making software development easier for their clients, it is about independence: to lose would mean conceding to Microsoft the right to dictate the shape of the computer industry from top to bottom – from the data centre to the device.

But analysts do not believe that there will be one winner. Rather, they suggest that organisations will deploy both, depending on the type of applications they are trying to deliver, with J2EE and .Net taking a 40% market share each.

   
 

What exactly are J2EE and .Net?

J2EE is not a product per se, but a specification encompassing a range of technologies for developing and running enterprise Java applications.

A Java Virtual Machine (JVM) provides the run-time interpreter required to run compiled Java code. But applications using some of the enterprise features of J2EE, such as Enterprise Java Beans (EJBs), will require a J2EE-compliant application server.

These provide services such as load balancing, transaction processing, session management and messaging so that developers of enterprise applications do not need to re-code such components with every application they write.

Microsoft .Net is based on the J2EE concept, but is supplied as a component of the Windows operating system. It provides a programming model for building, deploying and running web-based applications and XML web services.

The .Net framework is split into two main parts. The first is the common language runtime (CLR), the software infrastructure that runs the applications. Second, .Net also includes a set of class libraries to help developers build componentised applications.

Finally, Visual Studio.Net tool suite is required to build the applications, but this can be done in a variety of languages, unlike with J2EE.


How they compare

According to Forrester Research analyst Ted Schadler, .Net and J2EE each have distinct advantages and disadvantages. J2EE, he says, is optimised for the data centre and offers the greatest flexibility and control, but at the expense of complexity and cost.

In contrast, Microsoft’s .Net framework is optimised for the needs of the developer. Tools such as Visual Basic.Net are considerably easier to use than Java and, as a result, Microsoft developers can be hired more easily and for less than Java developers.

Another crucial difference between the two – at least for the present – is that .Net is tied to the Windows operating system. In order for a .Net program to run, on either a server or a client, Windows must be present.

One of the most enticing features of J2EE for major enterprises with highly heterogeneous environments to support – and absent from .Net – is the relative ease with which legacy systems can be connected to J2EE applications using third party adapters, Sun’s Java connector architecture (JCA) and Java messaging service (JMS).

In contrast, Microsoft’s messaging environment for .Net is provided by web services in a combination of the SOAP protocol and XML. However, these cannot yet provide such features as transaction support required for high-end applications.

 

 
   

   
 

Talking shop

“It will be another four or five years before all the promise of .Net really gets pulled together.”
Microsoft CEO Bill Gates

“Java won. It’s over. Ain’t even close. The world hasn’t figured it out, but Microsoft has and they don’t quite know what to do about it.”
Sun Microsystems CEO Scott McNealy

“Developers are faced with an unpalatable choice: One language for all platforms or one platform for all languages.”
A. Russell Jones, senior editor, DevX

 

 
   

   
 

A game of brinkmanship

Predictably, standards battles rage in the J2EE and .Net worlds – with all the hypocrisy and double standards that normally entails.

With .Net, Microsoft has tried to claim the moral high ground over standards.

In 2000, it took the Java-like C# development language and the common language runtime (CLR), to the European Computer Manufacturer’s Association (ECMA), one of the computer industry’s most important standards bodies.

“What this means is that the standards bodies have approved these standards, they have been ratified and they are locked down,” says Ivo Salmre, Microsoft’s product manager for .Net and developer technologies. Other companies can also adopt and use them without paying a penny in licence fees to Microsoft.

What it means in practical terms is less clear. Microsoft is still free to develop the ‘standards’ in any way it sees fit and to add its own proprietary extensions.

Sun has flirted with the idea of taking Java to an official standards body, but ultimately decided to keep it in-house.

Sun retains control of Java and J2EE through its Java Community Process (JCP), which involves companies such as BEA Systems, Oracle and IBM in the standards setting process – shutting out potentially hostile vendors, whose only motive for joining might be to cause trouble.


Quest for compliance

Sun Microsystems CEO Scott McNealy often seems ambivalent about the benefits of open source software. Sun has courted open source software in fits and starts. In August 2002, the company announced a $3 million scholarship program to help software developers build open source implementations of Java standards.

But Sun has also been embroiled in a long-running feud with the developers behind JBoss, an increasingly popular open source application server that its makers say is J2EE compliant.

However, Marc Fleury, founder and president or JBoss Group, has complained that Sun has stopped them from getting the product certified by demanding fees running into hundreds of thousands of dollars – cash the open source group does not have.

Fleury suggested that Sun simply did not want an open source J2EE-compliant application server encroaching on its patch. But Sun countered that JBoss does not implement the J2EE specification in its entirety and would therefore not win certification anyway.

Lately, however, there has been a rapprochement. JBoss says that it will stump up the money to pay for the technology compatibility kit that vendors must use to certify their products. That decision may partly have been driven by the news that the Apache Software Foundation, author of the world’s most widely used web server, plans to develop an open source J2EE compliant application server, called Geronimo.

 

 
   

   
 

Java made easier

JAVA has a reputation for fiendish complexity. But the Java community has finally started to produce some easier-to-use development tool suites for J2EE.

These include BEA Systems’ WebLogic Workshop, Oracle’s JDeveloper and Sun’s new Project Rave, which all offer a simplified, rapid application development (RAD) environment for building J2EE-based applications – “tools that mere mortals can use,” says Forrester’s Ted Schadler.

In addition, the J2EE camp has started to implement a new technique called ‘aspect oriented programming’ (AOP), which was originally developed at Xerox PARC and which Microsoft has already started to include in .Net.

The problem many developers run into is that source code can become a tangled mess, increasing complexity and cost. AOP promises to address this by abstracting out features that are common to many parts of the code. As such, AOP enables developers to attribute rules for the way in which those features should operate.

 

 
   

   
 

Watch this space

Perhaps Bill Gates had been watching too many old Star Trek or Blake’s 7 DVDs, but at the International Consumer Electronics Show in Las Vegas, Nevada, at the beginning of the year, Gates chose to demonstrate the potential of .Net by showing off his new ‘smart watch’.

The watch is wireless enabled using what Gates’ calls ‘Direct Band’, a one-way FM-based network that beams information direct to the watch, using comparatively simple tools available today.

It also, of course, features the .Net Compact Framework, a stripped down version of .Net designed especially for mobile devices. The idea of the demonstration was to show how .Net could contribute to the vision of pervasive computing.

“You can sit at a PC and write programs using a form of Basic, somewhat like the Basic that ran on that early IBM PC, and those programs get translated into .Net byte code and sent across the network down into the watch itself,” explained Gates.

 

 
   

Avatar photo

Ben Rossi

Ben was Vitesse Media's editorial director, leading content creation and editorial strategy across all Vitesse products, including its market-leading B2B and consumer magazines, websites, research and...

Related Topics