0% found this document useful (0 votes)
80 views18 pages

By: Patrick Bailey Liz Farricker Whitney Mayoras

This document compares the J2EE and .NET platforms. It provides background on how Java was developed by Sun and packaged by IBM as J2EE. It also discusses how Microsoft created .NET in response to compete with J2EE. The main differences are that J2EE uses only Java but runs on any OS, while .NET supports multiple languages but exclusively on Windows.

Uploaded by

valtech20086605
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
Download as doc, pdf, or txt
0% found this document useful (0 votes)
80 views18 pages

By: Patrick Bailey Liz Farricker Whitney Mayoras

This document compares the J2EE and .NET platforms. It provides background on how Java was developed by Sun and packaged by IBM as J2EE. It also discusses how Microsoft created .NET in response to compete with J2EE. The main differences are that J2EE uses only Java but runs on any OS, while .NET supports multiple languages but exclusively on Windows.

Uploaded by

valtech20086605
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1/ 18

J2EE vs. .

NET

By:
Patrick Bailey
Liz Farricker
Whitney Mayoras

November 17, 2005


Introduction

In this paper we present J2EE/.NET and the intense competition between them.

Java, an object-oriented programming language, was developed by Sun Microsystems in

1994. Sun continued to make Java Application models and various tools to increase the

appeal for the Java language. IBM jumped on this opportunity and took the Java language

along with all of the application models and tools that Sun had developed. IBM packaged

this entire set-up together to create J2EE (Java 2 Platform Enterprise Edition); Sun owns

the J2EE trademark. Microsoft, being the competitive company that they are, wanted to

be in on this market as well and quickly released .NET with an Internet-ready Windows

platform. .NET was able to modify languages like Java into J#, C++ into C#, etc. and was

able to integrate them all into a single Windows platform that allows dozens of

programming languages. The main difference between J2EE and .NET is that J2EE is

only one programming language of Java but it runs on any operating system, while .NET

is multiple-language friendly, but runs exclusively on Windows.

History

Java is an object-oriented programming language developed by Sun

Microsystems in 1994. Sun continued to develop various other tools and applications,

leading to one of the company’s largest mistakes. Sun’s mistake was allowing the Java

language and the applications and tools to be available to another company to be sold for

a profit. IBM took advantage of Sun’s mistake; IBM gathered together all of these tools

relating to Java and sold it for a profit which they sell as J2EE. Sun tried to make up for

their mistake by accumulating their own, similar package which they called the Java

2
Development Kit. Despite Sun’s efforts, they are still trailing, and most likely always will

be, IBM in regards to profits from Java.

But what is J2EE?

To first understand J2EE we need to understand a little bit about the Java platform

as J2EE is a programming platform within the Java Platform.

The Java Platform

The Java Platform was designed for running highly interactive and secure applets

and applications on networked computer systems. The difference between this platform

and others is that it executes bytecode. A bytecode is the compiler output that is run

through The Java Virtual Machine. When a program is written it will be compiled down

to a bytecode file so it can run wherever a Java Platform is available. At the core of the

Java Platform is the Java Virtual Machine which facilitates portability.

There are two basic parts to the Java Platform: the Java Virtual Machine and the

Java API (Application Programming Interface).

Java Virtual Machine

The Java Virtual Machine (JVM) is a crucial part of the Java Platform. Java

Virtual Machine runs Java programs and compiles them down to a basic binary format

using a just-in-time (JIT) compiler. A JIT compiler converts the bytecode to the native

machine code during runtime.

3
Java API

An Application Programming Interface or API is a set of definitions allowing

different computer programs to talk to one another. The Java API is a large collection of

ready-made software components that provide many useful capabilities. The core API,

which is included in every Java Platform, includes all of the following features: applets,

networking, security, and JDBC (Java Database Connectivity).

J2EE Platform

The Java 2 Enterprise Edition (J2EE) is a programming platform used within the

Java platform with a set of standards that simplifies applications and provides services to

the components. J2EE is used for developing and running distributed multi-tier

architecture applications based largely on modular components running on an application

server. The J2EE platform includes many various factors:

Figure 1: Architecture of J2EE and major components

4
Figure 1 illustrates how J2EE can be run on any operating system. The

components of the J2EE architecture are explained in more detail below:

- Web client or web-pages: the main function of this interface is to translate

