Netbeans vs Eclipse: An IDE comparison

eclipse indigo logo VS netbeans 7.0.1 logo

Intro

In this post I will compare the two popular IDEs Eclipse and Netbeans and share with you which one works best for me and why that is. I will be using the Versions Indigo and 7.0.1.

All in all, they are quite similar. They both make programming easier by providing auto-complete and auto-insert code options, easy overview over program structure, nice refactoring options, debugging, and so forth.

I will not discuss the benefit of IDEs in general, although I am definitely on the pro side (even though command line editors like vim rank way higher on the cool’o’meter).

Auto-Complete / Auto-Generate

In my opinion, this is one of the more important aspects of an IDE.
eclipse auto sort

automatically sorted imports. yay eclipse ;)

Here Eclipse scores for its function to automatically add the imports you need. This saves one from the work of importing it manually or clicking god knows how often on add import xy. but it also can be a bit of a pain. Sometimes auto-import does not work, but auto remove of imports always does. So if you comment out parts of the code for a short while, you will always have to add the imports again. Eclipse also auto-sorts the imports which is quite nice.

netbeans auto complete

netbeans auto complete

Both IDEs can auto-complete, but Netbeans does a better job at doing so. It has more options and guesses right more often than Eclipse does. Of course the templates are customizable, but it would be nice if it worked out of the box as well in Eclipse as it does in Netbeans. Also, Netbeans offers “assign return value to variable” option which spares one from always checking the exact signature of a method and some typing.

User-friendliness

This part is highly subjective but important non the less. I think the ui of Netbeans looks nicer and is easier to use. A small and not too important example: Open project in the task bar is easy to find and makes sense. Guessing to have to click on File -> Import -> General -> Existing Projects into workspace is not. Another example: Having to press Help to find the “Install new Software” option, really? That is not very intuitive.

Also while both IDEs can auto-generate getter/setter/etc I use it in Netbeans far more often as it is easier to reach. In Eclipse I often decide to write that one setter or constructor or whatever myself instead of clicking through the menu.
These are only three small example, but it goes on like this and it is annoying. I want to write code, not search in menus and Google.
Also, even when searching on the web, the results I get are links to eclipse.org, which either are outdated or not very helpful.

Performance

Not much to say, the point clearly goes to Eclipse. It starts faster, it reacts faster and it takes up way less memory.

Netbeans vs Eclipse: Individual Pros and Cons

Eclipse
 pro eclipse ide flexible / many plugins
 pro eclipse ide many plugins only for eclipse, no (good) alternative for Netbeans (Google android, etc)
 pro eclipse ide auto-import when needed and auto-import-sort
 contra eclipse ide a lot of bugs (“a lot” is relative, but definitely too many for my taste and more than (I experienced in) Netbeans)
 contra eclipse ide bad documentation (website is badly out of date, lots of 404)
Netbeans
 pro netbeans ide even easier to use than eclipse
 pro netbeans ide just works
 pro netbeans ide user-friendly ui
 pro netbeans idegreat auto-complete
 contra netbeans ide heavy (long startup time, even compared to eclipse; lots of memory usage)

Screenshots

eclipse screenshotnetbeans screenshot

Eclipse vs Netbeans: Conclusion

I use Netbeans if I have the choice. If I do not have a choice – e.g. when developing an Android app or working in a team where eclipse is used -, I do use Eclipse and hope that everything works (otherwise I prepare to waste hours searching the web, clicking through menus, and banging my head on the desk).

You should try both IDEs and primarily use the one you are more comfortable with. But if that IDE does not offer what you need to do the current task do not hesitate to switch to a different one. The IDE is just a tool, if it does not do what you want it to do, you should be able to switch to a different one.

Related Posts:

4 thoughts on “Netbeans vs Eclipse: An IDE comparison

  1. I’m talking about stuff right out of the box, when you download it, plug-ins annoy me so much, I just want something to work right away no BS please.

    ECLIPSE
    cons:
    - no find/replace for whole project or folders, only current file
    - no highlighting alternate operators (endif, endforeach, etc)
    - no option to create SQL files
    pros:
    - very efficient way to let you know of errors in html/php
    - recognizes all php core functions/methods,
    - everything except the cons, is very good
    conclusion:
    I trust this IDE, it’s mature and very reliable. but I’ll always be
    on the lookout for something better to come. It’s cons just annoy me

    netbeans:
    cons:
    - doesn’t detect attribute value errors in HTML
    - doesn’t detect some magic methods
    - doesn’t have window, or area, to list errors, warnings, and/or notices
    if it detects them, you will see them only in the file structure
    as files with errors will have a red indication on them to
    signalize you with contained errors
    pros:
    - highlighting for alternate operators (endif, endforeach, etc)
    - find/replace for whole project, or folders, not only current file
    - able to create SQL files
    - convenient sql connection feature to see your database info right
    from the IDE itself
    conclusion:
    I don’t trust this IDE, but it is loaded with features. It’s not very
    reliable per say, but it’ll do the job. You can go banging your head and
    pulling your hair out for a long time if there’s an obscure error in your coding
    whether it be in the HTML or PHP, that it doesn’t detect.

    FINAL THOUGHT
    Despite eclipse’s shortcomings, at least i trust it, and that’s worth a lot. netbeans has some nice features
    that eclipse lacks, but i just can’t trust it not detecting some errors that i might have in my code.
    Pretty much the only place where netbeans is lacking is it’s functionality to detect errors and methods/functions that are
    built into the core of the PHP and HTML languages. In reality, that’s the make and break deal for me, even if it’s just that one thing.
    For example, netbeans doesn’t detect the __set, nor the __get, magic methods. Try putting method=”POS” inside a form in the HTML, and it won’t detect it as an error,
    eclipse does.
    Imagine what else it might not be able to detect? That’s why I don’t trust it. Dealing with a big project I need to know right away where
    I might have (or do have, for that matter) errors, whether it be syntax or semantics.
    I don’t mean to be defending Eclipse, no way, eclipse is another IDE that is used as an anchor to pull you into buying the full fledged zend studio,
    which is so expensive. Don’t even get me started on other IDE’s, like phpdesigner, codelobster, phped, or text editors, they are all worse than eclipse or netbeans.
    Even dreamweaver sucks hard if you aspire to be a serious php developer. Let it be clear, Eclipse and Netbeans are the best free IDE’s in the market right now.
    Perhaps, the best 2 period (forget about the free).
    All in all, you are choosing between the lesser of two evils (eclipse – netbeans), the pile of crap that smells the least, and in this case it’s eclipse.

  2. Hey John,

    in my review of Netbeans vs Eclipse I mainly had Java in mind, not PHP so thanks for your thoughts on that aspect.

    Eclipse actually does have the functionality to search and replace in a whole project: just press control + h and select the right scope.

    And in Netbeans it is possible to show a list of all errors and warnings: open tasks and select filter. By default it only shows the todos, but it can also show a lot of other things.

    But I agree, neither one is perfect, we just have to choose the IDE that fits best for now.

  3. I just visited here after battling Eclipse bugs for several hours. The latest had it detect some duplicate identifiers in my file (due to a block copy, which I intended to fix) and no matter how I renamed than, cleaned, rebuild etc, it just kept saying they were duplicate identifiers. I typed “eclipse pile of crap” into google, and found this. I definitely agree about the eclipse bugs.

  4. Netbeans has ctrl+shift+I to automatically fix imports, adding what are missing and removing the excess ones with a single key combination.

Leave a Reply

Your email address will not be published.