Channels ▼
RSS

Dreamweaver Wannabes


Dreamweaver Wannabes

Java 2 Enterprise Edition technology has been successful in developing enterprise-grade scalable Web applications. However, developing the Web presentation layer (the part of the application that interacts with the browser) has proven a difficult task in J2EE. Macromedia's Dreamweaver (the 2004 Jolt Hall of Fame winner) is still the indisputable king of website content authoring. While it's possible to hook the J2EE back end to the Web presentation layer developed in Dreamweaver, the mixture of Java and non-Java development environments hinders J2EE developer productivity. Java developers need an integrated Web development tool for both Web designers and application developers in a pure Java environment.

Luckily, three new tools do just that: Sun's Java Studio Creator, M7's NitroX for Struts and Genuitec's MyEclipse IDE. All three are built upon popular open source Java IDE platforms (NetBeans and Eclipse). Hence, they already have large potential user bases, can evolve with the underlying IDE, and are licensed under subscription-based pricing schemes. For a yearly subscription fee, developers get a year's worth of free updates. I'll use Dreamweaver as a benchmark in judging features and ease of use, but first, let's review the J2EE Web layer frameworks and the requirements for tools.

Why It's so Difficult

The Model-View-Controller (MVC) design pattern is key to developing maintainable J2EE Web apps. The pattern uses a single Java servlet (the controller) to process all user requests from Java Server Pages (JSPs, the view) displayed on the client browser. The servlet dispatches the required action to the business objects (the model).

Based on the results returned from the model, the controller servlet determines which JSP to display next and forwards the browser to that page. Session JavaBeans are used to store application state information across different layers and pages. The MVC pattern nicely separates the presentation layer from the business layer and lets us manage page navigation rules in the centralized controller.

Although the concept of the MVC pattern is straightforward, the implementation isn't. Developers can roll their own implementations or use one of the MVC frameworks, which are specially designed to formalize the implementation using a design contract and to allow reuse of the key infrastructure code. Using the frameworks helps to keep the code more maintainable for others.

The open source Apache Struts framework is the most widely used MVC framework in today's enterprise Java Web applications. Extending the Struts framework with a UI component model and an event model, the Java Community Process (JSR-127) has defined a new Web presentation framework called Java Server Faces (JSF). JSF borrows many key concepts from the components- and events-based desktop UI APIs to promote code reuse and uses a Struts-like framework to handle inter-component communication. JSF is becoming a standard component in the J2EE specification. Both Struts and JSF define their own JSP custom tag libraries to help generate the HTML code that conforms to the framework requirement. Both frameworks also define configuration files to store navigation rules and other application-specific properties. Given the complexity of those frameworks, good development tools can significantly boost productivity for both novice and expert developers. In fact, the JSF is designed specifically to work with tools.

Key Requirements

What do I expect a good J2EE Web application development tool to do?

  • Support standard frameworks. A standard framework--based J2EE application can run on any application server, reducing the risk of vendor lock-in. The JSF is a Java Community Process standard framework. The Apache Struts is a de facto standard because of its wide adoption.
  • Support visual editing of Web pages. Any good Web development tool must allow you to visually edit Web pages. The Web pages in J2EE Web applications aren't simple HTML pages—they're JSPs with framework-specific custom tags and dynamic values from JavaBean tags. Supporting a WYSIWYG Web page editor in this environment is a great challenge.
  • Automatically generate JavaBean classes for forms, configuration files and other development artifacts. The MVC frameworks (and J2EE in general) use many programming artifacts to glue the system together. For example, each form on a Web page should have an associated JavaBean object to store the user-input values. The configuration files must declare the names and scopes of managed beans in the application and so on. Writing those artifacts by hand not only produces duplicated code but is also prone to inconsistency—it's best to have those files generated by the development tool.
  • Support visual editing of navigation rules. Navigation rules is a key component in any MVC framework. They're typically stored in an XML-based configuration file. The tool should visualize and allow developers to edit those rules.
  • Support intelligent source code editor. For advanced developers, working with the source code is much more efficient than working with visualized representations or wizards. In the MVC frameworks, there are a variety of source code files to edit: Java source code, JSP code, XML configuration files and so on. The source editors should support syntax highlighting, consistency checking and code completion suggestions.
  • Support scalable projects. A key strength of J2EE is its ability to develop highly scalable applications. Visual J2EE IDEs have the unique potential to support both fast prototyping and scaling the prototype application for production use. How did these new IDEs fulfill—or fail—these expectations?

