Вы находитесь на странице: 1из 5

java vs. .NET: Dueling Application Server Platforms?

A Stratagem Perspective

Any technology manager today who is considering adoption of either Java or .NET has a big
challenge ahead. The questions abound -- how to find good information about each platform? get
through the vendor marketing hype? sort out the marketing hype coming from internal sources?
separate the vaporware from the usable technology? avoid the unproven technology? make an
informed decision? This article will attempt to shed some light on these issues by answering the
following questions:

In brief, what is Java?
In brief, what is .NET?
Conceptually, how do the two compare?
What are the major differences?
Which one will win?
In brief, what is Java?

There's more than one answer to this question. Java is an object-oriented programming language
with a syntax similar to that of C++. It's also a cross-platform computing environment that has
been ported to many hardware / operating system combinations. Java is a collection of
technologies, called APIs, that together make up a reusable framework for developing software.

Java was developed by Sun Microsystems and first released to the public in the summer of 1995. It
has had a rapid evolution and a rapid adoption rate. While it's difficult to pinpoint how many
programmers actively use Java, there were over a million downloads of the J2SE (see below) 1.4 in
the first month after its release -- an impressive number by any measure.

Java is currently available in three editions. The Java 2 Standard Edition (J2SE) provides the
essential compiler, tools, runtimes, and APIs for writing, deploying, and running applets and
applications. The Java 2 Enterprise Edition (J2EE) defines a standard for developing multi-tier
enterprise applications. The Java 2 Micro Edition (J2ME) enables Java development on such
devices as PDAs and smart phones.

For our purposes, the most relevant of the three editions is J2EE, since that is what IT
organizations use to develop applications for the enterprise. It's important to note that J2EE is not
a product available for purchase. Rather, it is a specification that is implemented by many different
vendors in their products. For example, both IBM and BEA implement the J2EE specification in
their application servers, WebSphere and WebLogic, respectively. J2EE includes a class library used
for building enterprise applications. The application server vendors typically enhance it with their
own extensions.

J2EE is built on the foundation laid by Java 2 Standard Edition (J2SE) and other pieces of the Java
platform, including Java Database Connectivity (JDBC). J2EE adds to that base a number of
technologies, including Enterprise JavaBeans (EJB), Java Servlets, JavaServer Pages (JSP), and XML
processing.

Back to Top

In brief, what is .NET?

The short answer is that it's a brand. It's a combination of old, updated, and new technologies. The
focus is on the new technology. But even old technology, such as SQL Server, and Exchange, has
been updated and is considered to be part of the .NET initiative.

The new technology getting all the attention includes Visual Studio .NET and the .NET framework.
Visual Studio .NET is the development tool used to create .NET applications; it includes support for
VB.NET, C#, C++, and JScript.NET out of the box. Additional third-party .NET languages such as
Python, Perl, and COBOL can also be used within the Visual Studio environment.

The .NET Framework is possibly the most significant piece. In their prime, Microsoft's earlier
development tools had offered only limited innovation, and by now have grown rather stale.
Programming with the different development languages was fragmented; each one had different
data types and runtime libraries. In addition, the tools were not well integrated. In contrast, the
Framework represents Microsoft's most significant software development advance in a decade.
It's a common foundation, a large set of classes and other types, that are used from all .NET-
programming languages. Developers have a consistent foundation to work in, regardless of the
programming language they're using.

Another significant development is the new programming language C#, whose syntax closely
resembles that of Java. It is a very well designed language, and the only one designed as part of
the .NET initiative. The .NET Framework is written in C#. One would expect C# to have a relatively
rapid adoption rate.

Back to Top

Conceptually, how do the two technologies compare?

From the 30,000-foot view, these two technologies have very similar architectures. (As you can
imagine, when you get into the details required to build an actual application, they are quite
different.) Source code is written and then compiled to an intermediate form: Java byte code in
Java; Microsoft Intermediate Language, or MSIL, in .NET. A runtime engine then executes the
code: the Java Virtual Machine, or JVM, in Java; and the Common Language Runtime, CLR, in .NET.
The JVM originally interpreted the Java byte code. Most JVMs in use now perform Just in Time (JIT)
compiling, which is also what the CLR does. The code you write uses common functionality that is
part of the platform (the many APIs in Java; the .NET Framework in .NET).

Back to Top

What are the major differences between the two?

Java's focus is on serving multiple platforms; .NET's distinction is its ability to accommodate
multiple languages. These strengths, however, are not exclusive. For instance, you can program for
the Java platform in programming languages other than Java. And .NET can be ported to other
platforms.

