kvz.io
Published on

My New IDE: NetBeans

Authors
  • avatar
    Name
    Kevin van Zonneveld
    Twitter
    @kvz

Writing code requires two important things: creativity & discipline. The creativity to create the unknown, unexplored, exciting parts of software. And the discipline to create the dull & all-too-well-known parts of software / documentation.

You may come up with new ways (or use frameworks) to reduce repetitive work. Effectively beating discipline with creativity. But boring stuff will still always be there in some form. And on days when creativity is low, you may need to tap into that jar of discipline so you can still be productive, by doing things you never feel like.

But every now & then, there is a day when both creativity & discipline are low. To prevent such a day from going to waste, I figure I can do 3 things:

  • Drink coffee, get back at it
  • Drink some more coffee, get back at it
  • Use this day to learn & invest in tools & skill

Recently I had a rough night involving little sleep & one or maybe two drinks. I'll spare you the details. The next morning my two coding fuels: creativity & discipline were at an all-time low. I ended up repeating steps 1 & 2, but they just didn't cut it ; ) It was clear that this day was not going to be my best coding day in the world ever.

So I turned to step 3 and decided to invest that day in learning tools. This may not result in immediate production, but that's why it's called investing ; ) I'm now learning & investing in things that will hopefully increase my productivity in the future. As an added bonus: on a day otherwise lost.

Eclipse PDT

A programmer's primary tool is his IDE. The end-product is in your head but the tool will help you craft it. Good tools will help you craft it better or faster. Or both. Readers of my blog may have noticed my love (1) hate (2) (3) relationship with my current IDE: Eclipse PDT. We have our ups & downs, this has never changed. Winston Churchill once said:

"...democracy is the worst form of government except all the others that have been tried"

This best illustrates how I feel:

"Eclipse is the worst IDE except all the others that have been tried"

But now that blog posts on a 'new' 'radical' IDE called 'NetBeans' have been clogging up my RSS reader, and I had an entire day of coffee & learning ahead of me, it was time to give it a try.

NetBeans

sqlcc.pngNetBeans is an IDE by Sun and has been around for a while. What's new in 6.5 is its support for PHP. That's what makes it interesting for me.

The base install is no different from Eclipse PDT. Download the archive, extract it, run it. That's it.

What complicated things with Eclipse were the steps afterwards: adding CSS support, adding SVN support, having to struggle through their ever so poor plugin & update system. Manually selecting mirrors & dependencies. Not to speak of performance issues.

Not the case with NetBeans. They must have really looked at a PHP developer's daily job, because everything you need is already in there: SVN, CVS, CSS, SQL, and even support for jQuery! This even works within 1 document: NetBeans figures out what's JavaScript, what's PHP, and indexes & highlights all elements accordingly. And you can even connect to a MySQL database. This is all out of the box.

And if a feature is missing, the NetBeans plugin system Just Works. Go ahead & install additional features. No need for a science degree there.

Code completion is fast & accurate. Manuals are integrated. Existing Eclipse projects can be imported, no need to keep separate workspace directories. Just switch back and forth between NetBeans & Eclipse (or your other IDE of choice) until you've made up your mind.

Conclusion

If you want a complete list of features just check out one of many other blog posts about NetBeans or checkout a screencast by the creators. For me it suffices to say: It's like a lightweight Eclipse, with a couple of very powerful additional features (all out of the box), and it Just Works.

In fact, I wasn't prepared for such a smooth ride. I continued in fully working environment, learned some keyboard shortcuts, played with the refactoring tool (awesome). And maybe it was the coffee, but before I knew it, my creativity kicked back in and I even got some serious work done that day :) Who would have thought.

What to Do Next

Not Convinced?

Pictures say more than a thousand words. So checkout some of these links:

Then: Download!

Want to give it a shot? Here the download link. You can choose your flavour: Java SE, JavaFX, Java, Ruby, C/C++, PHP, or just All.

Legacy Comments (36)

These comments were imported from the previous blog system (Disqus).

bloggingg
bloggingg·

That sounds familiar to me. I\'ve made the change to Netbeans last week after years of that love/hate relation with Eclipse.

Peter Velba
Peter Velba·

