(Post 04/07/2006) In today s world of internet and web applications,
two technologies make application development easy with its features and
tools. Now, we will be comparing the two technologies in detail: The J2EE
Technology from Sun Microsystems and The .NET Technology from Microsoft
Corporation.
As they are intended at, both of these technologies focus on one common
goal, that is to build applications on a framework and provide the applications
as a service to end users.
What is .NET?
.net is a new platform for digital era which contains a set of software
bundled together.
.net Technologies
The .net Technologies is a strategy from Microsoft for delivering software
as a service.
.net framework
The .net framework is an environment for building, deploying and running
web services and other applications. It contains 3 parts: namely Common
Language Runtime (CLR), framework classes and ASP.net. Also it is packaged
with a support for XML web services.
Visual Studio.net
Visual Studio.net provides a rich set of features and productivity tools
that allows to rapidly create enterprise applications for web services
platform.
Application Platforms Today
The different applications reside over the operating systems, above which
the Runtime environment and the standard library resides. The operating
systems and the applications are distinguishly separated by standard library
and Runtime environment.
Now looking into the .net Framework
The different applications reside over the Windows operating systems,
above which the Common Language Runtime and the .NET Framework Class library
resides. The .NET Framework Class Library contains a set of libraries
like Windows Forms, Enterprise Services, ASP.net, ADO.net and other libraries.
Now looking into the Java environment
The different applications reside over the different operating systems,
above which the Java Virtual Machine and the Java Packages resides. The
Java Packages contains a set of libraries like Swing, Enterprise Java
Beans, Java Server Pages, JDBC and other libraries.
.net Framework Applications
The .net framework application depends upon the CLR known as Common Language
Runtime. The CLR provides a common set of datatypes across all the dfferent
languages supported by the .net framework. The CLR-based programming languages
generates an intermediate language.
Process of compilation and execution
In the process of compilation, the source code is compiled using the
language compiler into Microsoft Intermediate Language.
When the first time each method is called, execution takes place through
the JIT (Just In Time) compiler which compiles to native code.
Comparision of Runtime Environments
With respect to .net framework, MSIL is used as the intermediate language
and a JIT compilation is provided.
With respect to Java, bytecode is used as the intermediate language and
java VM with JIT compilation is used.
Languages in .net
Visualstudio.net mainly supports
These languages can be used for creating object oriented programs to
ensure reusability of code across different languages.
Similarities between Java and C#
Both Java and C# are object oriented with their syntax derived from c.
They support single inheritance and multiple interface inheritance.
Differences between Java and C#
C# provides attributes, properties and Direct memory access using Unsafe
code. The .net framework class library is written in c#, Accessible from
any language targeting the CLR, organized into namespaces which are below
the system namespace.
.net vs Java : Standard libraries
.net framework class library defined by Microsoft is organized into a
hierarchy of namespaces. J2SE, J2EE defined by Sun and Java community
process, is defined as packages and interfaces.
Web services support
.net framework class library:
Implements ASP.net asmx pages through system.web.services and provides
SOAP support for remote access by System.Runtime.Remoting namespace.
JAVA Class library:
With respect to implementation of Web services in JAVA, that latest versions
of JDK will be released with full support to web services.
Technology comparision in brief
|
.NET |
JAVA |
Application Server |
.net framework |
IBM Websphere, BEA Weblogic |
Runtime environment |
CLR |
JVM |
Standard libraries |
.net framework class library |
J2SE, J2EE |
GUIs |
Winforms |
Swing |
Transactions |
Enterprise services |
EJB |
Web Scripting |
ASP.net |
JSP |
Data Access |
ADO.net |
JDBC |
Small Device Platform |
.net compact framework |
J2ME |
Development tools |
Visual studio.net |
IBM Visualage for Java, Borland JBuilder |
Web service support |
ASP.net, .net Myservices |
Support from IBM and others |
(sưu tầm)
|