Microsoft. NET vs. J2EE:
How Do They Stack Up?
What exactly is the. NET platform [and] how does the. NET architecture measure up against J2EE?
Java runs on any platform with a Java VM. C # only runs in Windows for the foreseeable future.
. NET and J2EE offer pretty much the same laundry list of features, albeit in different ways.
By allowing cross-language component interactions,. NET is enfranchising Perl, Eiffel, Cobol, and other programmers.
. NET is a good thing for those of you committed to Microsoft ubuntures.
. NET will undoubtedly become the default development environment for Microsoft platforms.
However, several of the goals of the. NET platform are fairly lofty and not at all guaranteed to fly, at least not in the short term.
It wocould be easy to dismiss. NET as more Microsoft marketing-ware and continue on your merry way. But dont.
[Microsoft is] fighting Java and open source initiatives on their own terms, putting their own spin on "open" and attempting to directly address the needs of developers.
If you consider yourself an evangelist for Java or open source platforms, then the nature of the war is changing. Be prepared.
Microsoft has put a stake in the ground with SOAP, and theyre pushing hard to put something understandable and useful in the hands of developers. J2EE proponents need to do the same with their platform.
Even if you dont write code dedicated to Microsoft platforms, you have probably heard by now about Microsoft. NET, Microsofts latest volley in their campaign against all things non-Windows. if youve read the media spin from Microsoft, or browsed through the scant technical material available on the MSDN site, or even if you attended the Microsoft Professional Developers Conference (where. NET platform was officially "launched"), youre probably still left with at least two big questions:
- What exactlyIsThe. NET platform?
- How does the. NET architecture measure up against J2EE?
And, if you think more long-term, you might have a third question rattling around your head:
- What can we learn from the. NET architecture about pushing the envelope of enterprise software development?
The. NET framework is at a very early stage in its lifecycle, and deep details are still being eked out by the Microsoft. NET team. but we can, nevertheless, get fairly decent answers to these questions from the information thats already out there. what is it? Current ruminations about. NET in various forums are reminiscent of the fable of the three blind men attempting to identify an elephant: Its perceived as very different things, depending on your perspective. some see. NET as Microsofts next-generation Visual Studio development environment. some see it as yet another new programming language (C #). some see it as a new data-exchange and messaging framework, based on XML and SOAP. in reality ,. NET wants to be all of these things, and a bit more.
First, lets get some concrete details. Heres one cut at an itemized list of the technical components making up the. NET platform:
- C #, A "new" language for writing classes and components, that integrates elements of C, C ++, and Java, and adds additional features, like metadata tags, related to component development.
- A"Common language runtime", Which runs bytecodes in an Internal Language (IL) format. code and objects written in one language can, ostensibly, be compiled into the IL runtime, once an IL compiler is developed for the language.
- A setBase components, Accessible from the common language runtime, that provide various functions (networking, containers, etc .).
- ASP +, A new version of ASP that supports compilation of ASPs into the common language runtime (and therefore writing ASP scripts using any language with an IL binding ).
- Win Forms and Web Forms, New UI component frameworks accessible from Visual Studio.
- ADO +, A new generation of ADO data access components that use XML and SOAP for data interchange.
How do. NET and J2EE compare? As you can see,. NET platform has an array of technologies under its umbrella. microsoft is ostensibly presenting these as alternatives to other existing platforms, like J2EE and CORBA, in order to attract developers to the Windows platform. but how do the comparisons play out item-by-item? One way to lay out the alternatives between. NET and J2EE is shown in the following table:
| Microsoft. NET |
J2EE |
Key differentiators |
| C # programming language |
Java programming language |
C # and Java both derive from C and C ++. most significant features (e.g ., garbage collection, hierarchical namespaces) are present in both. C # borrows some of the component concepts from JavaBeans (properties/attributes, events, etc .), adds some of its own (like metadata tags), but induplicate ates these features into the syntax differently.
Java runs on any platform with a Java VM. C # only runs in Windows for the foreseeable future.
C # is implicitly tied into the IL common language runtime (see below), and is run as just-in-time (JIT) compiled bytecodes or compiled entirely into native code. java code runs as Java Virtual Machine (VT) bytecodes that are either interpreted in the VM or JIT compiled, or can be compiled entirely into native code. |
| . NET common components (aka the ". NET Framework SDK ") |
Java core API |
High-level. NET components will include support for distributed access using XML and SOAP (see ADO + below ). |
| Active Server Pages + (ASP +) |
Java ServerPages (JSP) |
ASP + will use Visual Basic, C #, and possibly other versions for code snippets. all get compiled into native code through the common language runtime (as opposed to being interpreted each time, like ASPs ). JSPs use Java code (snippets, or JavaBean references), compiled into Java bytecodes (either on-demand or batch-compiled, depending on the JSP implementation ). |
| IL Common Language Runtime |
Java Virtual Machine and corba idl and ORB |
. NET common language runtime allows code in multiple versions to use a shared set of components, on Windows. Underlies nearly all of. NET framework (common components, ASP +, etc .).
Javas Virtual Machine spec allows Java bytecodes to run on any platform with a compliant JVM.
CORBA allows code in multiple versions ages to use a shared set of objects, on any platform with an ORB available. Not nearly as tightl |
|