This Anti-Eclipse-blog is published on dzone.com, the website of Sun-marketing-whore Rick Ross. I am not astonished at all.

Ronen
Ronen·

Iv been a long avid user of intellij, after trying eclipse for a couple of times i gave up, iv found Netbeans to be the closest thing to intellij out there, things simply work, intellij has the upper hand on speed and features but its not free.

Kev van Zonneveld
Kev van Zonneveld·

@ Peter Velba: Excuse your French Peter! I would like to think I have always been quite nuanced in my judgment of Eclipse or any other technology for that matter. You may not have read my posts so well. You may have even misunderstood the Churchill quote!

Brett Zamir
Brett Zamir·

I\'ve been using Netbeans for JavaScript for the sophisticated syntax coloring alone. Besides being easier on the eyes when customized (I like a light blue background), Netbeans\' specificity in distinguishing types makes things like globals jump out. This may sound like a fluffy concern, but if you get used to it, you will no doubt appreciate its practical power.

The developers have also been swift to respond and implement some bugs/features I\'ve happened to report (e.g., JavaScript 1.7 support in Mozilla).

One caveat--Netbeans 6.5 has a very annoying bug (not present in 6.1) with object accessors causing an error to be triggered when one adds whitespace after it. They say it has been fixed in trunk, but the update has not been pushed yet. I mention this so people aren\'t deterred because it is otherwise a REALLY nice IDE, and apparently only getting better (but I\'m still sticking with Early Access PHP 6.1 for now).

Although I don\'t think Netbeans (as with Eclipse) is all that welcoming and intuitive to learn from the beginning (it has a lot of features you won\'t need if you just develop in JavaScript and PHP), and I prefer an IDE like Komodo Edit for its flexibility in customization (e.g., adding snippets and items to the menu rather than predefined items), I\'m happy to mostly just stick with Netbeans\' very useful Navigator display and powerful syntax coloring options. I really hope they will allow sharing of coloring profiles because I\'ve come up with one which I really think is awesome.

Signal9
Signal9·

I have been a netbeans user since it was 5.0 and I love it. True Sun has given it a home but it was originally an open source project.

I primarily use it for building N-Tier Java systems and C++ development (for both windows and linux).

Çağlar
Çağlar·

I really like Netbeans but it might be much better if it has the refactoring power rich , useful shortcuts of Intellij Ide. So for now Ideaj is my main ide for java for now.

extesy
extesy·

If you think NetBeans is the best PHP IDE, then I guess you haven\'t tried Aptana. I strongly suggest you to try it out: http://www.aptana.com

Ashish Waghmare
Ashish Waghmare·

I hava tried Apatana (free) and Netbeans 6.5 ,but i liked Netbeans support more. Refactoring is well integrated in netbeans than aptana .Also other errors like are un-used variables are better shown in netbeans 6.5.

Casper Langemeijer
Casper Langemeijer·

What shits me about netbeans is one missing feature: Autoremove whitespace on save.

Sure, where is a remove whitespace feature, but no way to do it automagically. We\'ve tried explaining this to the developers: They don\'t understand.

Jörg Plewe
Jörg Plewe·

Very well written blog, I couldn\'t prevent myself from smiling. NetBeans was my favorite for a long time; not bc. of the features, where Eclipse was leading for a long time, but for being the underdog in the IDE battle which always bears some sympathy.
But nowadays, it is fun to see that NetBeans made such a big progress while Eclipse is stagnating a bit.

Kev van Zonneveld
Kev van Zonneveld·

@ Ronen & Çağlar: Intellij doesn\'t support PHP right? It\'s important for me that my IDE does.

@ Brett Zamir: Thanks for explaining about the bug

@ Oleg Anehkin: I may look into it one day. Maybe after:
- My new IDE: Eclipse
- My new IDE: NetBeans, you will find a
- My new IDE: Aptana online ;)

@ Casper Langemeijer: So far I\'ve found the development team to be quite accessible, maybe if you find more people they will build it. But you are aware you can link a keyboard shortcut to it right?

@ Jörg Plewe: Thanks ;)

sid
sid·

does tea work too?

me no likee coffee

