Slashdot Mirror


J2EE vs. .NET in Productivity Comparison?

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)."

12 of 68 comments (clear)

  1. Struts by KDan · · Score: 2, Informative

    JBuilder has support for Struts. 8 even has rudimentary support for 1.1. 9 has full support as far as I'm aware. Eclipse can also use plugins to have that support, but I haven't used them personally. I don't see what there is to complain about in J2EE development environments...

    Daniel

    --
    Carpe Diem
  2. Looking for Trolls? by ClosedSource · · Score: 4, Informative

    Believe it or not some people use Java for reasons other than hating MS. Some people use MS for reasons other than disliking open source.

    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.

    1. Re:Looking for Trolls? by KDan · · Score: 2, Informative

      Actually, the J2EE platform is extremely portable. We're talking about websites that can be moved from a windows i386 server to a unix mainframe without a glitch. Obviously "ANY" OS/Hardware combo is exaggerated, but there is a wide range of supported hardware and the web application servers are rigorously identical on all those machines and OSes. The only difference there might be is in threading specifics, but so long as you designed with that in mind it shouldn't be a problem.

      Daniel

      --
      Carpe Diem
    2. Re:Looking for Trolls? by scrytch · · Score: 3, 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.

      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.

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
    3. Re:Looking for Trolls? by lewp · · Score: 2, Informative

      Without a glitch? Someone's never written any J2EE code...

      --
      Game... blouses.
  3. Re:.NET vs Java by UPi · · Score: 5, Informative
    Please note that the question wasn't C# vs Java, but .NET vs J2EE. The languages themselves are just plain irrelevant in this case. Also note that .NET is not just C#, but a whole bunch of CLI'ed languages (there's even a bastardization of C++ there).

    I have used both J2EE and .NET, and there are a few things I can offer for the report.

    • J2EE is more mature. It's been around longer, so it simply had a longer time to grow out of childhood sicknesses. For example: The documentation is more complete. .NET's docs are like all Microsoft docs: mostly generated, and sometimes the very reason you're reading them is missing. For example sometimes you don't have a clue what exceptions a library method can throw...
    • .NET is pretty handy for what it was concieved: creating simple web-based DB frontends. If you want an object model behind it, with good persistency options, you will want to choose J2EE instead with it's Enterprise Java Beans.

      This is quite general for everything: e.g. .NET has the almighty DataSet, J2EE has persistent beans. DataSets are simple, but go back to the structured programming age. The beans are more sophisticated, but take a little longer to get the hang of.
    • Learning curve: IMHO J2EE takes a little longer to comprehend. Once you got the hang of them, though, both environments are easy to use.
    • Oh and one more thing: C# doesn't check the exceptions. I may be a purist, but I just detest that. You have to document, maintain, and generally keep an eye out for your and the system's exceptions all the time (of course sometimes you have no idea what system exceptions there are..)


    Summary: If you want a quick and dirty DB frontend, go for .NET (with C# or VB). If you want something more complex, I'd recommend J2EE.
  4. Re:.NET vs Java by Khazunga · · Score: 3, Informative
    I also like the fact that I can code in C#, Smalltalk, Eiffel, ilasm (yeah right;)) or some other language, and if a Visual Basic programmer want to use my classes (s)he can just use them, like they were native classes.. No modifications needed. No wrappers needed.
    The multi-language aspect of .NET, much hyped by MS-marketing, is a common characteristic to all bytecode-interpreted languages. Java has its own list of bytecode compilers: 165 of them, by current counts.
    --
    If at first you don't succeed, skydiving is not for you
  5. .Net is too immature by nado · · Score: 2, Informative

    Windows XP really impressed me. With that and having heard of J#, I thought wow, that'd be great, because I like Java, but it's too irresponsive for GUIs and even though hand-coding GUIs makes nice code, I don't like it (using Eclipse for java). So I got a copy of VS.Net from campus, which goes for not so much.

    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 popping from everywhere and I found I was spending more time on writing workarounds than "real" code itself (or simply redoing dialogs because the IDE decided to forget about some). Then, when I had assignment demos to do for school, I was writing them in J#, but I had to redo the GUI by hand anyways, because you can't run J# on .Net by itself, you also need a redistributable for J#, which isn't installed in the computer labs. Deployment is also very complicated. You have to distribute the .Net and J# distributables along with your app, then if you want DB support, you need a third one and then your app by itself is already big...

    So I just switched back to Java, where you just install one distributable sometimes, for machines that don't already have it. And then deployment is a joke, you just send a 50k jar and that's it. No 2-3 megs for simple apps! Sure the GUI's not too responsive, but I'm waiting for 1.4.2 eagerly now instead of wasting time on .Net.

    I payed .Net from my pocket because I wanted to use it and at the end, the only thing I can say about it is that I got robbed. Eventually, it will mature up and if it gets accepted as well as Java, it might become interesting. But next time around, it's gonna be forced on me, I won't switch by will.

  6. Depends on your programmers by Leknor · · Score: 2, 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

    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/.

  7. Re:J2EE becoming the de-facto standard... by Kz · · Score: 2, Informative
    (Note : I'm talking about french agencies, it might not be true everywhere. But I suspect most european countries are following those lines too.)


    here in Peru they ask the same things: "open standards, evolutivity, free (as in beer) libraries, maximum portability, and connectivity";

    but... this is an extract taken from their dictionary:

    'standards' = windows
    'evolutivity' = XP! .Net!, XML! (yes, with exclamation points they hear better)
    'free' = 'i can get a CD for S/. 5' (that's five soles, less than 2 US dollars)
    'portability' = ??
    'conectivity' = IE.

    now guess why i don't do web development.
    --
    -Kz-
  8. Objective .NET/C# vs J2EE/Java Comparison by massive-cow · · Score: 3, Informative

    I have used both a fair amount. My previous job was writing Java business web applications, and I am currently managing the development of a C# webservice (for the server) and a C# winforms client.

    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 .NET and J2EE, though they are less similar than the language comparison.

    Language Differences:

    C# has less integrated threading support. (which is a bad thing, imho)

    C#'s XML and SOAP integration make it /ideal/ for any application dealing heavily with either protocol. In fact, I would say that it is nothing short of brilliant.

    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 .NET calls 'AppDomains'. This is a very powerful feature.

    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 .NET/C#.

    I think the larger question is the underlying /platform/ maturity, but I will leave the zealots to argue Windows vs Unix.

    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 .NET and C#. When Mono gets further along for web services, it will certainly be a force to reckoned with. As for writing webservice and database clients for Win32, it is really quite nice. You could use GTK# and have it cross-platform, yet still take advantage of features that C# includes.

    In short, the pros: excellent XML and SOAP handling, speed, many small features which are currently emulated at the API level in other languages ...and the cons: currently somewhat locked into MS' platform (though this should change shortly with Mono), somewhat inferior auto-documenting to javadoc.

    --
    Simplicity is prerequisite for reliability. - Dijkstra
  9. Re:J2EE (JSP) vs ASP.NET by Gaijin42 · · Score: 2, Informative

    Someone did : http://www.ibatis.com/jpetstore/jpetstore.html

    However, they don't provide any benchmarks other than lines of code.