当前页面: 开发资料首页 → Netbeans 专题 → Faster Enterprise Application Development with NetBeans 5.5
Faster Enterprise Application Development with NetBeans 5.5
摘要: At the end of October, Sun introduced NetBeans 5.5, a new version of the open-source Java IDE. NetBeans 5.5 brings full support of the Java EE 5 standard, which significantly simplifies development of web and enterprise applications. Three new packs are also available with NetBeans: Enterprise Pack, C/C++ Pack and Visual Web Pack. Let's look at what new functionalities are now available in the IDE and in the packs.
By Roman Strobl
At the end of October, Sun
introduced NetBeans 5.5, a new version of the open-source Java IDE.
NetBeans 5.5 brings full support of the Java EE 5 standard, which
significantly simplifies development of web and enterprise
applications. Three new packs are also available with NetBeans:
Enterprise Pack, C/C++ Pack and Visual Web Pack. Let's look at what
new functionalities are now available in the IDE and in the packs.

Illustration 1: BPEL design using NetBeans 5.5 and
Enterprise pack
Java EE 5 standard is a
long-awaited standard that resolves problems from the previous
versions of J2EE. Although J2EE 1.3 and 1.4 provided a rich set of
libraries and tools for enterprise application development, many
developers complained that the standards were cumbersome; they were
forced to write additional code which they did not always need. Thus,
new frameworks have been created in the open-source community (for
example, Spring and Hibernate) and since these frameworks solve many
of J2EE's problems people have started to use them. Java EE 5 is
based on the experiences acquired during the creation of these
frameworks and the main goal of this version is to simplify
development and minimize the amount of written code. In my opinion,
this goal was achieved – applications created using Java EE 5
contain simple POJOs (Plain Old Java Objects) and they use
annotations instead of cumbersome XML code. The developer also writes
less code because intelligent defaults have been introduced in many
different places.
It appears that with these
simplifications there is less functionality needed from an IDE simply
because Java EE 5 applications are much easier to write. Despite all
the improvements, an IDE can still save time and speed up coding.
With NetBeans 5.5, you can use code completion for annotations,
generate code using various actions and wizards, and use templates
for all kinds of classes, persistence management, etc. NetBeans 5.5
is unique because it can generate a functional web application with a
database back-end in several minutes (similar to the Ruby on Rails
framework). NetBeans fully supports all the new standards which are
contained in Java EE 5:
- Web Services based on JAX-WS 2.0
- Enterprise Java Beans version 3.0
- Java Persistence API
- JavaServer Faces version 1.2
NetBeans
supports application servers Glassfish (Sun), JBoss, Weblogic,
Websphere and Tomcat. Other application servers are supported using
plug-ins which are created by the community. Not all application
servers support Java EE 5 at the moment; expectedly, NetBeans lets
you write applications using the older versions of the J2EE standard.
Although Java EE 5 support
was the main theme of version 5.5, other new features are available
as well. Many developers consider NetBeans to be one of the best IDEs
for Swing development. The GUI builder in NetBeans has been enriched
by many new features, with the support for GUI internationalization
probably standing out as the most important improvement. You can get
the new GUI builder features from the NetBeans update center.

Illustration 2: NetBeans GUI builder, also known as
project Matisse
NetBeans 5.5
now also supports the Subversion versioning system, whose popularity
in the open-source community is constantly growing. NetBeans 5.5 also
contains improvements in the module development area – new
templates, new sample application, better library management and few
other improvements.
The web face of
NetBeans has also changed with NetBeans 5.5. The netbeans.org website, where
you can find an extensive database of articles about using NetBeans and
also join the growing online community of NetBeans users,
now sports a more modern look and straight-forward navigation to
information about the various add-on packs:
- Mobility
Pack – visual tools for Java ME
- Visual
Web Pack – visual development of JavaServer Faces
- Enterprise
Pack – visual tools for SOA application development
- Profiler
– lets you locate and solve performance-related issues
- C/C++
Pack – support for C/C++ in NetBeans
Mobility
pack
now also supports the CDC standard (Connected Device Configuration),
which allows the creation of Swing applications for mobile devices.
Although this standard is very new, you can run applications with a
rich Swing GUI on some of the mobile phones. Application development
using the CDC standard is closer to the Java SE development, so it is
easier to grasp for many developers who don't yet have experience
with Java ME.