(lees dit laatste met een Jar Jar Binks accent - for extra annoyance!)

Dave
Dave·

Gotta say I use Zend Studio for Eclipse. It is better than trying to decipher Eclipse PDT, but it suffers from being Eclipse based i.e. resource intensive and slow and the PHP Analyzer can kill even the most bitching of high-end PCs. Unfortunately it does seem to have one thing going for it that I think NetBeans (and many others) don\'t and that is integrated debugging of scripts.

ZendStudio has fantastic integration with the ZendDebugger as well as with PHPUnit and PHPDocumentor and if you start down the Zend stack and use ZendPlatform you can get some incredibly indepth information about your application. Combined this has really helped me out no end (where I use PHPUnit, some projects use SimpleTest!).

So currently it\'s a limbo state for me, un-willing to change IDE due to the investment (both time and principally money!) in ZDE but seeing a lighter faster (and free!) IDE in NetBeans. I will keep looking at NetBeans and sampling it though.

Incidentally: NetBeans did annoy me with its insistence that there MUST be a primary index.php file and it tries to treat this as being the project root. It cannot seem to just have a bunch of files. I have some large projects that would basically sit in /opt (for example!!), and a /websites folder would be web accessible but there may be multiple sites in there with multiple primary index.php files, but they are part of the same project. Only a minor thing really :)

Oh and the SVN checkout into a new project really confused the hell out of me the first time round - but then, so did ZDE6s when it checksout into a Type of ...... ;)

Robin Speekenbrink
Robin Speekenbrink·

Nice post as always!
I\'ve been playing around with NB for some time now and have too been comparing it to alot: the hell of eclipse, the good old fashioned, sturdy and well rounded mother IDE ZendStudio5 and others like aptana, maguma etc.. currently though my main holdback before fully switching from ZS5 to NB is the lack of sFTP support.. working on a MS Windows development client but having a full blown LAMP dev enironment ready just doenst work within NB...but true, considering that NB6.5 is just the (official) fisrt real release for PHP support in NB i\'m eager to keep my eyes open and see what more they can come up with!

Michael Kimsal
Michael Kimsal·

I *THINK* the javascript support includes code completion as well, including \'regular\' javascript and libraries (jquery, etc.) I might be wrong on that. I know Aptana does, and I thought netbeans did too. But yeah, for PHP, netbeans is definitely a new contender in the IDE space.

Erik Ellis
Erik Ellis·

Hay,
I must say that im glad to find some one who is not blinded by eclipses grip of the world.

I got fed up with eclipse and for the 10th time went out looking for something new. I\'we stumbled into NetBeans alot of times, but always discarded it as a visual c++:ish clone for Java and C/C++.
I had a final look at it and found it had a new beta support for PHP. I tried it (an early dev release of 6.5) and i loved it.

It just workes. And it integrates to well with established workflows and systems.

I got blown out of my mind when it actually chewed its way through 12,000 php files, in 20-30seconds, and on top of that, also recognized it as a working svn copy, and tag all files accordingly.

In eclipce, i would have to wait for it to index all my files (could take a good 10mins), and i had to coax it into recognizing it as a working copy, if i didn\'t check it out with subclipse. On top of that, most of the time, eclipse would bug out and give me black screens or not even follow through with the project setup and checkout.

People should really give NetBeans 6.5 a try and look at it as a new IDE and not what it once was.

Ziad
Ziad·

@Dave Yes you can debug your PHP through NetBeans and XDebug

I\'ve been trying NetBeans PHP for the last couple of days and I must say I am very impressed with how things just work. I haven\'t even tried the HTML/CSS/JavaScript stuff but even with just PHP this is a pretty kick ass IDE for PHP development.

Kev van Zonneveld
Kev van Zonneveld·

@ Robin Speekenbrink: SFTP. I don\'t see the need.. What do you use it for? Don\'t you want a version control system for everything you do?

Adam
Adam·

At first I was skeptical because you didn\'t mention Python, Ruby or C++ support, but its there! You DEFINITELY should have highlighted those as well!

Also, would have been useful (at least for my lazy bones) to provide a link to download it...I figured there would be one on your post but there wasn\'t, so just maybe for future reference :)

