Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at
Jeff in Java Land

Jeremy over at just wrote a post about his experiences in Java Land, and since I've been working on a Java project for over a year and a half now (with at least another year to go), I thought I'd share my thoughts as well.

Before I get into this, I'll divulge some info about myself. I learned Java in school, but had never worked on a real Java project before this one. The majority of my previous projects had been in C#. The Java project I'm currently working on is large, with over 35 developers. We are practicing Domain-Driven Design and TDD, with Eclipse as our IDE.

  • First off, as Jeremy states, the language difference is negligible. It took me a day or two to get back up to speed.
  • Eclipse absolutely destroys Visual Studio as a pure code editor. Java as a language is quite verbose, but Eclipse makes this moot by literally typing 90% of my code for me. It creates classes, interfaces, methods and everything else I'd want, in addition to providing complex refactoring tools out of the box. Its CVS integration is seamless, out of the box. Its TDD integration is seamless (again, out of the box). I've patched together a similar feature set in VS with Resharper and AnkhSVN, but the fact is, the total feature set is still not up to par, and Eclipse is free.
  • My personal opinion is that C# is a superior language. I posted why I think this on my personal blog. The biggest thing I miss when coding in Java is C#'s delegates; I feel like there are a bunch of icky parts in our Java architecture that would look so much sexier if I could just pass around a function.
  • Java's class library is a bit of a mess. As Jeremy states, the date/time handling parts are especially ugly. This is probably because Java's been around longer, has to keep old API's around for backwards compatibility, and C# has had the benefit of learning from Java's mistakes.
  • Checked exceptions are messy. They may be good when you're working with another developer's API, but when you're working within your own domain they're just noise. We have a massive domain in our project, but the points in the code where we actually care about checked exceptions are... I'll say non-existent. There are points where we look for a specific exception but they are few and far between, and could probably have been designed around in the first place.
  • Java's Generics implementation is pure compiler fluff. There's no support at the runtime level like in C#, so even if you create a generic list of Products, you can still add an object that is not a product to that list. The only real reason to use them for lists is so you can get the Java equivalent of C#'s foreach construct to work.

All in all, it should be apparent that I really like where C# is going, especially in 3.0. I get frustrated with the verbosity of Java at times, but for the most part, the utter superiority of Eclipse more than makes up for it. Eclipse plus Java makes me more productive than VS plus Resharper plus AnkhSVN.

Posted 12-30-2006 5:18 PM by Jeff Perrin



ali wrote re: Jeff in Java Land
on 12-31-2006 9:55 AM

i really agree with you in

"Eclipse absolutely destroys Visual Studio as a pure code editor"

well any how i am going into the other direction than yours i am used to do all my projects on Java (well not really big projects like yours but  just simple ones) this week i was dealing with c# and want to learn it  to know witch is best for me c# or Java

Thorbjørn wrote re: Jeff in Java Land
on 01-02-2007 1:21 AM

If you want to pass a function around in Java you create a suitable interface, let the class conform to it, and pass that around.

Ernst Kuschke (C# MVP) wrote re: Jeff in Java Land
on 01-03-2007 2:58 AM


So it seems that C# as a language is superior to Java. I'm sure that you'd agree that the biggest reason for this is not language itself, but the .NET Framework being superior to the Java class libraries, no?! :-)

The IDE, unfortunately, is what you need to utilise all of that, and I have to admit that VS has far to go to catch up.

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Google Reader or Homepage Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of
Red-Gate Tools For SQL and .NET


SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
NHibernate Profiler
Balsamiq Mockups
JetBrains - ReSharper
Web Sequence Diagrams
Ducksboard<-- NEW Friend!


Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers


Community Server (Commercial Edition)