Kunal has posted 1 posts at DZone. View Full User Profile

NetBeans: The Ultimate Linux IDE

07.02.2008
| 8564 views |
  • submit to reddit

NetBeans started its life as a student project at the department of mathematics and physics, Charles University (Prague, Czech Republic). After that it was developed by an organization that was later bought by Sun Microsystems, and it was subsequently open sourced.

NetBeans is a complete C/C++ and Java IDE with flexible support for third-party plug-ins. It is available under a dual license consisting of the Common Development and Distribution License (CDDL) v1.0 and the GNU General Public License (GPL) v2. This means that while developing for NetBeans you can get open source licensing facilities

NetBeans has a wide community and numerous solutions have been developed around it. There are a plethora of plug-ins available for it. Together, NetBeans supports virtually all languages, including C, C++, Java, Ruby, Python, PHP, Perl and many more.

The IDE also enjoys solid commercial backing from Sun Microsystems, the makers of Java.

NetBeans for Linux developers

NetBeans is written in Java so it is natural that it comes with strong support for Java. But don’t mistake NetBeans as another Java IDE. Let's have a look at some of its features.

Diagrams support: NetBeans supports UML (Unified Modelling Language) and BPEL (Business Process Execution Language) diagrams. It supports eight types of UML diagrams including activity diagrams, class diagrams, collaboration diagrams, component diagrams, deployment diagrams, sequence diagrams, state diagrams, and use case diagrams. You can align diagrams visually in the diagram editor. This way NetBeans caters to both the designers and developers needs. NetBeans also has strong support for BPEL components that help developers to build SOA (Service Oriented Architecture) and BI (Business Intelligence) applications. This is quite unique for an open source product.

BPEL SOA

GUI designer: NetBeans comes with one of the worlds best interface GUI designers (for Swing), thanks to Project Matisse. As you drag and drop widgets on to panels and dialogs, they arrange themselves automatically. Meanwhile, it also pops up with additional suggestions on placement of widgets. New NetBeans 6.0 (released on April 28, 2008) also comes with support for database bindings to build database-aware applications. A feature called GUI templates has been introduced as well, that acts as a building block to accelerate the overall development. To help Web developers, it comes with WYSIWYG editors for HTML, JSP and JSF pages.

Matisse

Coding: NetBeans supports almost all stable SDKs, including Java SE SDK 6 and the new OpenJDK. It supports static code analysis through the FindBugs plug-in. It is superseded by the SQE project (sqe.dev.java.net), which offers industry-standard integration for different software quality tools, including code defect analysers (FindBugs, PMD, CheckStyle, Lint4j), metrics
and dependency analysers (Dependency Finder). NetBeans also includes spell checker for codes. It supports fix-n-go type coding (code-time debugging). It supports the popular Java-based build tool Ant. Likewise, any Ant-based project can be opened and exported from NetBeans.

Testing and tuning: As mentioned earlier, NetBeans includes a complete quality framework called SQE (Software Quality Environment). It also comes with a performance and memory profiling tool. NetBeans perfectly integrates with JNUNIT framework as well. You can also test Web applications using NetBeans, Web Service and HTTP debugging tools.

Profiling

Enterprise Java and database support: NetBeans has the industrys most complete support for JavaEE5. It supports various J2EE servers, including Glassfish, SUN J2EE, Web Logic and IBM Web Sphere. NetBeans can create and deploy files for the supported servers. It supports all popular databases, including JavaDB, MySQL, PostgreSQL, SQL Server and DB2 Oracle. Out of these, JavaDB, MySQL and PostgreSQL are supported by respective JDBC drivers, while SQL server is supported through jTDS driver and Oracle is supported through DataDirect JDBC drivers.

C/C++ project support: NetBeans supports GNU Makefiles. You can import any project into NetBeans as long as you have a valid Makefile for it. That means that you can use NetBeans with all your existing code. NetBeans supports both static and dynamic libraries. A Makefile wizard is also being provided, which allows you manage variables, targets and configurations. Multiple compiler support: NetBeans supports multiple compiler configurations. Apart from support for the GNU tool chain, it also supports cygwin, MinGW and SunStudio for multi-platform development. Everything is customizable from compiler options to pre-processors definitions to compile time configurations.

Multiple configuration support: NetBeans supports various project configuration properties to suit different development requirements. Configurations help you to set the first level of customisation to your project.

Debugger support: NetBeans tightly integrates with GDB to provide standard debugging facilities. You can set multiple debugging sessions, set breakpoints, inspect call stacks and local variables, create watches and create threads. It supports debug time expression evaluation. In fact, you can even view the assembly instructions for the running program.