Kev van Zonneveld
Kev van Zonneveld·

@ Adam: Thx I\'ve updated the article.

Kev van Zonneveld
Kev van Zonneveld·

@ Robin Speekenbrink: Looks like your priers have been heared :) http://blogs.sun.com/netbea...

tek
tek·

NetBeans is great, but why not emacs ? :D

Kev van Zonneveld
Kev van Zonneveld·

@ tek: Good point... Can emacs do this?
http://blogs.sun.com/netbea...

Kutzi
Kutzi·

I don\'t know about the PHP support in Eclipse, but once you worked with its synchronize view, you will never go back to the more than crappy diff/update support in NetBeans.
Even IDEA - which is a very nice IDE otherwise - doesn\'t come close in that area.

Timo
Timo·

I keep reading about the awesomeness of NetBeans so I decided to give it a try, but although the editor is supreme I had some troubles installing the IDE. The first install kept giving me warnings that files already existed. I removed NetBeans en did a clean install; SVN not working. I made a deal with myself to test it for a week, so maybe the editor can make me overcome these issues :)

ger
ger·

Tried both EclipsePDT (uuuugly!) and NetBeans. Net beans is a handy thing! But - the first thing I need such a complex software is a debug process, not autocomplete etc.
I\'ve tried NetBeans both at windows and ubuntu, and now I can tell for sure - it bypasses breakpoints! So, now I use Zend for Eclipse (I am a Russian, so I can allow this to myself ;) )
Not so great in code editing / autocomplete, but I can debug a page just by pressing a button on zend toolbar in my browser. Zend platform I use as server-side debugger has free dev license. So, that\'s a solution for me at the moment.

Kev van Zonneveld
Kev van Zonneveld·

@ ger: Haven\'t used the debug functionality yet so I wouldn\'t know about that ;)

Robin Speekenbrink
Robin Speekenbrink·

Netbeans has improved since i last visited... and indeed the sFTP support is in there.. but it still just cant quite compete with the ease of use of zendstudio5

And yes: offcourse we use versioncontrol systems, but dev-ing on a windows machine, with *nix files doesnt really work (case sensitive filenames etc) So we keep our files on a *nix machine, dev on windows and test on the *nix... The choise for a windows dev-machine is plain and simple: ease of use... :)

Kev van Zonneveld
Kev van Zonneveld·

@ Robin Speekenbrink: Sounds to me it raises more problems than it solves. Haven\'t been using windows since ages and haven\'t missed it once. If anything; it\'s a relieve. My productivity has increased like crazy having brilliant usability features, and the power of command line tools at my disposal.

Shamun
Shamun·

Kevin and Guys,

I would suggestie all the programmeurs!! Including you too ;) , the moment you are feeling what IDE can do.

Get those:

1. Notepad++ ( i love it, want to invest/donate for it )

- http://notepad-plus.sourcef...
- make your own delphi, c/c++ plugins

2. Netbeans ( i hate one thing he dont have indents like notepad++, and performance in my 512mb ram laptop from 1995)

3. Compare notepad++ VS netbeans first,
then do what ever you want

Rafi
Rafi·

Hey. NetBeans was my IDE choice until just recently when I found phpStorm. I\'ve posted about it in the Kohana forums: http://forum.kohanaframewor...

Kev van Zonneveld
Kev van Zonneveld·

@ Rafi B.: Thanks!

@ Shamun: Looks like it\'s windows only so not for me. And does it have the refactor functionality? Can\'t live without it anymore : )

Stas
Stas·

I suggest to try also free PHP IDE <a href=\"http://www.codelobster.com\">Codelobster PHP Edition</a>

Anon Y. Mous
Anon Y. Mous·

Setup NetBeans latest ver. 6.91 today (PHP-5.2/MySQL-5/Win SBS Server/IIS6/FastCGI/Xdebug) Thumbs-up so far. Got it working in under an hour. I'm comparing to Eclipse IDE.

Bilal
Bilal·

I used aptana for a while, but as it is based on eclipse and just as eclipse, it uses way too much memory.

I'm using now pspad and notepad++ and I just downloaded netbeans. Work nice for now..