The Source for Java Technology Collaboration
User: Password:



Philip Brittan

Philip Brittan's Blog

Java vs. .NET, part 4 - Java is a language, .NET is not

Posted by pbrittan on August 22, 2003 at 09:09 AM | Comments (5)

Java takes a language-specific approach to solving problems, .NET takes a platform-specific one

One of the striking differences between Java and .NET is that Java is, fundamentally, a programming language and .NET is not. .NET is a framework that supports many languages. There has been a lot of identification of C# with .NET, but C# does not equal .NET, and you don’t need to use C# in order to build .NET applications. You can use one of the 20+ other programming languages currently supported by .NET. .NET’s view of the world is from the platform. It is designed from the ground up to leverage specific aspects of the Windows platform to its advantage.

Java, on the other hand, has a language-centric view of the world. Yes, with J2EE, Java has started to create a framework around itself, and extension technologies like Jini and JXTA certainly strengthen Java’s platform, but the way in which Java attacks problems is from a language point of view.

One immediate result of this difference is that it leaves Microsoft with the opportunity to surround Java with other languages. Not only does Microsoft already control the enormously popular Visual Basic and have the ability to make C# very popular, but it can appeal to companies that already have large code-bases in COBOL, C++, Smalltalk, Fortran, and other legacy languages. Java’s answer to those folks is: port your legacy apps to Java or use some kind of awkward connector bridge between the legacy code and Java. It is not natively tolerant of legacy code.

There have been attempts in the past to support other languages with the JVM. Eiffel can compile to Java bytecode. But those efforts have not gained any real support in the Java community. Bertrand Meyer, the creator of Eiffel, writes this in a paper describing his successful efforts to connect Eiffel to .NET:

This ability to mix languages offers great promise for the future of programming languages, as the practical advance of new language designs has been hindered by the library issue: Though you may have conceived the best language in the world, implemented an optimal compiler and provided brilliant tools, you still might not get the users you deserve because you can't match the wealth of reusable components that other languages are able to provide, merely because they've been around longer. Building bridges to these languages helps, but it's an endless effort if you have to do it separately for each one. In recent years, this library compatibility issue may have been the major impediment to the spread of new language ideas, regardless of their intrinsic value. Language interoperability can overturn this obstacle.
….
The language openness of .NET is a welcome relief after the years of incessant Java attempts at language hegemony. For far too long, the Sun camp has preached the One Language doctrine. The field of programming language design has a long, rich history, and there is no credible argument that the alpha and omega of programming, closing off any future evolution, was uttered in Silicon Valley in 1995. Microsoft's .NET breaks this lock.

Everyone will benefit, even the Java community: Now that there's competition again, new constructs are—surprise!—again being considered for Java; one hears noises, for example, about Sun finally introducing genericity sometime in the current millennium. Such are the virtues of openness and competition.
Java’s language-oriented approach to solving problems can be a hindrance. For instance, when communicating over networks, a wire protocol like HTML or SNMP is going to be much more efficient than a language method call like RMI or JMX. Of course you want a nice clean API for dealing with protocols (1. to make it easy to program, 2. to make it possible to replace protocols without recoding), but the implementation should not look like a method invocation. Java’s inherent lack of support for Web Services is shocking. But the answer to that should probably not be a language API. .NET can simply expose any object as a Web Service or treat any Web Service as an object. Generators like GLUE can do this for Java, but are not integrated into the Java language (as import statements) or the compilers that would need to implement this to make it seamless and non-brittle.

In summary, .NETs multi-language support is another threat to Java. Java needs to blunt this threat. Specifically:

  • .NET will surround Java with alternative and legacy-compatible languages. The Java platform needs to become more language neutral while continuing to make Java the best language possible by dynamically incorporating new ideas such as Aspects and built-in support for Web Services.

  • Java's language-specific solutions will isolate it. Make sure technologies mesh with no language assumptions (object layout, data types, calling conventions, runtime context, etc.)

  • .NET as a platform has more hooks into the OS. Java needs to support desktop integration (icons, file linking), which is stuff that happens before any Java code gets run. This is client side, but it's all about what you can deliver end-to-end with Java application code.

  • Deploying server-side J2EE applications is a bear. Java needs platform capabilities to make this much easier. The approach of offering wizards helps, but because they are glued on, they are brittle (hard to change after you’ve gone through the process once) and not compatible between different compilers.

