So, having that out of the way: Yesterday NetBeans 6.1 has been officially
released.
When you're new to the 6.x branch of Netbeans (or new to the entire platform)
you'll quickly notice that you're dealing with an IDE which has its roots fully
in Java but also reaches out to support many different other platforms. Because
this group is solely aimed at Java I am not including those features in my
announcement, but will merely say that Netbeans also includes supports for
C/C++, Javascript, Ruby and even PHP (PHP support is in beta stage).
Netbeans 6 has been completely rewritten from scratch in order to get a
platform which is better manageable and to make sure that the code doesn't
become a total mess. You can notice this from the way the IDE behaves (it tends
to boot faster and be more responsive) as well as some of the older bugs which
have re-surfaced.
Specific Java features which are supported are:
- Enterprise Java Beans (EJB) 3.0
- JAX-WS 2.1
- Java Persistance (this is still in beta stage)
- JavaServer Faces (JSF) 1.2 (also pay attention to visual JSF)
- Java Servlet 2.5
- JavaServer Pages (JSP) 2.1
- Struts 1.2.9
- JavaServer Pages Standard Tag Library (JSTL) 1.1
Next to adding/improving support for common Java aspects they have done some
serious work on the whole environment. The editor has been enhanced with better
code completion as well as options to generate lots of common code for you
(constructors, getters/setters, bean patterns or overridden methods). When
completing code for you the editor also tries to guess your next moves.
So, for example, suppose you just added 2 fields to your class and now start
creating a constructor. Pressing alt-insert will give you an option of code to
create; when selecting the constructor option you'll imediatly see a dialog
which asks you if you wish to initialize any fields.
But it gets better... Say you create this method:
private void checkFields(String check) {
String result = null;
if (result.equals ...
}
....when pressing ctrl-space when typing equals (to fire up code completion) and
selecting the equals method you'll notice that Netbeans will have "check"
automatically filled in for you, because it was the most obvious choice. The
good part here is that this filled in value is done in a way that you can
change this by just starting to type in the values you did want added. This can
seriously safe you a lot of work. Ofcourse you can also turn the entire feature
off if it only annoys you.
More editor enhancements; color is now being seriously used to make your code
more readible. Simply by looking at the colours is enough to determine if
you're dealing with a statement (blue), a private variable (green), a static
variable (italic) and of course combinations are also possible. Another feature
which you'll quickly spot is the marking of occurances. When you put your
cursor on a field you'll quickly see all other occurances of that field appear
with an inverse colour. Next you'll also see these marks in the "hint bar" at
the right hand side of the screen. This makes it a whole lot easier to quickly
find specific fields in your entire code.
And now that I have mentioned the hint bar... This can be another powerfull
tool to get a quick and good overview of your code. Whenever something is
happening which isn't an error but also isn't exactly as it should be then
Netbeans can display a hint. It does so by issueing a warning (then the line is
marked yellow and a yellow mark will appear in the hint bar) or simply give you
a warning when the cursor is on the offending line. And these hints can vary a
lot. From using empty statements to hiding fields to using == to compare
Strings, right to Javadoc.
And fully in the style of Java all of these features are "backwards compatible"
and/or customizable. If you felt more comfortable with the editor colour scheme
that NB 5.5.1 used then simply turn that on. If you don't care for hints and
the likes at all then simply turn it all off. You can bend and shape it just as
you see fit.
There is just so much to (re)discover in NB6.1 that I can only advice you to
simply download it and check it out yourself. After all; a lot of the features
and ease of use depend a lot (if not fully) on personal taste. I will say this
on the matter: Netbeans has come a /long/ way since version 4.1.
To finish up I would like to focus on 2 specific features which have caused
quite some commotion with the release of 6.0: The auto comment and bean pattern
features. Both have come back in 6.1 in a workeable form. But not as we knew it
from version 5.5.1 :-)
Auto comment: This has been included in the new "hints" feature. You can now
tell Netbeans that it should hint you (either through an error, a "global
warning" or a "line warning) whenever a code snipplet has a problem with
javadoc. Either because its missing or because errors have occurred in the
javadoc block.
This is different from the previous auto comment feature but I think it makes
more sense. You don't have to leave your code window in order to quickly gain a
complete overview, and you can immediatly see what the javadoc block will look
like. And because Netbeans now also supports generating javadoc as well as
fully supports "javadoc code completion" as well things have become a lot
easier on you.
Bean patterns: The Bean Patterns window has re-surfaced in the navigator window
but hasn't got all the functionality that you might be used to. It gives you a
good and complete overview of all bean patterns in the java class, it also
allows you to rename fields but that is where bean support stops. However,
Netbeans does have full support for bean patterns again because if you wish to
add a field to your javabean then all you have to do is press alt-insert and
tell it that you wish to add a property. And then you'll be in a (somewhat)
familiar dialog window which asks you to specify all the aspects of the field
(the type, if you want a getter/setter or both, if javadoc should be generated,
if it should be bound, whether you need it indexed, if property change support
is needed and if it should be veto-able).
And finally; even the beaninfo editor is still with us; just right click on the
class in the projects window and select "beaninfo editor" to quickly generate
bean information for your classes.
So concluding... Netbeans is absolutely not the perfect IDE which can address
every one of your needs. I myself strongly believe in using the right tool for
the right job, which doesn't always have to be Netbeans.
But it does present you with a very extensive environment which can make your
work a whole lot easier.
And there you have it!
Resources:
NetBeans website: http://www.netbeans.org/
NetBeans 6.1 information:
http://www.netbeans.org/community/releases/61/index.html
NetBeans 6.1 release notes:
http://www.netbeans.org/community/releases/61/relnotes.html
And you can download NetBeans here:
http://download.netbeans.org/netbeans/6.1/final/
Groetjes, Peter
--
..\\ PGP/GPG key: http://www.catslair.org/pubkey.asc