PHP Programming with NetBeans
If you feel like you have outgrown your current text editor or are wanting to try out a new IDE, I’d like to recommend NetBeans.
After using TextPad for a few years, we realized that the codebase of our main project became too complicated and too extensive for it. We felt like our programmers were losing productivity because the main tool in their holster (the IDE) was not right for the job anymore.
After cutting down a few more trees with a pocket knife we decided that it was time for a change. In our quest to find the perfect IDE – fast, scalable and helpful we’ve tried out many products on the market.
Some of them were good while other left much to be wished for. The solution we found seemed to fit most (if not all) of our needs.
NetBeans actually refers to a platform for Java applications and an integrated development environment. The IDE comes in many flavors targeting different development environments from Java SE to Apache Tomcat.
The UI
The PHP bundle is free to use, around 25MB and has been dual licensed under the Common Development and Distribution License (CDDL) and the GNU General Public License version 2 with Classpath exception.
One of the best things about this IDE is its UI. All of the toolbars can be docked, closed or minimized depending on your display preferences. Minimized toolbars will helpfully spring open when you mouse over them and hide again once you click off of them.
The toolbars themselves are very helpful. Some of our favorites are the navigator which lists all variable and function definitions in one place so you can quickly jump (all it takes is one click) to that function with a generic name that would otherwise take forever to find using a regular search.
The projects toolbar helps you keep all of the different projects’ files in check by creating a separate file tree out of every project. The tasks toolbar will help you never again forget to finish that new function and replace the fateful “//TODO: finish this function” with actual logic that doesn’t bring the whole server as well as your boss’ wrath down upon you.
Perfomance
The IDE is fairly fast although after running it non-stop for a long period of time (5+ hours) it does seem to chew up a lot of memory. Make sure you turn on the memory toolbar so you can manually force the application to do memory garbage cleanup by clicking on the toolbar.
This is probably the only bad thing we found about NetBeans. The IDE did, however, process all types of files very fast. There’s no delay ever between opening a file and being able to edit it.
Some other solutions we’ve tried had no trouble opening our biggest PHP class files but choked when opening some of our medium sized PHP library files.
Customization
NetBeans is fully customizable. You can make it look exactly the way you want it by specifying every size, font, color and special effect for just about any text category you can think of (identifier, keyword, plain text etc.) and any file type you could use.
You can setup code templates which are basically phrase shortcuts that automatically expand into a block of text when you type them and hit a designated key. Let’s say you have a class skeleton you always use when setting up new classes. Now you can give it a name (i.e. newClassSkele) and save it into a code template.
The next time you’re making a new class, just create the file, type in newClassSkele, hit a special key (tab/space/enter/shift+space) and voila, the code is put into your file for you instantly. You can also easily setup and edit macros.
And the best part of it all is that you can then export everything you’ve setup including code templates, macros and fonts & colors and import them on a different computer so all of your work environments are synced.
Great Features
The IDE also has all the cool features that are standard nowadays such as code folding, code completion, bracket matching etc. It can also be used as an FTP program to make working on remote files easy as cake.
Add all that to a slew of plugins available and you get a wonderful product that can make any programmer’s life much, much easier (and more efficient).
Even if you’re pretty happy with your current IDE, give NetBeans a try because as a good developer you should never stop trying out new things and looking for tools that make you better at what you do; and hey, let’s face it, at the incredible price of $0 it’s truly a crime to pass up such a great product that has pretty much everything you will ever need.
What About You?
Have you tried Netbeans? What was your experience with it?
