Advantages Of .NET Over Java
ansonyumo writes "ZDNet is carrying an article written by one John Carroll that outlines specific advantages of .NET over Java. It's written from the point of view of a Java advocate who has 'seen the light.' First of all, comparing .NET and Java isn't very fair; you have to compare .NET and J2EE. When you level the playing field, most of his arguments readily fall apart."
when you compare to the correct language structure, so what? What's important is PHB's will probably be reading articles like that, and will point to said articles in justifying going with a microsoft centric language (along with IEEE, ECMA standardization, etc.) The article simply underscores that a wide and varied skillset is what's going to keep a developer alive in today's environment. Sun's not exhibiting the best of business decisions lately, and if they want to stay afloat, they need to come up with someone to answer .Net effectively in popular media. Posting articles on slashdot saying "look at this! it's not accurate!" isn't a great way to promulgate usage of your favorite language either...
Not surprisingly, ZDJava has an article that praises Java over .NET
Best Windows Freeware
"Of course, .Net is still a mostly Windows party, while Java offers the chance to work on a large number of platforms. As I've noted, however, Mono offers a complete implementation of the .Net Framework for Linux, and there are companies already who promote their .Net product's support for non-Microsoft systems."
.net implementation? as in everything that goes around the shisbang too?
.net..
is mono really comparable to the microsoft windows
mostly the article just goes on through javas features and glorifying their counterparts in the
i know java isn't _totally_ universal itself either (i'm not aware of implementation for my other computer running beos.)
world was created 5 seconds before this post as it is.
will the eventualy release office and other big apps in the .net framework and then maybe they can be run in Linux with the .net framework ports
First off, I have to give him some credit. This is the first time I've ever seen a specific breakdown of exactly what
But would I trade J2EE for this? Not on your life. All of this stuff can be done in one way or another with Java, and Java is still way more mature in most respects. I mean, I'm assuming that since he chose to highlight these features, they're probably the most significant, and if this is the best that
If I was going to develop a new Windows app, I'd be doing it in
Will system designers go after M$'s stuff after what M$'s attitude and history in the past 10-15 years been. I mean M$ proved that it does not seek best performance, is not after user's intrest, does not care for for service. It cares for the greens. In the past few years they did a lot of stuff that made it clear now that they were putting us in a box that can stick us to use there products only(with no respect to its quality)
/*Why is there a penguin on my desktop?!*/
so the real question is are you willing to go through this again?
The lunatic is in my head
I don't do a lick of Java or
It's only available for x86 computers that run Windows.
No mainframe support.
No cluster support.
No Solaris,Unix,*BSD,OS/2, Win95, Mac 9, Mac X, AIX, IRIX support.
No Aplha, SPARC, PowerPC, Motoroal 68xxx suport.
So sure,
* parts of the
Moneyed corporations, non-working 'poor' and criminal prisoners are turning productive citizens into tax-slaves.
A lot of this is basically a load of crap. Plenty of people use XML for configuration issues. I personally still use text for most of my config files, just because it requires simpler and easier code.
And all of the default configuration files in J2EE ARE xml. web.xml,ejb-jar.xml, whatever.
Also, what's so great about having your "system wide " xml parser? In my world, you specifically don't create environment variables for your XML jar's because that makes it a common resource and creates conflicts. What if you want to use a different parser and both parsers have a class called XMLParser? How does MS deal with knowledge of which is which. J2EE servers (for the most part) simply provide application level resources (WEB-INF/lib and WEB-INF/classes) and server-level resources (app-server/lib).
Next: Metadata: XDoclet provides this ability and a lot of people use it. More importantly, it's not tied. You can use your own system.
Next: I honestly don't know enough about assemblies, but it does look like there are some cool things in there. I have to admit, CLASSPATH for Java can be clunky. However, JAR/EAR/WAR is pretty good stuff, and does most of what people need.
Next: The remoting issue is a non-starter. The protocol is really up to the vendor, and some vendors provide proprietary, somy RMI/JRMP, some strict RMI-IIOP. SOAP also changes some of this (no advatages to either side).
So blah, for the most part.
--Stupidity is Self Curing!
I don't necessarily agree with the article itself in some points, but I can't see how the comparison is "unfair" because it's not being made to J2EE but the Java 'platform' (Sun's words, not mine) itself. C# vs. Java would be a completely different thing, but that would be based on the features of the language and the runtime library. J2EE is just an extension of that.
For more info, check this Register article:2 7833.html
.NET implementations of a Pet Store web store.
http://www.theregister.co.uk/content/4/
Its got some good benchmarks of real-world, optimized J2EE vs.
Very informative (though obviously, benchmarks should be taken with a grain of salt).
Still, I think .NET is going to be a disaster. Microsoft is trying to make it do too many things at once. To them, it's not just a new enterprise software platform. It's a fix for all the shortcomings of the NT API. It introduces all the new programming features they never tire of dreaming up. And it does all this while retaining support for legacy languages, such as C++. AND .NET is supposed to maintain an easy migration path for Java programmers -- one that will make it impossible for them not to switch.
It just won't fly. They're trying to do too much, and they're making the same mistakes they made with NT and Win16. And even if they went at it right, .NET could never hope to make more than modest inroads into the Java marketplace. Too much investment in an established technology. (Microsoft ought to know better, given the way they've benefited from that same principle.) The best they can really hope for is to find a niche where .NET excels, such as Web Services. This would parallel the career of other technologies (Cobol, PL/1, SQL, and of course Java itself) that were supposed to take over the world, and ended up just finding their own place in it.
I've used Java longer than the reviewer -- since it was an alpha. I still use it and am an official participant in the JCP. I plan to continue using Java, probably for years to come.
.Net, though .Net's have the benefit of learning from Java's mistakes. (A nice, consistent way of converting between fundamental data types, well-designed containers, etc.)
.Net classes) have over Java. All the anti-MS bigots don't make that easy, though.
That being said, I find the C# language to be significantly better designed than the Java language. Things like delegates are a great improvement over interfaces. When Anders Hejlsberg was still at Borland, he tried to persuade Sun to use them in Java instead of the interface approach and they just blew him off. "Syntactic sugar" they called it, and then they went ahead and implemented their own syntactic vinegar. I'll take the sugar, thank you.
Using "properties" in an OO language is a natural.
a.b.c++ calls a set() method instead of directly accessing a member var named c. (The c property may not even be backed by a variable. It may be calculated on demand.) In Java, to use OO methods instead of exposing private variables, you would do something like
a.getB().setC(a.getB().getC()+1);
although usually it would be broken into several simpler steps with temp variables for ease of reading.
C# makes it a breeze to create visual interfaces to object properties without losing the encapsulation of the implementation of those properties.
There are so many other improvements in C# relative to Java that it really annoys me to hear the political refrain "C# is just a knock off of Java". It's such a superior "knockoff" that, for the first time in years, Sun has gotten back in the mode of making language improvements (all of which make it more like the "knockoff") instead of their knee-jerk "you're not language designers so, trust us, you don't need that" reaction of the past.
The Java class libraries are far more complete than those of
I now find myself in the position of using C# when I can (mostly for personal utilities) and Java when I must (for professional production). Since I strongly prefer to use Linux servers and strongly prefer to avoid the MS license ball-and-chain, I anticipate having to continue using Java for years.
While doing so, though, I will continue rooting for Mono and working thru the JCP to try to steer the Java language to embrace and extend what I consider the significant advantages C# (and to some extent the
"Those who have never entered upon scientific pursuits know not a tithe of the poetry by which they are surrounded."
this may not be the most relevant thing in the world but...
Wow. i'm thinking that this guy is just a bit out of touch with the programming community. i know we're not all geeks who collect comic books and what not, but to suggest that it would be strange for a programmer to like comic books... i'd like to think he's being sarcastic here, but it sure doesn't seem like it from the context.Stupidity may be self-curing, unfortunately, it reproduces prior to the cure.
-pyrrho
Not long after the Cobol disaster (too many syntactic niceties), the programming language community swung the other way and since the 1970s has opposed most niceties in a language as "syntactic sugar". Sure enough, the C code:
x = y + z;
is nothing but the syntactic sugared version of
LDA Y
ADD Z
MV X
SO?? Isn't the C version far superior nonetheless?
Fabulous.
.Net."
.ini files and on each occasion the Microsoft developer wankfest assured us that "THIS IS IT!!!".
"In contrast, XML permeates every corner of
Last year all configuration was being held in Active Directory. The year before that all configuration was being held in the registry (I can't remember the name of the IIS specific registry thing to rant about it). The year before that we were all supposed to be using
What is wrong with the world? It's almost like there's a constant torrent of naive Microsoft fanboys dropping into the workforce under the impression they're software engineers.
Dave
I write a blog now, you should be afraid.
The IIS "registry-like-thing-that-is-not-the-registry" is the IIS Metabase. Most people who know about it do so because it has become corrupt on them. COM+ has a similar "registry-like-thing-that-is-not-the-registry" called the COM+ catalog.
It's owned/created by Microsoft.
It's new and costs money/time/pain to switch, for hard to see benefits.
(Justified in my opinion.)
"I only speak the truth"
Karma: null(Mostly affected by an unassigned variable)
I understand the aversion the Java designers felt for "syntactic sugar". They equated it with the spiral of Perl into syntactic chaos.
.Net runtime made a lot more effort to include features in the bytecode system that will enable languages to use generics, multiple dispatch, multiple inheritance, tail calls, and others, which could support more interesting languages (or new C# features) in the future than may be practical with the JVM. (I'm not an expert on that last point, so consider it a *rumor*).
I understand it, but don't accept it. I think that the best programming language is the one that makes you tell the computer the fewest number of things to get it to do exactly what you want it to do.
I think the Java designers were way too conservative about syntax and way too conservative about incorporating popular, proven features from other languages. They should have had smarter enums than C++, not no enums. Smarter function pointers than C++ (delegates, for example) instead of no way to pass a single function as an argument, etc.
And more syntactic sugar of the sort you see in Python and Ruby.
Java is a very solid, valuable production platform as it is, but I think Java would be a better *language* if it were a little more like Python and less like a simplified C++.
Of course, I could say the same about C#, which obviously didn't want to venture too far from the familiar features of Java, C++, and VB. My understanding, though, is that the designers of the underlying
"Those who have never entered upon scientific pursuits know not a tithe of the poetry by which they are surrounded."
Hi,
.NET ;)
Even Sun admits that Java has a problem using to many resources for small tasks.
I don't know if that is better than
The Java Problem
Author: Julian S. Taylor
Reviewed by: Steve Talley, Mark Carlson, Henry Knapp, Willy (Waikwan) Hui, Eugene Krivopaltsev, Peter Madany, Michael Boucher
Executive Summary
While the Java language provides many advantages over C and C++, its implementation on Solaris presents barriers to the delivery of reliable applications. These barriers prevent general acceptance of Java for production software within Sun. A review of the problem indicates that these issues are not inherent to Java but instead represent implementation oversights and inconsistencies common to projects which do not communicate effectively with partners and users.
Within Sun, the institutional mechanism for promoting this sort of communication between partners is the System Architecture Council codified in the Software Development Framework (SDF). We propose that the process of releasing our Java implementation will benefit from conformance with the SDF.
Introduction
This document details the difficulties that keep our Solaris Java implementation from being practical for the development of common software applications. It represents a consensus of several senior engineers within Sun Microsystems. We believe that our Java implementation is inappropriate for a large number of categories of software application. We do not believe these flaws are inherent in the Java platform but that they relate to difficulties in our Solaris implementation.
We all agree that the Java language offers many advantages over the alternatives. We would generally prefer to deploy our applications in Java but the implementation provided for Solaris is inadequate to the task of producing supportable and reliable products.
Our experience in filing bugs against Java has been to see them rapidly closed as "will not fix". 22% of accepted non-duplicate bugs against base Java are closed in this way as opposed to 7% for C++. Key examples include:
4246106 Large virtual memory consumption of JVM
4374713 Anonymous inner classes have incompatible serialization
4380663 Multiple bottlenecks in the JVM
4407856 RMI secure transport provider doesn't timeout SSL sessions
4460368 For jdk1.4, JTable.setCellSelectionEnabled() does not work
4460382 For Jdk1.4, the table editors for JTable do not work.
4433962 JDK1.3 HotSpot JVM crashes Sun Management Center Console
4463644 Calculation of JTable's height is different for jdk1.2 and jdk1.4
4475676 [under jdk1.3.1, new JFrame launch causes jumping]
In personal conversations with Java engineers and managers, it appears that Solaris is not a priority and the resource issues are not viewed as serious. Attempts to discuss this have not been productive and the message we hear routinely from Java engineering is that new features are key and improvements to the foundation are secondary. This is mentioned only to make it clear that other avenues for change have been explored but without success. Here we seek to briefly present the problem and recommend a solution.
Defining the Java Problem
These are the problems we have observed which we believe indicate the need for an improved implementation and a modified approach.
1. The support model seems flawed
Since Java is not a self-contained binary, every Java program depends fundamentally upon the installed Java Runtime Environment (JRE). If that JRE is broken, correction and relief is required. This sort of relief needs to happen in a timely manner and needs to fix only the problem without the likelihood of introducing additional bugs. Java Software does not provide such relief.
Java packages are released (re-released) every four or five months, introducing bug fixes and new features and new bugs with each release. These releases are upgrading packages which remove all trace
C of pointers, which seem much too similar to machine language memory pointers.
They are.
One statement in the article stands out as inaccurate or misleading. You can run multiple versions of an assembly, but not if you want to dynamically load and unload assemblies. If you want to load/unload assemblies, you have to use a different appDomain for each assembly. This way you can unload an assembly by killing the appDomain. The problem the author describes is well documented and part of many Java specs. Specifically the servlet specs explicitly require each webapp have it's own class loader for that reason. I would argue having multiple versions of an assembly or jar file within the same app domain or classloader is not a clean solution. It is better to isolate versions in individual domains.
This way, you completely avoid the issue of collision and provide cleaner separation. But that's my own bias. there are still tons of stuff
It's already ported to a slew of platforms so you're never locked into one operating system (Windows). It's proven, and reliable, and has a huge backing already. Anything that can be done in .NET can already be done in Java (Web Services, Programs, Applets).
- tristan
The second issue is targeting different types of mobile devices. MS has done some good work with abstracting and supporting many different devices. I haven't had time to personally compare the J2EE efforts.
Third is cost. There's just no denying that for small and medium sized applications, open source / J2EE is much cheaper. All one has to do is look for entry web hosting with say 400 MB space and an SQL database. A .NET environment will run you $75+ per month versus an open source environment at $20/month. I have to assume that difference remains as one scales higher.
C#.NET advantages come
.NET will last forever in general application development. App development with ATL, Win32, x,y,z is a nightmare in some respects. .Net will do for windows what Java has done for computing.
1) from taking everything good in java
2) adding cleaner COM+ integration and windows integration.
Thats it.
Now Java 1.5 will fix alot of issues i have with java and it removes one of the reasons (1) for moving to C#.NET.
(2) is going to be difficult for java to level. Having said that, (2) is the reason why
This is the first time I have posted at slash dot and I made the mistake of posting as HTML without including any
's I apologise if this makes my response difficult to read.