Java vs .NET
CHaN_316 writes "Yahoo is running a story called 'Is Java Finished?' It provides a brief overview of the strengths and weaknesses of J2EE and contrasts them with .NET. Classic arguments are brought up like Java being great for portability while .NET ties you down to Microsoft products, etc. It's interesting that they bring up the Java Community Process, and how it is a rather slow moving procedure that is causing Java to become stagnant."
Dot Net doesn't look like a developer panacea just yet. If Sun keeps the enhancements coming and works to bring the development environment up to Visual Studio's standards (Yes, VS has its problems, but it has a lot of unique tools, like compile-and-continue, which save hours!), Java may well survive.
Dot Net is also anything but small. It's possible to create ROMmable Java applications in just a couple megs of flash memory. On the other hand, there's no such thing as embedded dot Net just yet. And if they continue with the execution model they've currently got, any piece of code is going to net a ROM many times larger than what's possible with Java. Either way, I'll want $699 for my fp, beeyotch.
The ".Net only works on Microsoft" is more than just a classic arguement. In fact, I think it's the most important factor to take into account.
.Net will never take off. After all, it hasn't during the 3 years its been out.
If I want to make some simple embedded device, if I have to option to use Java instead of having to license Windows CE for my product, why would I ever choose MS over Java?
Having worked with both Java and .NET, I would say that things like C#'s foreach statement make for easier and cleaner code, but Java 1.5 will leapfrog C# when it introduces generics along with its own version of foreach, and other timesaving features. Java's big failing, IMHO, is Swing. It is too big and too clunky, Java is crying out for a stripped down GUI library that is part of the API spec that will be as easy to work wit
causing Java to become stagnant
Why would we not want a language to be stagnant? I wonder how much time is wasted just trying to keep up with changes to languages and development environments?
.NET ? Blowing J2EE out of the water ?
.NET ?
Are you serious ? Then:
Where is the appserver that runs
Can you cluster that appserver like J2EE-appservers ?
You would think that a language or API that doesn't change every day would be praised with words such as "standardized" "stable" and "established".
But in Bizarro World (where we all are apparently living), we criticize it as "stagnant" and "slow moving".
Compare with the OpenGL/Direct3D discussions.
Carpenters don't buy from hammer companies that change their hammers every "release".
Any article that asks that question is automatically crap. Period. End of discussion.
Business isn't willing to pay for products, innovation and careers, so we get brands, mortgage commercials and layoffs.
The same wayyou capitalize '.'
...the best comment from Kuro5hin was that the only thing he likes about .NET is that VB's backwards compatibility is broken so maybe folks will learn a real language...
C# is one programming language I've stayed away from--and for no particular reason. I had picked up the C# specification [PDF] in 2000, but never really got down to the canonical "hello world" program. Today in 2003, as I look back, I guess I haven't missed much.
Let's go back to August 2000 and revisit Hejlsberg's famous O'Reilly interview by Josh Osborn.
I'll agree with client side stuff, but I've been in a situation in the past where we developed a server size web app (in J2EE) on a single nt4 server (purely for ease of access). Then when we went gold, capacity grew and it moved to a cluster of linux servers. Then when the business picked up and capacity grew in large amounts we moved to a couple Sun E6500s. .NET wouldn't have allowed us to migrate like this.
As someone has mysteriously marked the parent as "interesting" it might be worthwhile to provoke a genuinely interesting debate below it so that readers are not too disappointed.
The parent insists that no Java IDE "can touch" VS for "any single thing you could possibly want to do", but a moment later admits that "VS.NET doesn't have as robust a feature set as some Java IDEs".
Features like refactoring, perhaps, as found on the free Eclipse IDE, or the modestly priced IDEA?
Or, looking a bit further afield, we could ask how one might develop a complete workflow system in VS, as you can in WebLogic Workshop?
My clients do these things all the time, but VS has a long way to go to offer a competitive alternative to the Java tools available now.
My favorite tool for the integration is JuggerNET, which transparently starts up a JVM in the CLR process and the developer simply codes against generated .NET classes. I am affiliated with Codemesh, so I'm somewhat biased (take a look at Stu Halloway's great website for alternatives) but working with both platforms for a living, I just can't get excited about controversial this or that is dying statements. Both platforms have their strong and their weak points.
I love the platform portability of Java, but I think Java is too closed in terns of language integration. Doing JNI by hand is an abomination, and most people at Sun admit it.
I love the language portability of .NET (it's not perfect, but then, neither is Java's platform portability) but I hate the exception model.
So, there you have it. Neither will kill each other, they will just coexist uncomfortably until they both get replaced with something new.
#1) Java was NOT originally developed for embedded systems.
I think you might be mistaken here.
Before the language was called 'Java', it was called 'Oak'. It was a language for building embedded applications on smart consumer electronics. However, Oak was way ahead of its time in terms of product targeting.
Let's say I have a class in package A and I want to move it to package B (in dotNet parlance, packages are namespaces). In dotNet, I'd have to personally touch every piece of code accessing that class and redo the import statements (dotNet: using statements) to reflect the change. Same goes for method name changes, public member changes, method signatures (parameter order, adding parameters, etc.), etc.
Also, the good refactoring IDEs provide a lot of extras like generation of getters/setters (dotNet: properties) (also referred to as encapsulation), extracting interfaces and/or superclasses, replace inheritance with delegation, replace constructor with factory method, make method static, etc., etc., etc.
Note that most of the above refactorings not only change the class in question, but also all accessing classes and methods. This sometimes means you can make a significant change to a heavily used method or class and do NO WORK to the rest of you classes.
If you are interested in the power of IDE refactoring, check out the IDEA refactoring page. Here is a screenshot of the refactoring menu.
In short, refactoring is REALLY powerful and very, very useful. If you are saying otherwise, you probably haven't used it. Also, it should be noted that several companies are making refactoring plug-ins for Visual Studio. Obviously SOME people don't think that Visual Studio's features render refactoring "unnecessary" or a "waste of time." Myself included. (I'm a Java junky programming in a dotNet environment.)
Taft