Matt Hughes asks:
"When does one programmer's preferences (Java over Microsoft-anything because they hate Microsoft, or Microsoft over open-source because open-source is evil) and the variety of choices start to erode productivity? As a J2EE developer for the past few years, I admit that I've become frustrated at the number of choices out there. Every one offers a different way of doing things but they don't all interoperate (JBuilder doesn't natively understand Struts) and none of them -- in my experience -- pulls all of the web technologies together very succinctly. Does Visual Studio .NET and the .NET framework pull this together better than the open-source projects out there, or is it just as complicated in your experience? Is .NET too immature to be trusted? What are your thoughts?" For those interested in the raw performance numbers, Slashdot did a
performance comparison between the two technologies, in an earlier article.
"I've recently been asked to produce a report listing the pros and cons of J2EE and .NET as a web application development platform. I've been using J2EE for years now and haven't even touched .Net as I dislike most Microsoft products. However, for the report, I am trying to be objective. From my own experience and from what I've read, it seems the defining issue for some people is choice.
As far as language preference, some argue Microsoft allows too much (VB.NET, C#, and supposedly everything else *eventually*) and J2EE too little (Java). As far as development environments, Microsoft offers too little (Visual Studio .Net, Windows Server 2003, Windows only) and J2EE
provides too much (JBuilder, Eclipse, Tomcat, JBoss, Websphere, any OS/hardware combo, etc)."
Struts (Score:2, Informative)
Daniel
Looking for Trolls? (Score:5, Informative)
Having said that, I do note that you are perpetuating the myth that Java runs on "any OS/hardware combo". This is untrue of any language but I suspect "C" comes closer to achieving it than Java.
Re:Looking for Trolls? (Score:3, Informative)
Daniel
Re:Looking for Trolls? (Score:3, Informative)
Re:Looking for Trolls? (Score:2)
We recently acquired a company that had a web site built on the Weblogic J2EE platform, running on an HPUX machine. For whatever reason, we didn't acquire the whole company so we lost the licensing for Weblogic in the deal. Rather than pay BEA, we tried to move the site over to Oracle's app server which we already have paid for.
It most certainly did not work without a glitch. Apparently Webl
Re:Looking for Trolls? (Score:2)
Daniel
Re:Looking for Trolls? (Score:4, Informative)
I suspect you'll have a hard time running compiled C on any platform for which there is a compiler. Or for that matter, even build it unmodified without the benefit of autoconf unless it's among the most trivial of programs.
Not that Java has a lock on portability -- Perl and Python do just fine in that area too.
Re:Looking for Trolls? (Score:1)
Considering you'll need a C compiler to bootstrap and build the Java Virtual Machine I think it's fair to say that for any OS/Platform Java exists upon you'll find a C compiler.
Unless the JVM is bootstrapped in something baraque like Forth ;)
Re:Looking for Trolls? (Score:1)
Maslow Hammer (Score:4, Insightful)
.NET vs Java (Score:5, Insightful)
I haven't done any testing on raw performance, but I have noticed that running "mono app.exe" starts the app almost as fast as a native app while Java takes WAY more time to start up.. Also, Java seems to have much more RAM overhead..
Re:.NET vs Java (Score:5, Informative)
I have used both J2EE and
This is quite general for everything: e.g.
Summary: If you want a quick and dirty DB frontend, go for
AMEN! (Score:1)
I think this gets especially fun when using 3rd party/closed libraries, where you don't necessarily have any idea what exceptions they might throw.
In practice, I have not found it to be a big deal. Then again, i'm pre
Re:.NET vs Java (Score:4, Informative)
Re:.NET vs Java (Score:3, Insightful)
That said, .NET is not as language-agnostic as MS would want you to believe. Basically, all languages can be ported to .NET as long as they are sufficiently similar to C#. Note that, for example, "Managed C++" is something very different from C++, and
Re:.NET vs Java (Score:1)
MC++ is a misnomer. The VC++ compiler has a set of extensions that allow you to easily hook into the managed CLR using a few new pragmas and keywords. Other than that, your code looks pretty darn much like your average C++ application. You can use the STL, ATL or just about any C++ library that is compatible with VC++. Even MFC, if that's your poison.
C++ is really just that, C++. Even if you're using the managed extensions. About
Re:.NET vs Java (Score:2)
Re:.NET vs Java (Score:1)
Who uses MI these days anyway =)
Re:.NET vs Java (Score:2)
Re:.NET vs Java (Score:2)
Re:.NET vs Java (Score:2)
Geez. Why keep on insisting on error? All of them allow System.out.println. Please name one that does not.
Re:.NET vs Java (Score:1)
They both work well (Score:5, Interesting)
Variety can definitely erode productivity. At work, I have to keep up on the Win32 API, the Windows CE API, C++ (with ATL, MFC, and STL), C#, Perl, 2 variants of SQL, makefiles, with some VBScript and JavaScript thrown in for good measure. At home, I try to keep up with the FreeBSD API, 2 more variants of SQL, PHP, Java, a different structure for makefiles, etc. And the alphabet soup doesn't seem to be getting any better.
Open source seems to have a tendency to have several projects around a given problem (MySQL, PostgreSQL, FireBird, SAP databases), while businesses tend to lead to bigger, more fully featured (also called bloated -- depends on your point of view) products (SQL Server, Oracle, DB2). Performance varies by application -- for jobs that don't need the extra features, sometimes the simpler products are better. And sometimes, open source results in a real beast (Mozilla). Java is somewhere in between I guess. But since the question was more about Java vs.
I haven't used Java much for web apps, but I have done some general development in Java. I have done some web development with
The performance benchmark you linked to was pretty meaningless. It seems to have been funded by Microsoft, so that just might have biased the methodology a bit. Nevertheless, I think there are some general gut feelings that I think are reasonably accurate regarding the performance of Java and
As far as IDEs go, I'm not sure why "choice" in this matter is really an advantage.
As far as language goes, I guess it is nice that
I personally like C# over Java. Things like ref and out parameters, boxing, and attributes are things that are quite simply missing from Java. They are needed, and they aren't there. Obviously Microsoft took a lot of good ideas from Java, but since they got to start over with it, they got to improve on the parts of Java that drove Java programmers nutty.
On the other hand,
Re:They both work well (Score:2)
Many of the reasons that people hate Microsoft are very relevant to what is the best tool for a job. Microsoft has a very long history of screwing over people, including their own customers, they have a long history of insecure products, a long history of bugs, a long history of thwarting interoperability, and many other things which really should be considered. People who hate Microsoft and apply this to th
Re:They both work well (Score:1)
Re:They both work well (Score:2)
Things like ref and out parameters, boxing, and attributes are things that are quite simply missing from Java. They are needed, and they aren't there.
Yes, they are needed. And version 1.5 (betas already available) will include boxing, attributes (ie meta tags), as well as the long-awaited template facility.
Just as MS haven't acknowledged Java as an inspiration (I've heard C++ mentioned several times, never Java), Sun seems to have done the sam
windows env (Score:1)
J2EE becoming the de-facto standard... (Score:3, Interesting)
They all sent us loads of papers describing what type of architecture they expected, and what rules we'd have to follow. What they all want to ear is : open standards, evolutivity, free (as in beer) libraries, maximum portability, and connectivity.
Now, guess what they like to hear between J2EE, jakarta libs, JNDI, linux, or...
It seems big shops really start to get the point about the advantages of open standards.
(Note : I'm talking about french agencies, it might not be true everywhere. But I suspect most european countries are following those lines too.)
Re:J2EE becoming the de-facto standard... (Score:1)
Note that on the other hand, it seems J2EE is trying to invade my language
Re:J2EE becoming the de-facto standard... (Score:1)
I know, I know...
Re:J2EE becoming the de-facto standard... (Score:3, Informative)
here in Peru they ask the same things: "open standards, evolutivity, free (as in beer) libraries, maximum portability, and connectivity";
.Net!, XML! (yes, with exclamation points they hear better)
but... this is an extract taken from their dictionary:
'standards' = windows
'evolutivity' = XP!
'free' = 'i can get a CD for S/. 5' (that's five soles, less than 2 US
.Net is too immature (Score:2, Informative)
At first I thought it was damn cool. You could just build your GUI very quickly by clicking around, the online help is nice and all, multi-monitor support is really good, etc. Then bugs started poppi
Re:.Net is too immature (Score:2)
J# has issues, dont interpret J# as the whole of
Yes,
You did something wrong if your GUI didnt work right. This thread is about web development, and the GUI is therefore HTML. If you were using NS4 then yes you had lots of issues, because NS4 doesn't support CSS2, which
Depends on your programmers (Score:3, Informative)
First, familiariarity breeds increased effency. If you don't have the time to study all choices and train on something new then pick a familar one.
.Net is younger and has fewer choices when it comes to web framworks and external libs which some people prefer. This blog enty explains it better than I can: http://javablogs.com/ViewEntry.jspa?id=31449 [javablogs.com]
Java is more of a Language For the Masses than C#/.Net. While us alpha-geeks like Languages For Smart People that does not make them better, espcially when we have to work with less smart people on your team. Much more on this at: http://madbean.com/blog/20/ [madbean.com].
Objective-C (Old version of Web Objects) (Score:1, Offtopic)
Re:Objective-C (Old version of Web Objects) (Score:1)
Not a technology decision (Score:3, Insightful)
J2EE technologies aren't flexible by chance and
Re:Not a technology decision (Score:1)
Slashdot did a comparison? (Score:2)
(No wonder they're so far behind on submissions, they're all busy in Slasdot Labs (TM) running the latest round of amazing new benchmarks. I can't wait to see the results!)
We can't talk about .NET (Score:2)
The last Microsoft Update included a paragraph in the EULA, that indicated that you may not mention any benchmark comparisions about
I presume that this includes performance and usability (no mention made of that in the EULA). Now, my wife agreed to the EULA (She must agree to the EULA, so I am not bound by it). Anyway, I have never used
J2EE (JSP) vs ASP.NET (Score:5, Insightful)
When JSP first came out, it was a significant step forward from the tool that I was using at the time, ASP (classic). The advantages were many. Exception handling, and objects were the primary ones. Other things (like being strongly typed) also were a significant step forward. Yes you could get many of these things by doing your ASP development in JScript, instead of VBScript, but nobody really did.
However, the disadvantage of Java : over-architected. If you follow the blueprints, or examples provided by Sun, or Apache, or any other big shop out there, you end up with thousands of classes. Java itself doesnt have this issue, (IE, the language does not require this) its more of the paradigm that the whole J2EE world evokes.
ASP.Net has many of the same advantages that JSP has. Exceptions, classes, strong types (if you want them)
However, as a bonus, the
For example, take a look at Java Pet Store vs PetShop.net. Yes there are complaints from the Java world that its not a fair comparison, because they did things differently. THATS THE POINT. If Java encourages you to do things in a way that uses 4x the code, and runs slower, thats a problem. Microsoft is under no obligation to do things in an inneficient manner to match Java, because thats what Sun wants. MS set out to compare "how much code to make this functionality happen, and how does it perform"
Some may say : but the Java code might be better architected! How do you judge architecture? Only 2 things matter. Maintainability, and Performance. The
Now, from a platform perspective, Java did some things that I wish would have made it into
Since you dont declare exceptions in C#, callers of functions have to be prepared to handle any exception. As a result, most callers just end up catching Exception and then they never get passed up.
Some other things are enviromental. Visual Studio.net is FAR AND AWAY the best IDE I have ever used. Seamless integration of HTML, code, Javascript, database etc. Integrated debugging of client and server side code, including database calls (it will jump into the stored procs and let you step through them!)
While integrated debugging is something available in Java, I have not seen it to this degree.
Also, ASP.net seems much easier to extend. Making new controls (user controls or server controls) is trivial compared to the work required in Java.
Now, Java's big claim to fame is of course cross platform compatibility. If you need to run on Unix TODAY, then obviously go with Java (or python, or perl or whatever)
But Mono is just around the corner. Mono will already run iBuySpy (a pretty complex app) without modifications. So cross platform for
Re:J2EE (JSP) vs ASP.NET (Score:5, Interesting)
This is just plain incorrect. J2EE is not over-architected. Have Sun and the various Java vendors done a really crappy job of providing "How do I get from A to B" info? Yep, but it's not over architected. In fact, the core J2EE libraries don't have much in there that isn't necessary.
The thousands of classes are necessary when you want to deploy portable, clusterable, scalable components. The trick is, how to not write all that by hand. I personally haven't written any of those classes by hand, or maintained the XML descriptor files needed in over a year. I use XDoclet to manage that. It's portable between IDE's and supports almost all the containers available. If you're application is portable between IDE's (in other words, you used Ant to build it and didn't use weird wizard things that store meta-data in the IDE somewhere), then incorporating tools like XDoclet shouldn't be an issue.
I write one class for an EJB, I add XDoclet tags that generate it's Local and Remote interfaces, Utility objects, Value Objects, XML descriptors and SOAP descriptors. All in one file, so where's the bloat?
The XDoclet paradigm is going completely mainstream in Java 1.5. You can go look at it on the JCP as JSR-175.
The Petstore comparison doesn't hold any water anywhere. If you are designing webapps the way the Petstore projects were built, you need to find another profession. The original Sun Petstore was built as an example of how to get basic stuff working, not a working example of how to build enterprise apps. It was used as part of a short tutorial where they wanted to demonstrate every J2EE technology in one bang.
.Net Petstore was a cheap shot at Sun. Rickard Oberg, who started the JBoss project and the XDoclet project has written extensively on why both are crap and Microsoft was pulling a fast one. Frankly, I haven't looked at the Sun Petstore stuff in several years, because it's useless for doing real work.
The Microsoft
Sun has a long history of great technology, but they couldn't market themselves to save their life. Seriously, how many people know what the hell, the benefit of SunONE is? Sun's software strategy appears to be a world of contridictions.
If you want to do J2EE, don't ask Sun how to do it. Go to the Open Source Java community. These are the guys that are innovating. They see the holes that Sun has left and have gone and plugged them.
If you really wanted, you could write your next webapp in the same way Microsoft wrote their Petstore, load the entire database into memory, t
Re:J2EE (JSP) vs ASP.NET (Score:2)
I know Oracle tried to do something like this, but they seriously screwed up. I read the Veritest examination of that test, and I'm very familiar with using Loadrunner and can see that they purposefully set options to skew results in their favor. The only thing Microsoft seems to be guilty of is trusting Sun to provide a good app.
Just seems like your complain
Re:J2EE (JSP) vs ASP.NET (Score:3, Informative)
However, they don't provide any benchmarks other than lines of code.
Re:J2EE (JSP) vs ASP.NET (Score:2)
Design patterns can help, but as you said nothing in J2EE is forcing you to over-architect.
I've been very successful in building J2EE web apps that handle lots of clients and resemble what I think is a good design that is still useable.
I haven't used
Re:J2EE (JSP) vs ASP.NET (Score:2)
Spot on. Regarding the Java Pet Store example used above, there's an alternative implementation [ibatis.com] that might be more appealing to people who preferred the
The purpose of Sun's Pet Store was to demonstrate "best practices" (not performance, which is why the more performance-oriented
Re:J2EE (JSP) vs ASP.NET (Score:3, Insightful)
If you just want JSP stuff, you shouldn't be using J2EE. You're adding unnecessary 'enterprise' features, then wondering why it's too complex. Just use a web container like Jetty or Tomcat etc. Not many websites would need J2EE unless they had to integrgate with a ton of other backend systems.
J2EE is more comparable to the entire
And anybody bringing up Pet Store either is slightly ignorant of what it was for, or has another age
Re:J2EE (JSP) vs ASP.NET (Score:2)
Again, my point was not that Java required you to write this type of code, merely that Java encourages it, and the examples provided encourage it.
The Java Pet Store Demo is a sample application from the Java 2 Platform, Enterprise Edition ("J2EE") BluePrints Program at Java Software, Sun Microsystems. It demonstrates how to use the capabilities of the J2EE 1.3 platform to
conflation (Score:3, Interesting)
Anyway, why take the pill? If you don't like the infrastructure, build and borrow the tools you need. It's not rocket science, as much as MS wants you to fear its complexity. A decent controller and a quality markup regime and you can do *web services* as you see fit on top of Tomcat.
J2EE vs .NET (Score:2, Insightful)
.NET over J2EE any day (Score:1)
Re:.NET over J2EE any day (Score:1)
I have never used
Objective .NET/C# vs J2EE/Java Comparison (Score:3, Informative)
Let's start with the picture from 10,000 feet: C# is aimed squarely at Java, and for all intents and purposes, it is a superset of Java. Similarly for
Language Differences:
C# has less integrated threading support. (which is a bad thing, imho)
C#'s XML and SOAP integration make it
Java's XML integration is a nightmare. JAXB is the only thing that comes close to being halfway decent, and it still doesn't come close to the integration C#. XML serialisation in C# is fast and beautiful.
C# gives you far more control over the dynamic reloading of classes, as well as increased security through what
C# documentation isn't quite as nice or refined as the standard javadoc fare, but MSDN is a pretty nice source, though sometimes you have to look a little harder or deeper than you would with the javadocs.
In general, both APIs are very clean.
As for maturity, I don't really think that's an argument. Most of the Java technologies available now (especially the XML/web services bits, in which the competetition is most fierce) are no older than
I think the larger question is the underlying
Do you feel comfortable locked into a Microsoft platform and x86 hardware? Personally, for a server, I don't. Go help out Mono, which is progressing nicely, but could definitely use some more help. (http://go-mono.org)
If you do, I would definitely go with
In short, the pros: excellent XML and SOAP handling, speed, many small features which are currently emulated at the API level in other languages
.net/C# is a limited subset of Java (Score:1)
I'll
Re:.net/C# is a limited subset of Java (Score:1)
Your obvious bias against Microsoft has slanted your views on an excellent platform.
C# is a *super-set* of Java, meaning it has more features.
Also, C# is far more standardised than Java will ever be, even though pundits have attempted to get a proper Java specification in the works lots of times.
The only half-way decent XML serialisation I saw for Java was something a company offered as commercial software, and it still didn't come anywhere as close to the way C
Re:.net/C# is a limited subset of Java (Score:1)
C# versus Jave (the language)
;)
more features != better language (IMHO it's actually the opposite - less features => better language, yes I like Smalltalk and Common Lisp
If you count available third party libraries and tools you probably see his point...
Re:Objective .NET/C# vs J2EE/Java Comparison (Score:1)
Mod parent up as troll or atleast overrated *sigh*
.NET's "far more control over reloading o
related links:
http://www.freeroller.net/page/ceperez/20030520#p_ the_problem_with_cameron
http://roller.anthonyeden.com/page/ceperez/2002120 5
(let me give you a small tip:
The performance of the C# version (regex example) is related to