Java Studio Creator
(see ratesheet below)

Based on the open source NetBeans IDE technology, the Java Studio Creator is part of Sun's grand plan for making Java an appealing platform for corporate developers currently using Visual Basic. Built around the JSF technology, it offers a Web development experience similar to that of Microsoft Visual Studio. Since JSF is a relatively new standard, not all commercial J2EE application servers support it. The Java System Application Server Platform Edition 8, which contains the JSF reference implementation, is bundled with the Java Studio Creator. In addition, the JSF framework's scalability in the production environment isn't yet known.


[click for larger image]

Visual Editing
Sun's Java Studio Creator has a grid-based layout engine that provides control over the accurate placement of the UI components on a canvas.

Java Studio Creator's greatest strength is its support for the visual programming paradigm, which corporate developers are familiar with. To build a Web page, simply drag-and-drop JSF components from a palette onto the designer canvas and edit their display properties in a property panel. A grid-based layout engine provides control over the accurate placement of the UI components on a canvas. "Visual Editing shows the component palette and the visual designer in action. The visual designer supports two-way editing. If you change either the visual designer or the JSP source, the other changes accordingly. However, a key missing feature is support for copying and pasting UI components on the visual designer. The JSF UI event model is integrated in the visual designer. For example, if you double-click a button on the designer, the corresponding event callback method in the form bean is displayed in the source editor. All the underlying plumbing, including the configuration files and related JavaBean classes, is generated and kept up-to-date by the tool. The Java Studio Creator supports visual editing of the navigation rules in the corresponding configuration files. In addition to the standard JSF tool support, the IDE provides visual wizards for generating Web services proxies, JDBC queries and JavaBean properties.

The Java source code editor in Java Studio Creator supports real-time syntax-check and code completion suggestions. However, Java source code refactoring is not yet supported, and the JSP and XML editors support only syntax highlighting. The lack of powerful editors might not be a big issue, given the tool's clear focus on rapid visual programming. Also, debugging is supported only on the bundled Sun Java Application Server.

Java Studio Creator is a complete end-to-end visual development tool for rapid development of simple J2EE apps, but version 1.0 sometimes feels unpolished or even buggy. I had difficulties changing bean names or properties and out-of-sync application outlines. Sun is improving this product, however, with frequent updates.

NitroX for Struts
(see ratesheet below)

M7's NitroX for Struts is a plug-in for the open source Eclipse IDE platform that adds Struts and JSP development support to Eclipse while allowing developers to use Eclipse's excellent IDE features, such as team collaboration and test-driven development support. Unlike Java Studio Creator, NitroX targets experienced Java developers with large and complex J2EE projects.


[click for larger image]

Error Alerts
The NitroX JSP editor makes custom tags, external file names and JavaBean properties available in the code-completion suggestions. If the developer misspells any of these, the editor gives an error or warning.

NitroX's strength lies in its ability to understand the Struts application structure and make the information available to all parts of the IDE. For example, the JSP editor automatically makes custom tags, external file names and JavaBean properties available in the code-completion suggestions. If the developer misspells any of these, the editor gives an error or a warning. ("Error Alerts shows the NitroX editor alerting the developer for a misspelled file name in an HTML link.) In the configuration file editor, the available Struts action names and forward locations are automatically checked for typing errors and consistency at real-time. When we inspect a variable in a JSP page, NitroX's context-aware editor quickly locates the relevant lines in associated Java source code files where the variable is defined. These powerful editor features are what power users have come to expect from a first-class plug-in on the Eclipse platform: They can greatly boost productivity for experienced developers who prefer to work directly with source files. NitroX also imports J2EE source code from external projects and analyzes the application structure in the importing process. The product's context awareness enables it to manage projects scaled from prototypes to distributed complex applications.

