Slashdot Mirror


Does .NET Sound Like Java?

zero asks: "Looking over at the MS Web site, a lot of the ideas behind .NET remind me of Java - and so does the hype around it. I remember when it was said that Java would revolutionize the way things work by having applications loaded on-demand off the network (for example)... sound familiar? It would be interesting to hear what the Slashdot community thinks of what MS is doing better (or what they think they're doing better) in their plans for .NET, and how much potential they have."

10 of 469 comments (clear)

  1. .NET WILL CHANGE YOUR LIFE by Anonymous Coward · · Score: 5

    It will make your wife look better (and thinner), the flowers smell more fragrant, your black and white tv will become color and HD TV cable ready.

    Don't really understand Java? The ATL Dispinterface got you down? Don't worry, because .NET brings easy 1-2-3 COM programming to you in the form of the all powerful and easy (as in your first girlfriend) VB Script.

    10 print "I rule d00d"
    20 goto 10

  2. a mail I sent a couple of weeks ago by yoz · · Score: 5

    I wrote this a couple of weeks ago about the .NET CLR (Common Language Runtime), which is the virtual machine thing:

    This is the main bit I'm interested in. It's quite a daring move, since what
    they've done is made a virtual machine like Java's, but completely opened
    the specs and submitted it for standardisation, which is more than Sun ever
    did with Java. It's bizarre, since virtual machines promote
    cross-platformness, which is the *last* thing you'd expect MS to be
    interested in, especially given their track record. What it looks like is,
    firstly a great way to counter the DoJ (and to survive a company split, if
    the worst comes to the worst), but secondly it implies that MS have so much
    faith in their ability to write fast VMs (which, given the blinding MS Java
    VM, is not unfounded) and the Win2K kernel family as a host OS that they're
    prepared to take the challenge repeatedly thrown at them: to level the
    playing field somewhat. Plus, it makes Win32 coding a hell of a lot easier by abandoning the hell that is the existing Win32 API and MFC for something much cleaner,
    and you don't have to abandon whichever language you're coding in already,
    since the Common Language Runtime will run all of them, eventually.


    Basically, they're going to try and do a Java-like thing better than Java.
    And I wouldn't be surprised if they tried to swallow Java whole in the
    process (e.g. making the CLR run Java bytecode, or a Java language -> CLR
    compiler)


    Oh yeah, and there's all the XML stuff and
    low-level-services-provided-over-the-net thing, which is quite interesting.
    And Microsoft being the ultimate repository of all your personal data, which
    is obviously petrifying.


    Since then, I've realised a couple of other things:

    1) It's a great way for MS to move off Intel-centricity, which isn't so important on the desktop (though it'd help with porting stuff to the Mac) but is one of the main things killing WinCE development, since every time you write an app you have to compile it for every processor that WinCE runs on. And since MS is moving more and more into the embedded market, this is obviously vital.

    2) Looks like I was right on the Java-swallowing:
    http://www.theregister.co.uk/content/4/16392.html

  3. C# is like Java; .NET is XML based services by andrew+cooke · · Score: 5

    IMHO (after going to a MS /NET Developers conference) C# is like Java. .NET (which is not C#) is a general vision of XML based services on the Internet - including support in a wide variety of DB and server products for XML and related protocols (Soap et al).

    --
    http://www.acooke.org
  4. Where Microsoft may beat Java by augustz · · Score: 5
    If Microsoft can deliver on a *cross-platform* solution.

    If .NET handles the 30 odd languages they claim to support, with easy extendability for more.

    If they make .NET a standard, allow others to freely innovate on it (with none of the licensing restrictions Sun likes to impose to keep companies like IBM in line).

    If they can make sure .NET really is vendor neutral, so shipping the .NET foundation is not like shipping the JVM which is little more than a commercial Sun product.

    Then HECK YEAH, I'll take an open, free, extendible, cross-platform platform any day, especially if it ships with millions of Windows machines, has solid development tools, and is available on the platforms I like to use such as the Debian standard install (not a non-free directory).

    I think from a technical perspective the .NET platform fulfiles the promise of Java, and with things like SOAP Microsoft may indeed get the benefits of going truly open with their platform. That promise is still as exciting as when Sun made it so long ago. Finally, I can see no reason that .NET won't support Java, and C# offers a reasonable alternative from a techinical perspective.

  5. Sun had an interesting soundbyte... by dmorin · · Score: 5
    Seen on SolarisCentral:
    "In essense, while Microsoft advocates the ability to run diverse code on their platform, Sun advocates writing standard code for all platforms."

    The question seems to be how important is that whole "diverse code" thing? I mean, do I want a team of a dozen Java programmers? Or do I want 2 Prolog guys, 4 C++ guys, an APL geek... How do I crosstrain them? When people say "the best language for the task at hand" do they consider the factor of having people crosstrained in that language? Great. You know Smalltalk inside and out. You can make it run 100x faster than C++. So I implement my UI in Smalltalk. Now you go on vacation, and it crashes. I'm screwed. I can't train every programmer in every language.

  6. There Can't Be Much Difference... by Carnage4Life · · Score: 5
  7. Clue In by tjpalmer · · Score: 5
    First, let me say that I'm not much a fan of Java these days, even though I used to follow it closely.

    If Microsoft can deliver on a *cross-platform* solution.

    .NET relies on standard Windows APIs. Only a "compact" version is designed to be portable.

    If .NET handles the 30 odd languages they claim to support, with easy extendability for more.

    See Microsoft's use of future tense and this list of JVM languages.

    If they make .NET a standard, ... What motivation does MS have to lose control of their market? I don't have links readily available, but all I have heard is of MS planning to take the C# specification to ISO, which has nothing to do with standardizing their whole platform. Even if they did, any takers on rewriting Win32? Ask the WINE people how easy it is.

    If they can make sure .NET really is vendor neutral, so shipping the .NET foundation is not like shipping the JVM which is little more than a commercial Sun product.

    And .NET won't be a commercial MS product. I have not seen MS even try to claim that anything they produce for .NET won't be owned by them. Read carefully.

    Then HECK YEAH, I'll take an open, free, extendible, cross-platform platform any day, especially if it ships with millions of Windows machines...

    Aha. Windows machines. That's right. .NET is supported on Windows machines. It should make doing Windows network development nicer, with a compact version in various devices acting like embedded Java. MS supports Windows. They make Windows. What motive do they have for changing that? When did they say they were changing that?

    I think from a technical perspective the .NET platform...

    Try reading the technical documents. Here's one on SOAP. Read it. It's not that exciting. It specifies that you can use normal XML Schemas with a few extra rules and an envelope that mimics HTTP functionality.

    You can do little new with SOAP and .NET from a non-Windows computer that you couldn't do with normal HTTP and CGI. SOAP provides almost nothing on top of standard XML. There's nothing new under the sun.

    If you want open and exciting, try Linux or FreeBSD. If you want cross-platform software, try something open like C, Perl, Python, PHP, Ruby, or anything else on the list. They also interoperate just fine. Unix had cross-language interoperation working in the 70s. It's called pipes, and it's at least faster than SOAP.

    - Tom

    --

    - Tom
    "O, to grace how great a debtor daily I'm constrained to be."

  8. As a beta tester.... by rabtech · · Score: 5

    As a beta tester, I think I have a bit of authority on the subject :)

    They are doing a number of things that will make .NET more successful than JAVA, such as:

    1. Any Language. The .NET platform doesn't limit you in language choice... you can use C#, VB, Perl, or any one of the other 15 or so supported languages. Plus, the architecture is extensible, so support for additional languages can be plugged into Visual Studio with ease. I know the Java bytecode isn't tied to Java the language, but realistically, that's the way Sun as limited it.

    2. Native execution. There are two options for compilation. The first, JIT, would be used on servers and such where users upload scripts and similar items. On first run, they are compiled into NATIVE x86 code (assuming you are on an x86 processor). The other option is mostly for desktop apps: when the app is first installed, the built-in MSIL compiler reads the MSIL on the CD and writes native x86 code that is fully optimized for the processor on which you are installing... so years down the road when the Pentium-6 is out, and you install that program, it will be fully optimized for the Pentium-6.

    3. Cross-platform. Let's just say that more than Win32, MacOS, and WinCE are on the roadmap for the Common Language Runtime. More will be revealed with this in time.

    4. Security. Native x86 code is unverifiable.... you cannot guarantee that the code won't do something stupid and overwrite its own memory or deref an invalid pointer. But the MSIL is verifiable.... the system can cast all the calls it makes against its security context. This allows apps downloaded off the web to be executed, knowing that even though they are compiled down to native code from MSIL, they aren't going to do anything funky behind your back. It also gives admins in a corporation complete control. There is a lot to the security subsystem, so I suggest you read up on it for yourself.

    5. ASP Enhancements: First of all, IIS/ASP.NET will monitor all the processes and components... if there is a memory or resource leak detected (or a timer expires), it will spawn a new process and start funneling all new sessions to that process... when the last session to the old process closes, it will be terminated and the resources reclaimed.

    6. More on ASP: Secondly, when you write an ASP app from Visual Studio, you design the forms and such in a RAD environment using an event-driven model (think VB). However, the server automatically cast the forms down to the highest HTML that the browser supports.... visit the page with IE 6 and you won't be able to tell the difference between it and a regular app. Visit it with Netscape 3, and you'll see a regular static page. The difference here is that the programmer doesn't have to worry about it.

    7. Distribution. With desktop apps, an x-copy will actually suffice as the install routine. All apps install their custom components into their own dirs. The system repository tracks all versions of all DLLS installed, and automatically produces the proper version for the proper app at launch time. No more DLL hell.

    These are just some of the improvements. As far as stability goes, the pre-alpha version of .NET ran as an ASP service on a test website for 52 days before the auto-detection kicked in and spawned a new process. Since that time it ran up until beta 1, at which time it was shut down to update it. One such test website is Ibuyspy.com

    For those who automatically blast it just because it is from Microsoft, get ready to be steamrolled just like everyone else was when MS took over the world with Win3.1/95. For the rest of you, read up on the MS documents. There is a lot of good stuff in there.
    -
    The IHA Forums

    --
    Natural != (nontoxic || beneficial)
    1. Re:As a beta tester.... by erayzer · · Score: 5

      To address your points one-by-one: 1. Any Language. Fair point, a valid advantage for .NET. 2. Native execution. Native compilation exists for every platform that I've seen Java on. The on-the-fly compilation is indeed a nice feature, though. 3. Cross-platform. IIRC, Java runs on Win32, AIX, BSD, Solaris, MacOS, Linux, BeOS, OS/400, HP/UX, etc. Now. Not in the future. 4. Security. The Java sandbox and Java security policy files already provide this. Now. 5. ASP Enhancements. One could just as easily argue that a lack of support for non-ASP application servers hobbles .NET. 6. More on ASP. Yawn. 7. Distribution. Zero-impact installers come with every J2EE application server I can think of. DLL hell exists because Microsoft and it's application developers created it to begin with. Java doesn't have this issue. This isn't an automatic blast at MS, in fact my respect for them increased with the release of Win2K -- which is fast and stable, at least on my home machines. However, .NET is Microsoft's revenge fantasy having been denied the right to "embrace, extend and exterminate" Java. The vast majority of Enterprise-class web-enabled systems are now being built to J2EE. I work in that field. Java, while not fully open, is much more open that .NET or the ridiculous C#.

  9. Java is not slow by q000921 · · Score: 5
    1) The fact that it is *slooooow*..

    Java isn't slow at all. In fact, in terms of raw execution speed, it's probably one of the fastest object-oriented languages next to C++.

    What is slow about Java is its startup. And that's because you are loading a fresh JVM everytime you start up a Java application. If you did the equivalent with C/C++, you'd have to load many megabytes of libraries before you could start any C/C++ program, something that would make things like starting up any GUI app crawl to a halt. If you use Java the way those kinds of environments are supposed to be used, start up a JVM and do all your work inside that, it is very fast. Compilations fly, windows pop up instantaneously, etc.

    But since people aren't going to change their work practices overnight, Sun is working on addressing the startup speed by introducing something equivalent to precompiled, shared libraries for C++. That way, you should be able to start up JVMs very quickly.

    Incidentally, if your only experience with Java is through Netscape applets in Netscape 4, the JVM that comes with Netscape 4 is outdated and very slow. Furthermore, it takes forever to start up even compared to the unenhanced modern JVMs. Under Galeon or other browsers, applets start up quite quickly already.

    (which is sort of to be expected, it attempting to be all things to all people, not an easy task)

    Java's language design is very conservative, and it's a lot easier to compile into efficient code than, say, Perl or Python (when Perl or Python beat Java in benchmarks, it's because of highly optimized library code in those languages, not because the languages themselves are compiled well). In fact, because Java's language design is so conservative, it is actually not all that much easier to write Java programs than, say, C++; Python, Perl, and Smalltalk are certainly a lot more convenient. Java's advantage over C++ isn't convenience, it's safety, simplicity, and runtime support.

    What is really big and complex in Java is its GUI and "enterprise" libraries, and other languages should be so lucky. Swing is still by far the best designed object-oriented GUI toolkit I have ever used (and I have used quite a few). Java's database libraries are great, and so are its support for persistence and distributed computing.