Sunday, November 02, 2008

NetBeans 6.5 vs Eclipse 3.4 Ganymede on Java Coding

Netbeans IDE and Eclipse IDE
I like and use both of these IDE's for different reasons. Netbeans is perfect for non Java development and mixed language development. Eclipse is the best option for Java coding. Why? Here is my reasoning.

Netbeans:
  • Great technology integration
    the level of integration of assisting technologies as well as frameworks is much better than Eclipse.
  • Added ability to support a lot of other technologies
    Ruby with Ruby on Rails, PHP, JavaScript and Groovy are supported and integrated
  • Out of the box usable
Eclipse:
  • Huge community
    gives access to various plugins, though their quality depends on the developer
  • Incredible flexibility
    Basically everything may be tweaked and configured
Now why is Netbeans falling behind on Java coding? (IMHO)
Some will say that incremental compilation is the point of weakness, but I really see it a lesser issue in productivity.
The code assist is the main problem. And some defaults are enforced.
  1. Code complete: Netbeans has been improved incredibly. Eclipse has groups of code completion. Each code completion group has it's own popup. Each popup is opened(switched to) by pressing Crtl+Space repeatedly.
  2. Code complete: Eclipse has not only classes and code generation elements in the code completion popup, but the code templates. Such as typing main and pressing Ctrl+Space in Eclipse will give you an option to create a main method. Netbeans way is write psvm and hit code expansion button(CEB, mine is TAB).
  3. Code complete: Intrusive template expansion in Netbeans. Just write in pst and hit CEB in Netbeans and, even though you just wanted a variable name for your PreparedStatement, you will get "printStackTrace();" in place of your "pst". And nothing warns you into what the template will be expanded...
  4. Code expansion button = CEB, is a horrible thing if it's mapped to SPACE!
  5. Custom Run configurations are a good idea in Eclipse. Though I still like the button to run the Application in Netbeans.
  6. Netbeans enforces some defaults. The one that I hate the most is that everything in "Test Packages" has to be a jUnit test. Why? Tests may be simple classes with main methods! But you don't have an option to run it using something else other than jUnit.
Basically those are few simple reasons why I don't use Netbeans for Java coding.