The NitroX debugger takes advantage of this deep inspection information, letting developers debug directly against the JSP source. You can step through each line of code in the JSP, access JSP variables at runtime and even step into the Java source code for custom tags. I've found that the debugger works reliably even in large applications with many debugging variables and break points. Furthermore, NitroX lets developers debug on external JBoss, Tomcat, WebLogic and WebSphere application servers.

The NitroX two-way visual JSP editor is also first class. It renders not only HTML tags but also custom JSP tags and JSP includes. The split combo window shows both the designer and the source code editor simultaneously. Numerous wizards are provided to make it easier to insert Struts forms into JSP pages and generate the necessary artifacts. However, since Struts isn't a component-based framework, you still need JSP coding knowledge to work with the designer. NitroX supports a two-way visual designer for the navigation rules in the Struts configuration file. The navigation designer also lets you zoom in or out and specify the levels of actions to display, letting you focus on individual parts of the application as necessary—a nice feature.

Although NitroX itself supports only the Web presentation layer development, you can use other Eclipse plug-ins installed in the same IDE to develop the necessary database, business logic and Web services components that work with the Web layer. For instance, NitroX works with the IBM WebSphere Application Developer IDE, which supports the entire J2EE technology stack on Eclipse. Priced at $499 per user per year, NitroX for Struts is a solid tool that excels in what it does.

MyEclipse IDE
(see ratesheet below)

The MyEclipse IDE consists of a set of commercial and open source Eclipse plug-ins that add some important J2EE development features to the Eclipse IDE: They support JSP, Struts and JSF development in the Web layer as well as database, object-relational mapping and EJB development in the business layer—the whole spectrum of scalable J2EE application development. Instead of writing everything from scratch, MyEclipse takes advantage of Eclipse's modular nature and integrates third-party Eclipse plug-ins into its product to provide an abundance of J2EE features at a low price. However, the plug-ins often have inconsistent qualities and user experiences, and none has a complete view of the entire application. Many Flash-based visual tutorials for MyEclipse are available from the "Tutorials and Demos section of the Eclipse website.


[click for larger image]

MyEclipse in Action
All editors share a common framework and provide code completion and syntax coloring, outline edit view with insert/delete/move node capabilities, integrated editable properties view, and open-on feature for selected text entity such as linked CSS and JavaScript files.

MyEclipse greatly enhances Eclipse's default text and Java editors to support other content types, such as JSP, XML, HTML, CSS and JavaScript. All editors share a common framework and provide code completion and syntax coloring, outline edit view with insert/delete/ move node capabilities, integrated editable properties view, and open-on feature for selected text entity such as linked CSS and JavaScript files (see "MyEclipse in Action). For visual developers, MyEclipse provides a full-featured HTML designer, but the visual support for the JSP editor is weak compared with other tools. The JSP editor supports only source editing with native preview capabilities. The preview option renders Struts tags, but not custom tags or JSP includes, and lacks full inspection information for the application. Misspelled names for artifacts included in the JSP, such as external file names, key to resources or Struts actions, aren't flagged, so it's up to the developer to maintain the application's consistency.

A powerful visual editor for the Struts configuration file is supported in MyEclipse. You can edit the file using the pop-up wizards in the outline panel, the visual navigation flow diagram or the XML source editor. The wizards also generate Struts form beans and action classes. The changes made in each panel are synchronized. The JSF configuration file editor, on the other hand, is rudimentary and not very useful.

The debugger lets developers step through JSP source files and monitor all local variables. Be warned that it steps into embedded Java code snippets, but not into custom tag handler objects or JavaBean objects. You can debug on any JSR-045 complement application server, including JBoss, Tomcat, JRun, Sun and WebLogic.

The MyEclipse IDE is licensed at $29.95 per user per year—a far lower price than its competitors. The company provides excellent free support through its discussion forums and has a quick update release cycle of approximately three months. MyEclipse is an excellent choice for experienced developers looking for productivity gains over simple text-based tools or non-J2EE IDEs.

Wrapping It Up

All three IDEs support rapid development of J2EE Web applications based on standard frameworks. The Java Studio Creator best suits corporate developers who want a simplified development process and visual prototyping. NitroX for Struts provides context-aware editors and debuggers for both experienced and novice developers managing complex code bases. Finally, the MyEclipse IDE offers a full range of J2EE tools for experienced J2EE developers at a very affordable price.

One note to end on: While the "code in Dreamweaver was intended to be hidden from the developer, in a Java IDE, the developer must work on the code directly (at least in some cases). Generated code from these tools is all well formatted and relatively easy to read—and in that sense, Java tools are better than Dreamweaver.

Java Studio Creator
Sun Microsystems
4150 Network Circle
Santa Clara, CA 95054
http://www.sun.com/software/products/jscreator/

Pricing Scheme:

30-day free evaluation. Subscription fee is $99 per user per year, which includes installation support.

System Requirements:

Solaris (UltraSPARCIII 750MHz and 1GB RAM); Windows (Intel P4 1GHz and 512MB RAM); Linux (Intel P4 1GHz and 512MB RAM). Mac OS X version in beta.

Rating: 3 stars The Rate Sheet
Pros:
  1. Support drag-and-drop visual development is based on JSF.
  2. Java Studio Creator automatically generates all JSF artifacts.
  3. It supports visual programming for Web services and databases.
Cons:
  1. JSF is still immature for production use.
  2. Its navigation rule editor is simplistic.
  3. It's riddled with numerous small bugs that affect use.

NitroX for Struts
M7 Corp.
20300 Stevens Creek Blvd.
Cupertino, CA 95014
www.m7.com

Pricing Scheme:

30-day free evaluation. Subscription fee is $499 per user per year with free installation support. Professional support is $100 per year for three incidents. NitroX for JSP, which does not have Struts support, costs $399 per user per year and $60 per year for three support incidents.

System Requirements:

Windows 2000/XP (Linux coming in Q3 2004); 512MB RAM; Eclipse 3.0 or 2.1.x

Rating: 4 stars The Rate Sheet
Pros:
  1. NitroX features context-aware source code editors with real-time consistency checking.
  2. Debugging support spans across multiple application layers.
  3. NitroX uses the JSP visual designer.
Cons:
  1. NitroX is relatively expensive.
  2. No free online support is available.
  3. NitroX runs only on Windows (Linux support is planned for Q3 2004).

MyEclipse
Genuitec LLC.
2505 Powderhorn Dr.
Plano, TX 75025
www.myeclipseide.com

Pricing Scheme:

30-day free evaluation. Subscription fee is $29.95 per user per year.

System Requirements:

Windows, Linux or Mac OS X; Eclipse 3.0 or 2.1.x

Rating: 3 stars The Rate Sheet
Pros:
  1. MyEclipse offers editor support for many source and visual content types.
  2. It provides a wide range of J2EE features beyond the Web layer.
  3. The price is right!
Cons:
  1. Application consistency must be maintained by the developer.
  2. MyEclipse has only weak visual support for the JSP development.
  3. Included third-party plug-ins are inconsistent.


Dr. Michael Juntao Yuan is an author, developer and software architect for end-to-end software solutions. He is the author of Enterprise J2ME (Prentice Hall, 2003) and Developing Scalable Nokia Series 40 Applications (Addison-Wesley, 2004). Yuan has a Ph.D. from the University of Texas at Austin and works as a research associate at the Center for Research in Electronic Commerce.


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.
 

Video