How the J2EE and .Net platforms perform

November 30, 2001, 10:06 AM —  Computerworld Singapore — 

While a "90 percent overlap" exists between .Net and J2EE (Java 2 Enterprise Edition), differences in the low level language, the presentation tier and the handling of portability may influence a developer's choice of software platform.

Roger Sessions, chief executive officer of distributed software training specialist ObjectWatch Inc., noted that in J2EE, the low level language is the Java byte code whereas with .Net, it is the Microsoft intermediate language (MSIL), which ships with Microsoft's new Web services development tool VisualStudio.Net later this year.

"The design in the underlying language is different," said Sessions, who was one of the speakers at the Microsoft Developers' Fest in Singapore last week. ObjectWatch specializes in advanced training for software architects.

"Java byte code is very tightly tied to Java, and works very well for Java. MSIL, on the other hand, works with all programming languages except Java," said Sessions.

Although Microsoft recently released J#, a full implementation of Sun Microsystems' Java language specification that will run many existing Java applications after a simple recompile or binary conversion, Sessions is not convinced. "Microsoft may say that its J# is Java compatible, but it is not just a matter of syntax. It's also the Java APIs (application programming interface) and J# does not support these," he pointed out.

Depending on its existing skill sets, therefore, a programming shop may favor one technology over the other. "A programming shop with Java experience can work more effectively with J2EE, using Java byte code. But if it has Visual Basic experience, it would be more productive with .NET, using MSIL," said Sessions.

Another difference between J2EE and .Net lies at the presentation tier, which interacts with the browser, said Sessions. For Microsoft, the programming framework for this layer is ASP.Net and for J2EE, it is the Java server pages (JSP).

"Microsoft has a technology that was initially the same as JSP, called ASP (application server pages), but ASP.Net is very different," Sessions pointed out.

As he explained, four layers of code come into play in processing a browser interaction.

The three most complex of these -- the processing of the user request from the browser, state management, and the output of information to different browsers -- have been automated in ASP.Net. Programmers will thus only have to code for access to business logic, for example, to authorize a credit card transaction. And this, according to Sessions, is the simplest of the four levels.

"There is a 90 percent complexity reduction with ASP.Net compared with ASP/JSP," he said. "At some point, J2EE will have to respond."

While the technical gap between ASP.Net and JSP is likely to be closed eventually, what is likely to remain a key difference between the J2EE and .Net platforms is the different route each is taking with regard to portability.

Major J2EE vendors such as IBM and BEA support many operating systems, said Sessions. "They have chosen a portability architecture."

To run on different operating systems, J2EE-based products such as IBM's WebSphere are divided into two segments -- a main code body and a portability layer which insulates this code body from the OS, and translates it into something that the OS can handle.

The portability layer has to be kept as thin as possible because of the need to port it to different operating systems. "You should be having no more than 5 percent of code in the portability layer," said Sessions.

A second requirement for the portability layer is that the main code body cannot make calls to the OS direct. By Sessions' assessment, both BEA and IBM have been quite successful in reinforcing these requirements. The result is good portability, but the downside is poor performance. "There is another layer of software to go through, and the code cannot be optimized for the operating system," Sessions pointed out.

In contrast, the .Net approach enables the main code body to be optimized for the Microsoft operating system. The result is good performance, but poor portability.

To make a good decision, developers need to know the performance difference between the two systems and the associated cost per transaction.

Computerworld Singapore

I like it!
Post a comment
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
Free books

Essential JavaFX
Get started building rich Web apps quickly with an introduction to the power of JavaFX key features -- scene node graphs, nodes as components, the coordinate system, layout options, colors and gradients, custom classes with inheritance, animation, binding, and event handlers.Enter now!

The Nomadic Developer
Consulting can be hugely rewarding, but it's easy to fail if you are unprepared. To succeed, you need a mentor who knows the lay of the land. Aaron Erickson is your mentor, and this is your guidebook. Enter now!

Featured Sponsor

AISO founders envisioned a Web hosting company that was environmentally friendly. While the company employed energy-efficient innovations like solar panels, its infrastructure produced unacceptable power and cooling requirements. Find out how AISO leveraged AMD technology to overcome their challenge in this case study white paper.

In this whitepaper, Scalar explores the opportunity to change the landscape with respect to mission critical databases built around Oracle. Leveraging technologies such as Linux, high-end commodity processing power and Oracle RAC technology to architect, design, build and maintain database infrastructure that delivers maximum availability, reliability and performance at a fraction of traditional cost.

On a typical day, weather.com, the Web site for The Weather Channel in Atlanta, serves up between 15 million and 20 million page views. But in September 2004, when back-to-back hurricanes ransacked Florida, the peak traffic on one day more than tripled: over 70 million page views by more than 7 million unique visitors. Read the full success story now.

Marketplace