(To be continued. And yes, I am about to offer some hope…)


Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • JVM multi-language support
    Here's a list of other languages supported on the JVM.

    http://grunge.cs.tu-berlin.de/~tolk/vmlanguages.html

    Perhaps Sun should support the approach and hype it. (Didn't Apple run a "Been there, done that" campaign at one point?)

    Posted by: dwalend on August 22, 2003 at 10:14 AM

  • Multi-language support: Puhleaze NO!
    Ok, ok - I love jython, but really I would just as soon avoid
    projects where people are programming in different languages. Yes, I understand that someone might want to buy a library written in perl and use it in python. But I don't believe that it would really be exposed to python in a pythonic way. Nor do I really believe that Python# is really a useful and usable language. And despite what Bertrand Meyer says, I don't see the Eiffel# integration as being that good, either.

    Posted by: dancingprog on August 22, 2003 at 01:07 PM

  • Aspects
    Glad to see there is now a plan to incorporate aspect-oriented programming into Java:

    News.com: IBM, JBoss eye new Java plan

    Posted by: pbrittan on September 25, 2003 at 09:51 AM

  • 网络è¥é”€è½¯ä»¶
    网络è¥é”€è½¯ä»¶
    网络è¥é”€è½¯ä»¶
    群å‘软件
    群å‘软件
    ---
    群å‘软件
    网络è¥é”€è½¯ä»¶
    论å›ç¾¤å‘软件
    网站排å软件
    群å‘软件
    推广å°åŠ©æ‰‹ç ´è§£ç‰ˆ
    论å›ç¾¤å‘软件
    网站排å软件
    群å‘软件
    推è给你很好的群å‘软件和信æ¯ç¾¤å‘软件和供求群å‘软件
    推è给你很好的群å‘软件和信æ¯ç¾¤å‘软件和供求群å‘软件åšå®¢ç¾¤å‘软件网络è¥é”€è½¯ä»¶ç½‘络è¥é”€è½¯ä»¶
    网站排å软件网站排å软件网站优化软件信æ¯ç¾¤å‘软件信æ¯ç¾¤å‘软件信æ¯ç¾¤å‘软件论å›ç¾¤å‘软件网站推广软件网站推广软件åšå®¢ç¾¤å‘软件åšå®¢ç¾¤å‘软件

    群å‘软件群å‘软件åšå®¢ç¾¤å‘软件论å›ç¾¤å‘软件网络è¥é”€è½¯ä»¶è®ºå›ç¾¤å‘软件
    ä¿¡æ¯ç¾¤å‘软件推广软件网站推广软件网络è¥é”€è½¯ä»¶ç½‘站推广软件群å‘软件网站排å软件网站推广软件åšå®¢ç¾¤å‘软件论å›ç¾¤å‘软件群å‘软件网站排å软件网站推广软件åšå®¢ç¾¤å‘软件论å›ç¾¤å‘软件
    网站排å软件
    åšå®¢ç¾¤å‘软件
    网站排å软件
    网站推广软件
    群å‘软件信æ¯ç¾¤å‘软件
    å…费论å›ç¾¤å‘软件
    论å›ç¾¤å‘软件
    网站排å软件
    å…è´¹åšå®¢ç¾¤å‘软件
    网站推广软件

    群å‘软件
    åšå®¢ç¾¤å‘软件
    网站排å软件
    网站推广软件
    群å‘软件信æ¯ç¾¤å‘软件
    å…费论å›ç¾¤å‘软件
    论å›ç¾¤å‘软件
    网站排å软件
    å…è´¹åšå®¢ç¾¤å‘软件
    åšå®¢ç¾¤å‘软件
    ä¿¡æ¯ç¾¤å‘软件
    论å›ç¾¤å‘软件
    ä¿¡æ¯ç¾¤å‘软件
    åšå®¢ç¾¤å‘软件
    qq群å‘软件
    邮件群å‘软件
    åšå®¢ç¾¤å»ºè½¯ä»¶
    ä¼ä¸šå录æœç´¢è½¯ä»¶
    ä¿¡æ¯ç¾¤å‘软件
    邮件群å‘软件
    论å›ç¾¤å‘软件
    åšå®¢ç¾¤å‘软件
    网站推广软件
    网络è¥é”€è½¯ä»¶
    全能è¥é”€ç ´è§£ç‰ˆ
    网络è¥é”€è½¯ä»¶
    论å›ç¾¤å‘软件
    论å›ç¾¤å‘软件
    论å›ç¾¤å‘软件
    网络è¥é”€è½¯ä»¶
    ä¿¡æ¯ç¾¤å‘软件
    ä¿¡æ¯ç¾¤å‘软件
    ä¿¡æ¯ç¾¤å‘软件
    群å‘软件
    论å›ç¾¤å‘软件

    Posted by: mimi9989 on December 06, 2007 at 06:42 AM

  • wow power leveling
    wow powerleveling
    wow power leveling
    wow gold
    wow items
    feelingame.com
    wow tips
    Most Valuable WOW Power Leveling Service
    wow power leveling faq
    cheap wow power leveling
    wow power leveling
    wow powerleveling
    wow power lvl

    Posted by: wowleveling on December 13, 2007 at 12:40 AM





Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds