Phil Sturgeon

Web developer, kayaker, outdoors madman and part-time alcoholic.


Why you should try Netbeans 6.8

Posted Applications at Mar 31, 2010

For a long time I have had the opinion that NetBeans sucked. When somebody asked me what exactly I didn't like about NetBeans I couldn't remember any reasons, so decided to give it another try. The result of my test? Why the hell have't I been using longer?!

To set the scene, I have been using Eclipse in some form for years. EasyEclipsePHP, Eclipse PDT and Aptana are some of the easiest pre-built but there have been other manual combinations too. After almost 5 years of using Eclipse on Windows, Linux and Mac it was amazing how many bugs I had just "got used to". Slow performance, buggy, some buttons and features not working for several releases in a row - put simply, a pile of junk.

After firing up NetBeans and opening a few files it did not take me long to remember what I missed about Eclipse. These two key-board shortcuts alone are brilliant.netbeans keyprofiles

As it turns out, NetBeans has "Key Binding" profiles, one of which is named "Eclipse". Wow! So NetBeans can have all the same shortcuts you are used to in Eclipse.

With that sorted I already felt at home with NetBeans and wanted to explore further. Here are just a few of the things that I have discovered to work really well in the week I have been using NetBeans as my primary IDE.

Language Support

You can download packages to provide support for various languages. There are plugins for all sorts of languages, the most notable being Python, Ruby, Java and C++. I simply downloaded the base PHP package and added in Python and "Ruby and Rails" plugins.

Plugins

There are a huge number of plugins for NetBeans which add plenty more than just language support. They can be installed through the Tools > Plugins interface or downloaded from third-party sites and loaded manually. There is all sorts of crazy plugins that I don't have time to go through, but they support stuff like Database IDE panels, Copy and Paste history, OpenOffice.org API (whatever that involves!) and plenty more.

Subversion, Mercurial and Git

Out of the box NetBeans has support for two of the most popular VCS systems in use. And CVS... This allows you to create new projects from repositorys, make commits, view changes and revert based on history. This was especially handy for me as CodeIgniter 2.0 is now on Mercurial so not having to worry about finding a new client was a great help. I can of course use the command line, but if I don't have to bother that's more potential time at the pub.

I was initially disappointed that it lacked support for Git but found that the plugin nbgit would add support to the same netbeans git  pushstandard as the others. This strangely does not offer push support, but that can be added in with a "Custom action" on the Team > Git > Custom action > New... tree. Simply place a path to your git binary and pass "push" or push "origin master" as your arguments. Of course this doesn't replace the power of working with Git through the command line but it can be good for quick cheeky commits.

What about the basics?

Ok so we know it can support all the crazy "new trends" like Rails and Git but how does it handle the baiscs like HTML and CSS?

Once again the answer is "Really fucking well". When editing HTML it will suggest closing tags for you but it wont automatically shove them in unless you hit Enter. NetBeans will also auto-indent your HTML and prvovide validation for unknown tags, incorrect attributes and it can do all of this even if you are working on HTML in a .php file. It will sense what you are writing and react accordingly instead of simply "this is a PHP file, treat is as such".

The support for CSS is just as good, possibly better. When writing properties are autocompleted, documentation for possible values shows up in tool-tips and it will validate incorrect values.

There is even a GUI for adding properties if you are a massive n00b, but I wouldn't like to use that.

But what about "uber-magic CodeIgniter auto-completez"?

Firstly, im not entirely sure what everyone is talking about when they mention "CodeIgniter auto-complete" but apparently, version 7.0 will have it...

As I see it, auto-complete is useful for things like writing $this and having a list of possible options being shown up, but when you write $this->load the auto-complete stops. I assume thats where the magic "CodeIgntier support" would kick in and list helper/library/model/etc?

Whatever, the PHP OOP auto-complete in 6.8 is already helpful enough.

Summary

You won't very often hear me admit I'm wrong, but it does happen now and then. This is one case where I am perfectly happy to admit I am wrong and say that NetBeans is a vastly supiror IDE. It uses more memory than any other I have tried, but at the end of the day everything works perfectly and exactly how you would expect it to. That is enough for me to ignore the memory hogging and upgrade.