Multi-platform development has always been one of Java's primary attractions. The JVM has been
ported to just about every platform. It's a powerful approach to programming with the same
language and same reusable framework, regardless of the target deployment platform. It's
common for Java developers to work on Windows machines and then deploy the software they
write to Unix or a mainframe.

There has been some talk about .NET running on other platforms in the future; such discussion
should probably not be taken seriously. We had similar promises in the past about porting COM
and ODBC to other platforms, but both efforts have met only with minimal success. Microsoft has
an obvious platform agenda, and that makes perfect business sense, given the central role that
Windows plays in Microsoft's business. Why would Microsoft want to encourage software
development on competing operating systems? In addition, there are significant technical
complexities inherent in porting .NET to another platform. Although MSIL is theoretically platform-
independent because it is aimed at the CLR, the CLR itself includes numerous pieces that rely
heavily on Windows-specific code. We are likely to see limited success in porting .NET to other
platforms.

That said, Ximian (www.ximian.com), a provider of open source technology for Linux and Unix, is
working to develop an open source, Linux-based version of .NET. Incorporating key .NET-compliant
components -- including a C# compiler, a CLR JIT compiler, and a full suite of class libraries -- the
Mono Project will enable developers to create .NET applications and run them on Windows or any
Mono-supported platform, including Linux and Unix. If the project is successful, it would be a very
exciting development.

One of the major selling points of .NET is its multi-language capability. It supports several
Microsoft languages right out of the box, the major ones being VB.NET and C#. In addition,
Microsoft has been working with external partners to implement other languages. For example,
Fujitsu has released COBOL for .NET. This doesn't mean a COBOL programmer is immediately
transformed into a .NET programmer At a minimum, that programmer needs to become educated
on the .NET Framework -- a sizable learning curve for anybody.

It's important to note that the programming differences among the different languages are not
great, because the programmer is always using the .NET Framework. Since the Framework is the
library of reusable code, the difference between languages is syntax -- a relatively minor
difference. Much of the learning curve would involve learning that library.

You can program for the Java platform in other languages, but it's not at all a popular approach. A
quick search on the Web would yield a large selection of Java compilers for other languages,
including COBOL, Python, Fortran, C++, SmallTalk, and Basic. Most developers feel that Java is a
great language and the best one for programming for the Java platform. So why use anything else?

Back to Top

Which one will win?

While the comparison of the two platforms is quite interesting, the answer to this question is a bit
anticlimactic. Neither one will win. Neither one will lose, either. In fact, the capabilities of the
platforms are converging as both products mature.

When the .NET architecture was initially released from beta in 1999, there were concerns about
the newness of its technologies: the framework, ASP.NET, C#, VB.NET, etc. Over the past several
years, its technologies have been tested and proven to work in mission-critical scenarios.
Stratagem has implemented several mission-critical .NET solutions for our customers, especially in
the area of Web services. Likewise, Java has been around since 1995, and has proven to be a
mature and robust platform.

Firms that have already invested heavily in a Microsoft- or a Java-based environment would
probably continue to use those respective technologies. For many other firms, particularly larger
enterprises with more heterogeneous environments, the choice of development platform is
becoming more a question of which technology is right for the specific problem to be solved and
less a question of strict corporate adherence to a particular platform. As .NET proves it is capable
of playing in the enterprise space, the choice of technology is increasingly coming down to specific
technical or business requirements, such as whether the application needs to integrate with
Office, or on issues of cost or availability of a specific group of programming resources in the firm.
Moreover, as both .NET and Java begin to embrace Web services, cross-platform communication is
becoming less of an issue. This is strengthening the trend toward mixed .NET and Java
environments.

Both are participants in the open standards community. The specifications for the .NET Framework
and the Java platform have both been submitted to the ECMA standards body, enabling others to
implement and refine these technologies in a manner such that they can be rapidly and widely
adopted on an industry-wide basis.

One might argue that without Sun there would be no support for Java, and that without Microsoft,
.NET would be .DEAD. The history of success for companies that give away the very products that
made them successful brings into question the sustainability of Sun's effort. The fact that
Microsoft has chosen to retain the rights to make money from .NET might actually enhance the
prospects for .NET to be around for many years to come. If your enterprise depends on support
from one of these companies, your decision on which approach to pursue may rest on determining
which is in a better position to be there for you in the future.

Here's the good news. We couldn't ask for a better situation. We have two major software
companies competing with each other to bring us a robust software development platform. They
will leapfrog each other for years to come, each driving the other to keep pace and to innovate.
Who wins? We all do!

Вам также может понравиться