Illustration 3: Visual designer in NetBeans 5.5
Mobility Pack
Probably the
most innovative feature of the Mobility Pack for NetBeans 5.5 is SVG
(Scalable Vector Graphics) support. Many mobile applications suffer
from the device fragmentation problem. Thanks to SVG, it is possible
to create applications that look good regardless of the size of the
display. It is also possible to create animation and increase
interactivity of mobile applications.
Mobility Pack
contains support of the JMUnit framework in version 5.5, as well. It
serves for mobile application testing. Java is used successfully on
mobile devices; today, more than a billion mobile phones support Java
and Java is also present in cars, PDAs, video recorders and in many
other devices.
Visual Web Pack is a new add-on pack, which lets you create web
applications using drag
& drop, a functionality from the Java Studio Creator 2 IDE.
When many developers asked for a single IDE for web application
development, Sun responded by creating Visual Web Pack for NetBeans,
which incorporates functionality from Java Studio Creator in
NetBeans. Compared to Java Studio Creator, Visual Web Pack is
enriched by Java EE 5 support and you can deploy to many application
servers including Tomcat. It is also possible to take advantage of
all the new features introduced in NetBeans 5.x, including many
editor improvements or support for additional versioning systems.

Illustration 4: Visual Web Pack – Web application
development can be easy
Visual Web
Pack
can be used to map database data to JSF components visually. It is
very easy to display data from an enterprise database using a JSF
table component. You can simply drag & drop the table to the
component and the IDE analyzes the table metadata and does the
data-binding. You can, of course, change the SQL query visually and
perform database joins using additional tables and foreign keys.
Visual Web Pack also contains an advanced CSS editor and lets you use
rich AJAX components. Many JSF components come bundled with Visual
Web Pack and can be used in your web applications. Visual Web Pack is
free and can be downloaded without the need to register, similar to
the NetBeans IDE and the other add-on packs.
Enterprise
Pack
is a new add-on pack which allows you to create SOA (Service Oriented
Architecture) applications. It is possible to create a business
process in the BPEL language and visual tools are available to define
such a process. The pack also contains visual editors for WSDL files
and XML schemas. A JBI engine comes bundled with the Enterprise Pack,
so you get all the tools required for SOA application development.
NetBeans
Profiler has been available since version 4.1 and it provides rich
functionality for both CPU and memory profiling. In version 5.5, the
Profiler was enriched with support of Java EE profiling and you can
also profile applications running on 64-bit architectures and on
Intel Macs. Unlike some of the other profilers, you can define
exactly which parts of the application should be instrumented, thus
there is minimal performance overhead during profiling.

Illustration 5: NetBeans Profiler – CPU profiling
The last add-on
pack for NetBeans is the C/C++ pack, which enables writing of native
applications in NetBeans. Unlike Sun Studio, another IDE from Sun,
you can use the C/C++ pack even on the Windows platform. Many people
consider NetBeans a great Java IDE, but nowadays you can use NetBeans
for additional languages, too. There are plans to add support for
additional scripting languages in the next version of the IDE.
You have
probably noticed that NetBeans 5.5 offers many features that are not
available in similar development tools or that are only available in
expensive commercial products. NetBeans 5.5 raises the bar for all
Java IDEs by supporting the latest standards with all features
available in one integrated tool and at a price that anyone can
afford – free. It is not surprising that the NetBeans community
has experienced rapid growth over the last two years and continues to
attract new members. If you want to join the NetBeans community,
visit netbeans.org, download NetBeans and join the discussions on
NetBeans mailing lists.
(This article originally appeared in the Czech Sun News.)