Try NetBeans 6.8 today. It's free and you will be very happy, especially if you are currently "putting up with" Eclipse or one of its ugly sisters.

Comments

User comments
  • Gravatar Subconscious Mind Power

    Aug 27, 2010

    I was very pleased to find this site.I wanted to thank you for this great read!! I definitely enjoying every little bit of it and I have you bookmarked to check out new stuff you post.

  • Gravatar Skye

    Aug 01, 2010

    Nice article, Phil.

    http://rhasan.com/blog/2009/09/codeigniter-auto-complete-with-netbeans/

    The above works as of 6.8. I found it especially helpful when using Doctrine plugin in CI - auto_complete works across the Doctrine objects as well.

    Cheers,

  • Gravatar Chris Rueber

    Jul 17, 2010

    Just throwing it out there, since it's an IDE conversation. I've not used NB, but I've heard from enough people that if I were in the market, I'd check it out at this point.

    I'm not going to make the full argument for IntelliJ IDEA as a PHP platform, primarily because it's not free. Here are the basics that is supports though: Code completion, class navigation, debugging, unit testing, refactoring. My personal favorite? Accurate syntax highlighting when HTML/PHP/JavaScript is inline. No more irritating Eclipse highlight swapping.

    http://www.jetbrains.com/idea/features/php_editor.html

    Check it out if you are in the market for a new IDE and spending a few bucks for the best doesn't faze you. :)

  • Gravatar James Selvakumar

    Jun 16, 2010

    Folks,

    Nice reading the post and comments. I'm using NetBeans for Java development for more than 4 years and it is really amazing and the IDE has improved a lot over the years. Any NetBeans bashers, please try the latest NetBeans release and see it yourself. I love u NB.

  • Gravatar Selim

    Jun 08, 2010

    Thank you for the "managing keymap profiles" tip, it's very usefull, especially for ones who are migrating from eclipse to netbeans. I've been using eclipse and netbeans for 3 years. I really love them both. I especially like netbeans for its GUI designer (Matisse) which is more sophisticated than Visual Editor plugin. I especially like Eclipse for the java code editor which is very powerful especially for code refactoring.

    Last days, I've been working on netbeans because its Java SE distro is very small and suitable for educationnal purpose. Also, the support of JPA in the Java Se distro is a really powerful feature.

    I really like both netbeans and eclipse and sincerly, I think that this animosity between the two communities should stop. each one of these IDE is good for a stuff and not good for another stuff.

  • Gravatar Frerk

    Jun 08, 2010

    I use Eclipse day in and day out since version 2.0. Recently I was dissatisfied with the Grails support it provided. So I gave Netbean 6.8 a try (on Linux). What a difference! From now on I'll use Netbeans over Eclipse for every Grails project out there.

  • Gravatar Hhf

    Jun 07, 2010

    I use it since version 6.1. Before I used Eclipse, but now it's imcomparable, Netbeans, it's the best.
    Miss just a free UML designer, sorting method like in jindent, and drools support. Soon I hope...

  • Gravatar Ole Hejlskov

    Jun 07, 2010

    A couple of weeks ago I wrote similar things about NetBeans. I've been looking for a decent PHP IDE for a while now, and NetBeans absolutely looks like the holy grail, at least for me.

    If you are excited about 6.8, please, for your own sake, try the latest 6.9 Beta. It will rock your world!

  • Gravatar Greg Strockbine

    Jun 07, 2010

    I used emacs exclusively for about 20 years on Sun OS and Linux. Then I got a job where the development environment is winXP (ugh). I have a choice of using Visual Studio 2008, Eclipse or Netbeans. I decided to learn both VS and Netbeans. Netbeans is my favorite IDE.

    I use Netbeans for C++, php, html and CSS. Mercurial support in Netbeans is awesome.

    However, the last Linux Journal Reader's Awards picked Eclipse as the run away favorite IDE. So I intend to look at Eclipse too one day. I still use Emacs because it is a swiss army knife. I know my way around vi. Geany is a nice lightweight IDE on Linux that not many people know about.

    The big question mark in my mind is why is MS Visual Studio so popular? The MS folks I know love it to death. When I ask what other IDEs they've tried the answer is either "none" or "Netbeans 5.5 and it sucked". For me VS is missing a view things that I learned to love in Netbeans, like:
    - click through navigation: CTRL-left_mouse_button
    - tabbed searches: all your previous search results hang around in their own tab. It helps you remember what you've already searched for and what the results were. Plus each tabbed search results has a "refine search critera" option. It is little things like this that make it really handy.
    - incremental search within a file is a full class citizen, not the add on after thought in VS
    - I got to hating the search dialog box in VS.
    - Netbeans allows you to undock an editor window

    That's all I can think of right now.

  • Gravatar Thomas

    Jun 07, 2010

    By the way - IDE stands for INTEGRATED DEVELOPMENT ENVIRONMENT - not INTERACTIVE. So integrating UML is no contradiction...

  • Gravatar http://philsturgeon.co.uk/

    Jun 07, 2010

    OK, anyone reading this blog should know that I am a PHP developer. You may also know enough about me to realize that I am wandering in to Perl and Ruby pretty slowly. NetBeans supports this through OPTIONAL downloads. I have no idea about support for Java, UML, SOA (no idea what that even means) but it has a plugin structure.

    I expect Netbeans has a lovely Java plugin and probably one for UML too, but tbh why the hell are you planning UML in your IDE? You know that IDE stands for Interactive DEVELOPMENT Environment right?

    I don't expect Netbeans to handle my support tickets or make my coffee, why would it handle application data-flow or structural diagrams too?

  • Gravatar Pthesis

    Jun 05, 2010

    First of all, thank you for not starting your article with "X reasons why you should..." If I read another article called "10 reasons why Twitter is better than sex" I'm going to shoot someone.

    Secondly, I use NetBeans and love it, but on Windows you should try CodeLobster. I came across it recently and have been really impressed. I'm not affiliated with them in any way.

  • Gravatar Rolf Ernst

    Jun 05, 2010

    I agree. NetBeans support for a variety of languages is vastly superior. True, PHPDesigner is great but can it do Grails? How about plain Java? IntelliJIdea is nice but what about it's PHP support? I really do not want to learn another IDE for every language or framework that I work in. I sometimes forced at work to use Eclipse vs. NetBeans and I can tell you - I hate it. It's a dog and I am sorely disappointed that Google chose to pretty much ignore NetBeans for GWT. Still, GWT support in NetBeans is decent. The free Java Swing Designer in NetBeans rocks. You have to shell out $300,-/seat to get the same level of functionality in Eclipse. The NetBeans team seems to have been extremely motivated in cranking out release after release. Finally some working JavaFX support as well.

    Whenever I have a choice I pick NetBeans over Eclipse.

    As for CodeIgniter - NetBeans Symfony support (a 'real' framework as compared to CodeIgniter but that could start a flame war) is only matched by PHPDesigner - but then again, that is a one trick pony.

    I found the debugger both in PHP and Java working flawlessly. I understand the same is true for Groovy.

  • Gravatar Reinaldo Novoa Jr.

    Jun 04, 2010

    Hey Neotohin,

    Quote:
    "CTRL+SHIFT+UP/DOWN = Duplicates the Current Line
    Press alt+shift then press Cursor UP/DOWN = U can drag the current line"

    If you highlight a block of code these shortcuts will work as well duplicating or moving blocks of code!!! Netbeans ROCKS!!!!

    I have been using it since v5. If only I knew about it earlier...lol.

  • Gravatar Misterdom

    Jun 04, 2010

    I've been using NB and Eclipse together (plus some "flavored" versions of Eclipse) and everytime I may return to Netbeans is a delight... I just works so smoothly and is so nicely integrated with everything around Java Enterprise!

  • Gravatar Ziad

    Jun 04, 2010

    We've been using NB for a while now and find it to be an excellent IDE for PHP. Debugging support is great and easy to setup. Its suppose to even do javascript debugging but I've never tried this out, use firebug for JS debugging.

    The NB guys are doing a fantastic job and they keep coming with new releases and adding cool features. I would recommend NB for PHP to PHP devs who are working on fairly large or fairly complex OO projects.

  • Gravatar Sebastian

    Jun 04, 2010

    No. Just no. Netbeans has bean dropping support for things like SOA related technologies, UML, so just no.

  • Gravatar Bo

    Jun 02, 2010

    NetBeans are awesome. I tried it for the first time about 4 years ago. It was really cool and I fall in love with it. Then I had to use several other IDEs. Because of Flash and ActionScript I had to use Flash develop and later Flash builder, build on Eclipse. For ActionScript and flex is eclipse the best IDE. So I tried Eclipse for java too. And then I realized, how amazing the netbeans IDE is. Foc C# is MS Visual Studio good too, but NetBeans are simply best, expecialy for java, PHP, HTML and CSS. Even there is a great support of XML tools like XML Schema, XSLT Transformation.
    Andy :Talking about Notepad++ in compare with NetBeans is really silly, even for simply html and css.
    PS:This article looks like advertisement for NetBeans, but the sweet about it is the fact, that it is really true.

  • Gravatar Edwin Commandeur

    Jun 02, 2010

    IMHO it all depends on which technologies you use and your personal taste. The Netbeans community seem to be very vocal that their IDE is the best and I hope they will continue to push it to get even better. Netbeans is undoubtedly a very good IDE.

    Thus far, I am a happy Eclipse user. Eclipse has great SVN support with Subclipse and, recently very good Mercurial support with HgEclipse. The official maven plugin from Sonatype is for Eclipse, Spring Tool Suite is Eclipse based etc, so for me the choice is clear, but then again I am a Java developer who is passionate about Spring.

    I do not see why there has to be so much animosity between Netbeans and Eclipse products, as I read in some of the reactions and in the blog post. Why does it seem it is not possible to laudate Netbeans without sneering at Eclipse?

    Shouldn't we be happy that we have several great IDEs for free at our fingertips (NB, Eclipse, IntelliJ community edition, ...). Having competition can only make them better :)...

  • Gravatar David Mann

    May 21, 2010

    Hi Phil,

    I find that the PHPDesigner IDE is the most awesome, easy to use editor. I have been using it for over 4 years and I have never once considered changing. The only probblem is it only supports CVS but I prefer to use TortiseHG anyway so it's not a huge problem for me.

    It also costs :(. Mind you, work pays for it so it's not a problem for me but I could see the price being a barrier for many.

    Regards,
    David Mann

  • Gravatar Andy

    Apr 29, 2010

    Notepad++ is the best IDE i've ever used.
    Especially when combined with DBGp plugin

  • Gravatar Bizim Oyun Sitesi

    Apr 26, 2010

    I have been using netbeans , from versiyon 6.0. I have finished 5 projects with this ide. I am really satisfied of it is futures.

    But just few things make me disapointed, one is when you open the ide it is searching files every time for changes, (some times it is doing this forever) , another thing is , it is java based and a bit slow.

    But I have learned to live with these negatives.

    it is free ide :)

  • Gravatar Andrzej O?mia?owski

    Apr 19, 2010

    I was using Eclipse for some period of time. Recently I tried to use Netbeans and... I love it. Using IDE is a must. I recommend Netbeans.

    I was using pure text editor for a long time, couldn't get familiar with IDE, for unknown reason, now I see it was big f*cking misteake!

  • Gravatar Lichi

    Apr 17, 2010

    Interesting.... but the UI sucks really hard. Saludos!!

  • Gravatar Josh

    Apr 11, 2010

    AWESOME!

  • Gravatar Umefarooq

    Apr 05, 2010

    as Valcapri has post his comment its really nice option you can put these all class properties in you MY_Controller and it will available to you in all of your application controllers for model also its working fine really great option, i love Netbeans since when it was only supporting only java, Big fan of java products

  • Gravatar Skuja

    Apr 01, 2010

    For CI autocomplete look at this article:
    http://rhasan.com/blog/2009/09/codeigniter-auto-complete-with-netbeans/

  • Gravatar Jameson.

    Apr 01, 2010

    Nice to know you liked NB, Phil! A quick tip on how to enable partial support for "CodeIgniter auto-completez" until NetBeans team adds real one:

    1) Add your Codeigniter installation to "Include Path" (press CTRL+1 and you will see the option)
    2) add this file somewhere inside your project - http://pastebin.org/129902
    It will take care of autocompleting core classes, and sure you can add yours there too.
    Here's how $this->load autocomplete works in my IDE: http://img28.imageshack.us/i/codeigniterautocomplete.jpg/

    Oh, and NetBeans team have a blog here: http://blogs.sun.com/netbeansphp/
    Boy, is 6.9 going to be awesome! (And you can already take your chance with devbuilds :P)

  • Gravatar Buso

    Mar 31, 2010

    I loved netbeans but I didn't like the non-optional 'spaces cleaner' feature (right after you saved a file, all the unused spaces got deleted). Its hard to explain so I'm gonna write an example:
    function some_function () {
    *
    if(something) {
    *
    ..do something
    *
    }
    *
    }

    Suppose you wanna add more code at any of the points marked with an asterisc. No matter where you click, the cursor will stick to the left, and you have to press tab tab tab tab etc.

  • Gravatar Tomaž Muraus

    Mar 31, 2010

    What about debugging and profiling Python and PHP code in Netbeans, do you have any experience with it?

    I'm pretty satisfied with Eclipse + PyDev for bigger projects, but I'm always open for trying out (better) alternatives.

    I have actually used Netbeans for some light Java development in the past, but never tried it for Python and/or PHP projects.

  • Gravatar Mitchell Mckenna

    Mar 31, 2010

    I used NetBeans all last year and loved it. This year I've been using VIM, ya, I know, there's fear of me becoming one of "those" guys (the ones that think their cool because they know all those crazy key combos of the server native editor, lol), but it's a pretty powerful editor and if you can convince yourself to learn it, it's a very powerful editor.

  • Gravatar Valcapri

    Mar 31, 2010

    Hi Phil,

    I use NetBeans, too. I'm learning Java at school with NetBeans IDE.

    For the auto-complete with Netbeans, you just have to place this code in a netbeans_ci.php in the nbproject in your directory.

    <?
    /**
    * @property CI_Loader $load
    * @property CI_Form_validation $form_validation
    * @property CI_Input $input
    * @property CI_Email $email
    * @property CI_DB_active_record $db
    * @property CI_DB_forge $dbforge
    * @property CI_Table $table
    * @property CI_Session $session
    * @property CI_FTP $ftp
    * ....
    */
    Class Controller {
    }
    ?>

    Regards,
    ValCapri.

  • Gravatar Mjsilva

    Mar 31, 2010

    I've been tempted to change my IDE a lot of times (still using zend studio 5.5) but my problem is always the same , inline debug...

    I've tried Netbeans and it is great but debug (xdebug) is too hard to configure and I really miss zend toolbar for Firefox, that is fantastic you only need to press "Debug, Debug next page, Debug all pages or debug POST" and debug comes into action VS style.

    Really useful when creating complex routines, especially when using multidimensional array sets and recursive function, witch lately I've been doing a lot :(

    Can't live without it, but now I have a problem, 5.5 is getting old and does not support html5 (gives me a lot of errors in html5 tags and so on...) and version 7 of Zend sucks... dunno what to do, I've searched a lot but it looks like there are no other IDE (paid or free) with a good debugger :(

  • Gravatar Neotohin

    Mar 31, 2010

    CTRL+SHIFT+UP/DOWN = Duplicates the Current Line
    Press alt+shift then press Cursor UP/DOWN = U can drag the current line

  • Gravatar Bjørn Børresen

    Mar 31, 2010

    I also remember reading some blogpost about a NetBeans CodeIgniter auto-complete implementation. Which is also a plus :-)

  • Gravatar Amit

    Mar 31, 2010

    I moved from old Zend (before they'd moved to Eclipse, having used Eclipse itself a bit) & I'm just liking Netbeans more & more as I continue to use it. Damn good IDE.

  • Gravatar Rasmu

    Mar 31, 2010

    Awesome post Phil! Great reading and nice to know these new tips and tricks ;)

    I've been trying to find a nice way to integrate some CodeIgniter auto-completion last week and found this post very useful:
    http://rhasan.com/blog/2009/09/codeigniter-auto-complete-with-netbeans/

    Thought I would share it here since it may become handy for others too :)
    Really looking forward to version 7 though :)

Post a comment