Editor: The C/C++ editor supports syntax highlighting, automatic code completion, automatic indentation and formatting (including a choice of formatting styles), bracket matching, code folding and templates. NetBeans IDE can find classes, variables, functions, include directives, derived classes, and more. NetBeans 6.1 release includes solid support for code re-factoring in the editor.

NetBeans vs Eclipse

The current trend is that many are coming out of their own version of Eclipse. The vanilla Eclipse has a lot less to offer. Although there are commercial alternatives, they are too greedy. As I see it, the problem with Eclipse is that it was designed to be a good platform for numerous commercial products. So it lags behind in terms of features. Thus, companies can add more features (I would say basic features) to a commercial version of it and charge money. This is not the case with NetBeans. All the greatest and best features are available to use, right away. There is no need to buy a NetBeans-based commercial IDE to have all the features. If you ask me, Eclipse is a platform, and not an IDE.

NetBeans Face-To-Facts with Eclipse

Feature Eclipse
NetBeans
Download and Installation Eclipse comes without automated installer. Users are supposed to install it manually and configure all the necessary prerequisites.
Automated cross-platform installer is provided, which also detects all platform perquisites.
Java Enterprise Support Does not come pre-configured with any of the Java EE servers. You must do it on your own.
Popular application servers like Glassfish and Apache Tomcat are already bundledwith the installation. Just start compiling your servlets.
UML Modelling
Is very basic and needs to be installed separately.
Advanced and out of the box availability. It separately. supports eight types of UML diagrams, including activity diagrams, class diagrams, collaboration diagrams, component diagrams, deployment diagrams, sequence diagrams, state diagrams, and use case diagrams.
BPEL Support
Is very basic, and needs to be installed
and configured separately.
Advanced and out-of-the-box support. It is also supported by an enterprise pack,which includes SOA tools as well.
JavaDocs Online Help Fails to render help from jar files
Render it.
Collaborative Development Need plug-ins.
Out-of-the-box support for CVS and Mercurial.
Visual Web Development tools This is limited, need plug-ins.
Advanced, and built in.
Java SE
Incomplete support. Features like generics are missing
Full support.
Non-Java support
Need plug-ins. Out of the box support for C, C++, Ruby. PHP \development is under process.
XML editor
Need plug-ins. Out-of-the-box support.
GUI Designer
Need plug-ins. Powerful and feature rich support for SWING via Matisse.
Mobile development
Limited support, Need plug-ins.
Ready to go.

In the next article we will do some cool things with NetBeans. NetBeans can be used as an IDE, DB designer, source control tool, unit tester, and many more. And yes, you can write your own plug-ins for it. We will cover one role at a time.
Published at DZone with permission of its author, Kunal Deo.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Michael Bien replied on Tue, 2008/07/01 - 10:30am

i see it coming, this will cause a long discussion between nb and eclipse evangelists...

*bookmarked* ;-)

Daniel Spiewak replied on Tue, 2008/07/01 - 10:48am

Java SE
Incomplete support. Features like generics are missing
Full support

 I'm just going to give you the benefit of the doubt and assume this was written a long time ago.  Eclipse JDT has had Java 5 support since 3.0...four years ago.  Yes, it did lag behind NetBeans by a few months in that respect, primarily because it has its own compiler rather than relying on Sun's.

In that vein, it's funny that you mention generics as an example, because there are numerous times where the Eclipse compiler has handled a complex generic expression correctly (according to the compiler spec) and javac itself has completely fallen over.

Oh, this too is false:

Collaborative Development Need plug-ins.
Out-of-the-box support for CVS and Mercurial.

Anyway, drop the Eclipse comparison from the article and it's not bad; you did a fine job touching on NetBeans's major features.  However, you're obviously sadly misinformed on Eclipse, something which sort of rules out a comprehensive and accurate comparison.

Daniel Spiewak replied on Tue, 2008/07/01 - 12:05pm

By "Java 5 features" I meant the language features, such as annotations, enums and generics.

I'm not sure what you mean by Java 6 not working properly in Eclipse.  I use it all the time (and have been since it was first supported, about six months before release) and I've never had trouble with it.  That's both using Eclipse on Java 6 (and 6uN) as well as compiling -target 6.0.  Also, I'm not sure what you mean by "certified".  ECJ (the Eclipse Java compiler) does fully comply with the relevant JSRs, so it's certainly in line with accepted standards.

Lzszlo Hogyishivjak replied on Wed, 2008/07/02 - 4:51am

This 'needs plugins' reason is very weak. These plugins are provided by eclipse and it is very easy to get them if they are not in the package.

Kunal Deo replied on Wed, 2008/07/02 - 5:03am

That is what I'm trying Say. Eclipse is platform to build on not an IDE. You need to install plugins for even essential features.

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.