tasks and results into something that the user would be able to understand.

- The Java Virtual Machine: where programs are then compiled down to a basic

binary format using a (JIT) compiler.

o The EJB Server: accessed through the Servlet or JSP interface; allows

the web server to talk to the JVM.

o The EJB Server: provides services such as security, transactions, and

concurrency.

- JDBC: an API that defines how a client may access an information database

Components

Components compose the applications of J2EE, making them the key focus of

application developers. A component is a functional software unit that is self-contained

and assembled into applications. They are executables that contribute to the J2EE

applications and use a container’s protocol to communicate amongst the other

components. All of the components that are written on a Java Platform are compiled in

the same format. The only difference with J2EE is that the components are assembled

into an application, confirmed to make sure that they are well formed, and then deployed

for production where they are run and managed. Application clients and applets are

examples of components that run on the client, while the Java Servlet and Enterprise

JavaBeans are examples of components that run on the server

5
Enterprise JavaBeans

The Enterprise JavaBeans (EJB) is the server-side component of the J2EE

architecture that enables the multi-tier application to develop rapidly without complexity.

Its simplified approach allows the developer to focus mostly on business logic leaving the

framework to deal with managing the data processing. Enterprise JavaBean is a

component that executes within the EJB-container, which executes within the EJB-server.

The EJB-server also provides services such as security, transactions, and concurrency.

The EJB components will run in any EJB-compliant server without having to recompile.

There are several types of EJB components: session beans, entity beans and message-

driven beans.

Java Database Connectivity

Java Database Connectivity (JDBC) is a standard interface that allows

programmers to embed SQL commands in Java in order to access databases. There are

two parts to the JDBC. The Application-level Interface (API) uses an API for the Java

programming language that sets the standards on how a client may access a database. The

Open Database Connectivity (ODBC) is an API specification for using database

management systems (DBMS).

Clients

There are two different kinds of clients. Web clients consist of web pages and

web browsers. Web clients are also sometimes called thin clients, whom do not execute

6
difficult tasks, rather direct those towards the enterprise beans which are being executed

on the J2EE server for them to complete. Application clients provide a way for users to

handle tasks that require a better interface than the one provided by markup language. In

the business tier they directly access the enterprise beans and, if the application permits it,

they can open an HTTP connection to create communication with the web tier.

History of .NET

After the release of J2EE by IBM, Microsoft began to worry; they had not

focused on the market of Enterprise Programming Environments and did not want to miss

out on this new market. In response, Microsoft hurried to develop their own

programming environment bundle. They began with the modification of existing

programming languages to make them internet ready. Microsoft took the Java language

and modified it to become J#, an Internet-ready version. They also modified the C++

language to become C#. Their Visual Basic language, that was already internet ready,

was also used. Microsoft bundled these programming languages together with compilers,

and other tools to become their new .NET computing platform aimed at simplifying

application development and deployment in the internet age. This new competitor for

IBM’s J2EE was Microsoft’s strategy for keeping Windows the dominant operating

system on the market throughout this new market explosion.

What is .NET?

There are five main building blocks of the .NET platform. The lowest layer is the

Windows platform, which can be any of the various different versions of Windows. The

7
next level is the Microsoft .NET Framework, which is an environment for building,

deploying, and running distributed, robust, and scalable applications. The third level

consists of the .NET building block services, a set of XML (web) services that facilitate

the development of user-centric applications. The fourth level consists of Microsoft .NET

enterprise servers which are a set of infrastructure applications for building, running,

operating, and managing XML (web) services and applications. The fifth layer is the

Visual Studio .NET which is a rapid application development tool. It’s an integrated

development environment (IDE) that’s common to the programming languages included

in .NET.

Figure 2: .NET Architecture and major components

The .NET Architecture, as shown in Figure 2, runs strictly on a Windows

Platform. The components of the .NET architecture are explained in more detail below:

8
- Web-pages or web clients: run through IIS (Internet Information Systems), the

web client for Windows.

- The CLR: handles the execution of code in addition to other services such as

security, memory management, transactions, and concurrency.

o The ASP: the interface that provides computer based services to a

computer over a network.

- ADO: the layer between the programming languages and the database.

.NET Framework

The .NET framework is a computing environment that makes it easier for

application development for the distribution environment of the internet. While the two

main components of the framework are the Common Language Runtime (CLR) and

the .NET Framework Class Library, the Framework also includes Common Type System,

Windows Forms, web forms, web services, Common Language Specification, .NET-

compliant languages, and ADO.NET.

CLR

The Common Language Runtime (CLR) provides a runtime environment to

handle the execution of code and many of the core services, such as memory

management, thread management, security, transactions, and concurrency, for the .NET

class libraries. The CLR is very similar to the Java Virtual Machine (JVM) in J2EE

except for a few key differences. The JVM interprets Java Byte Code every time while

the CLR compiles applications into native machine code the first time it runs, then

9
executes these compiled descriptions each time it is run. During the compilation process

any .NET-compliant language is converted to Intermediate Language (IL) code, also

known as Microsoft Intermediate Language (MSIL) by the compiler. The IL code is then

converted to native code using the just-in-time (JIT) compiler during the runtime.

Through this process, the CLR accepts any of a growing number of the programming

languages, including C++, C#, Visual Basic, JScript (The Microsoft version of

JavaScript), J#, and COBOL, as well as numerous third party languages, and compiles

them all down to a common native language, making it possible to write various different

parts of applications in different languages without worrying about how to combine them

into one seamless code. An illustration of this common language infrastructure is shown

below in Figure 3.

Figure 3: Common Language Infrastructure: how code is compiled down to binary.

10
.NET Class Library

The second main component of the .NET Framework is the Class Library, a large

collection of 2,500 reusable value types, classes, and interfaces. These classes are divided

into various hierarchical namespaces, or groupings of related classes, so that it is easily

manageable. The two most important aspects of the Class Library are ASP.NET and

ADO.NET. ASP.NET, or Active Server Pages, provides a programming model and

infrastructure that offers necessary services for programmers to develop web-based

applications. ADO.NET, or Active Data Objects, is a set of framework database classes

that render the data-access services. ADO.NET facilitates the communication between

the CLR and the stored data.

Visual Studio .NET

Visual Studio .NET is an integrated development environment (IDE) for the

development of web applications and services, desktop applications, and mobile

applications. This environment makes it easier and more efficient to develop applications

using any of the .NET compliant languages. Text editors and command-line compilers

make it possible to develop ASP.NET applications and send them to the Internet

Information Services (IIS) server for deployment. In Figure 3, this screenshot is from

Visual Studio .NET which shows the environment that a developer works in while

developing applications and services.

11
Figure 4: (above), this screenshot is from Visual Studio .NET which shows the
environment that a developer works in while developing applications and services.
This environment allows the user to define which .NET compliant language they would
like to use before they begin writing the code. It provides the visual environment of
.NET, and is completely dependant on the rest of the .NET features.

Similarities between J2EE and .NET

There are many similarities between J2EE and .NET. Both of these applications

are object oriented. Object-oriented programming gives more flexibility regarding

changes to specific programs. Instead of a program being an extensive list of instructions

it is composed of a collection of individual units or objects. Another major similarity

between these two applications is that they both implement the multi-tiered approach as

shown below.

12
Figure 4: Multi-tier applications distributed over 3 locations.

Multi-tier applications are distributed over 3 locations: client machines, business

logic, and the database.

• Presentation Tier (Web clients): Translates tasks and results into something that

the user would be able to understand.

• Logic Tier (Business components): The logic that saves or meets the needs of a

particular business in which it basically receives the data from client programs,

processes, evaluates, and performs calculations with this data, and eventually

sends it to the EIS (Enterprise Information System) tier for storage.

• Data Tier – (EIS - Enterprise Information System): The EIS stores the data as

well as handles the EIS software, which could include ERP (Enterprise Resource

Planning); the data tier is where all information is stored and retrieved.

13
Another similarity between J2EE and .NET is that both have a virtual machine

architecture for real time code interpretation. The virtual machines compile the

programming languages down to machine-readable code. For J2EE they use Java Virtual

Machine (JVM) while .NET uses Control Language Runtime (CLR).

Table 1 contains a chart that shows all of the application similarities in regards to

what similar components they both possess. Realistically, the only difference between

these applications is the name because they primarily have the same functions serving

either for the J2EE or the .NET programming platforms.

Stack Function .NET J2EE


Relational Database Access ADO.NET JDBC
Web Client ASP.NET Java Server Pages (JSP) and
Servlets
Standalone Client Windows Forms AWT/Swing
Distributed Components .NET Remoting RMI/IDL
XML System.Xml and .NET in JAX Pack (JAXM, JAXR, JAXB,
general is built around XML. JAXP)

Messaging Microsoft Message Queuing Java Messaging Service (JMS)


(MSMQ)
Web Services Support Built directly into .NET and Java Web Services Developer Pack
Visual Studio (JWSDP) as well as vendor specific
tools.

Enterprise COM+ Enterprise Java Beans (EJB)


Components/Transactions
Integration Host Integration Server, J2EE Connector Architecture
BizTalk Server
Component Registration Active Directory Java Naming and Directory
Interface JNDI
Table 1: Similarities and Differences between J2EE and .NET

Differences between J2EE and .NET

Portability

The biggest difference regarding J2EE and .NET is portability. J2EE is portable in

that it can be implemented on any operating system, as long as it uses Java. NET on the

14
other hand, runs solely on a Window’s Platform, but can use dozens of programming

languages.

Vendor Support

.NET has only one vendor which, Microsoft, as opposed to J2EE which has

multiple vendors.

Cost

Under .NET the cost of developing applications is significantly lower since so

many various standard languages can be used, while J2EE is strictly Java which

completely inhibits that flexibility. Also the cost of running applications is considerably

lower for .NET because commodity platforms are practically 1/5 of the cost of the Unix

counterparts.

Scalability

.NET apparently is able to support at least ten times the number of clients than

any J2EE platform has been shown to support.

Framework Support and Productivity Tools

.NET has a platform that includes an eCommerce framework which is called

Commerce Server which helps developers build solutions on top of well-defined and

tested programs. J2EE has no equivalent.

15
.NET has many system libraries (Namespace) and unique development tools

(Visual Studio .NET) while J2EE has IBM’s Websphere as their best development tool

and is out of competition.

How to Choose?

Importance of multi-vendor support?

One vendor supports .NET/ multiple vendors support J2EE

How many platforms do you want to support?

.NET addresses windows platforms/ J2EE addresses a variety of platforms

How many programming languages do you want to use?

J2EE supports only Java/ .NET supports dozens of programming languages

Willing to replace/retrain your staff?

Being that J2EE supports only Java if that is the programming platform your

company should choose, that means you are either going to have to hire and/or retrain

your employees regarding the Java language. While .NET has such an array meaning that

you most likely have to retrain your staff. You just hire specific people who specialize in

the various languages.

What assets does your company already possess?

Selection may be based less upon fundamental needs of the platform, but more on

your company’s existing environment (resources, investments), personal preferences and

style.

Return on Investment?

16
For any company the big question is how much money will be saved or made

with such a large change. You absolutely need to have a return on investment otherwise

the process is not worthwhile. Which this decision ties into all the previous points in

addition to other more in-depth ones that your company needs to analyze before you go

and implement such a large change.

Future Outlook

J2EE

The future outlook for J2EE is a little bit hazy. Obviously there will be

new/updated releases for J2EE, but as for significant changes there is no telling. There

have been rumors that they are doing projects focused primarily towards mobile phones

and all other handheld wireless equipment.

.NET

As with .NET there has been the rumor going around that they are looking to

potentially becoming open source as well as another rumor for them opening up their

portability allowing them to be used on other operating systems other than Windows.

Keep in mind these are rumors and nothing has been released, but if this is where the

future is headed, J2EE might start to struggle significantly unless they have incredibly

devoted customers.

17
References:

Anderson, Tom. (2002) Investigating .NET; Available:


http://www.itwriting.com/dotnet1.php

Kramer, Douglas. (1996) The Java Platform: A White Paper; Available:


http://java.sun.com/docs/white/platform/javaplatform.doc2.html

No Author. J2EE FAQ; Available: http://java.sun.com/j2ee/faq/html

No Author. What is Java?; Available:


http://www.informit.com/guides/content.asp?g=java&seqNum=3

No Author. What is Java?; Available:


http://www.redbrick.dcu.ie/help/reference/java/getStarted/intro/definition.html

Sessions, Robert. (2001) Java 2 Enterprise Edition (J2EE) versus The .NET Platform:
Two Visions for eBusiness; Available:
http://www.objectwatch.com/FinalJ2EEandDotNet.doc

18

You might also like