NetBeans Love & Hate

For those cases where you have to work on remote code, NetBeans‘ remote project functionality seems to put it ahead of other PHP IDEs. It pulls down a tree of files and uploads files that you save. Having a local copy allows it to offer its full code comprehension, auto-complete, and great rename refactoring for “remote” code. In contrast Eclipse allows you to open remote files using Remote System Explorer, but you only get PHP syntax highlighting, not the excellent PDT.

But NetBeans is not all smiles and sunshine.

  • It does not check that a remote file has been changed before uploading, making it really easy to overwrite changes made by someone else since you downloaded last. It could mitigate this a bit by auto-downloading a file when you open it, but it doesn’t do this either. This makes it dangerous for a team working on the same codebase.
  • It sometimes (lately multiple times a day) turns off its “Upload on Save” functionality with no warning.
    • There’s no way to know it’s off other than to start noticing your changes aren’t affecting the server! The preferences checkbox remains checked.
    • Even worse, you have to exit/reopen NetBeans to turn it back on.
    • Recent changes in 7.1 make uploading faster, but no longer is all SFTP activity logged in the “output” pane, meaning it’s even harder to tell when Upload on Save turns off.
  • It will recognize file changes made by other processes, but won’t auto-upload those changes, even when “Upload on Save” is on (forgivable, but annoying).
    • Similarly, when you diff between files and transfer changes across, the changed file won’t be uploaded unless to know to click a green button that looks like a “refresh” icon. Who would suspect [refresh] to upload a file?
  • About 10% of the time when you first open the IDE it gets stuck scanning for changes in your files, especially if you have a lot of them in your projects, which of course you do.
    • When this happens, auto-complete doesn’t work.
    • If you create a new file/folder while it’s scanning, the IDE will often freeze.
    • Killing its process and reopening NetBeans is the only way to get it working again.

Some of these bugs are, to put it dramatically, totally devastating for the world’s PHP developers. NetBeans is—when it’s working—an astoundingly great environment to code in, but, with the latest updates, infrequent annoyances are starting to become regular fist shakers. It sucks that I can’t currently recommend NetBeans to anyone working on remote servers, especially in a team.

As I mentioned, Eclipse’s remote editing lacks code comprehension; I tried Apatana recently and managing remote projects was painful…might as well keep a separate SFTP client open.

How are Zend Studio and PHPStorm for working on remote codebases? I’m on OSX at work, but I’ll run Windows if it means getting a better editor.

Aside: Yes, I’m aware source control is the solution to the team-building-a-single-codebase problem. I use git/svn wherever possible, but setting up a proper environment takes time and developer coordination that’s lacking at the moment.

4 thoughts on “NetBeans Love & Hate

  1. preston says:

    The completely unusable FTP features of netbeans has me considering finally forking out cash for an awesome cross-platform IDE. I’m genuinely considering forking out for Komodo.

    Filezilla is great, but it’s frustrating when you have to resort to it as your “IDE”.

  2. says:

    I switched to PhpStorm (on OSX and Windows) not long after this post and its SFTP support (and everything else) has been top notch. When I accidentally start to upload a file that a coworker has changed I get a 3-pane merge window so I can carefully make sure our changes will work together. If I change the local cache outside the editor I just have to tab back to it and it will auto-upload the changes.

  3. Howard says:

    The problems you mention about other remote devs over-writing changes to the code are because you are not using a version control system. You should check out CVS, SVN, Mercurial or Git if you are owrking with other developers on a project. It takes a while to learn, these systems are made to avoid exactly this kind of overlapping writes scenario, and include quite a few other nice features, too.

  4. says:

    @Howard, I use git for almost all personal projects, but in the short term we can’t escape shared server development for some work projects and I’m sure a lot of dev teams are in the same boat.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.