HomeDigital EditionSys-Con RadioSearch Java Cd
Advanced Java AWT Book Reviews/Excerpts Client Server Corba Editorials Embedded Java Enterprise Java IDE's Industry Watch Integration Interviews Java Applet Java & Databases Java & Web Services Java Fundamentals Java Native Interface Java Servlets Java Beans J2ME Libraries .NET Object Orientation Observations/IMHO Product Reviews Scalability & Performance Security Server Side Source Code Straight Talking Swing Threads Using Java with others Wireless XML
 

Web-development of every kind is one focus of Sybase PowerJ 3.0 (see Figure 1). In addition to a complete Java development environment, PowerJ comes with a set of tools that differentiates it from other Java IDEs on the market. These tools are PowerDynamo, a Web site hosting tool that allows you to drive a Web site from a database; PowerSite, a Web site management tool; Adaptive Server Anywhere, a small-footprint relational database; ObjectCycle, a source code control package; and Enterprise Application Server. Sybase is also lowering the price of PowerJ, placing it in the $600­$800 range. Given the tools that come in the package, that's not an unreasonable price.

Figure 1
Figure 1:

I'll begin my review by focusing on PowerJ itself. This is the third version of PowerJ, and it's had several years to be polished. The IDE features color-syntax highlighting, background compilation and drag-and-drop coding. It also provides a large number of helpful features including the ability to remember common settings (called profiles) so they can be reused. Figure 2 shows the transaction properties. By selecting a previously stored profile, you can load all your common JDBC settings. What's also nice about PowerJ is that the designers have realized that the connections and data can come from one source at design time and another at runtime. For example, when you create a component for Enterprise Application Server (EAS) you'll typically use a connection cache from the server, but when you're testing you'll use a local JDBC connection. Not only is this provided for, but PowerJ can even look up the connection caches inside EAS for you so you don't have to worry about typing errors.

Figure 2
Figure 2:

Select a component from the palette and drop it on the screen to place a new instance. Then drag that component into the code window and the properties window opens, allowing you to select the method or attribute you wish to work with. This feature isn't limited to items on your screen ­ you can drag objects from a variety of views onto the code window. Experienced coders will probably ignore this for the most part, but it's good for new developers, or for finding that odd property or method you just can't remember.

PowerJ 3.0 also provides the Java version of one of Sybase's crown jewels ­ the DataWindow. Programmers familiar with PowerBuilder know that this control kept PowerBuilder in the market and competitive with Visual Basic even though VB costs thousands less.

It's hard to describe the DataWindow ­ and its nonvisual brother, the DataStore ­ to people who haven't used it. That's because it can be so many different things. It can be used to create complex reports for display, to create a grid control, to design the entire input portion of a screen and to easily build and work with drop-down data. Plus it can enforce business rules.

The DataWindow also offers an intriguing option for application partitioning. One of the difficulties in designing any partitioned application is figuring out how to transfer data from the screen to the server. Consider an order-entry screen for some direct marketing company: the typical user may create multiple line items for a single order, then send them back to the server to be processed. There may be rules associated with the items, such as a discount for purchases exceeding a certain amount.

The DataWindow provides a solution for packaging this data by allowing you to get the state of the data from the control. This state can be passed into the server, or obtained from the server, and synchronized. Additionally, after the data has been initially obtained from the server (revising the order, for example), only the changes need be sent back. The DataWindow supports the ability to obtain only the changed rows and return them to the server.

Another interesting feature of the DataWindow is the ability to transmit not just the data but the presentation itself to the client. This allows the server to swap views as needed, perhaps in response to security requirements.

The DataWindow is also available in an HTML version that can be used in PowerDynamo. This version converts the DataWindow within the PowerDynamo environment to a JSP that allows the same or nearly the same presentation variety and enforcement as the Java version. And you can reuse the DataWindow definitions that you create between PowerBuilder, PowerJ, PowerDynamo and even Sybase's Power++, which is a C++ development environment.

Developing a DataWindow definition is easy. PowerJ includes a DataWindow Builder utility that provides wizards to walk you through the steps. Developers familiar with PowerBuilder will realize that the DataWindow Builder is in reality a featured limited version of PowerBuilder.

I started with the Employee table from the sample database, then selected a free-form presentation style and was on my way. To make it more useful, I'd edit some of the fields, turning things like the Department ID into a drop-down list box. I'd also probably hide the employee ID field and make it a sequence in the database, turn the sex choice into radio buttons for male and female, and put min and max limits on the salary. After that, this definition would be ready to use. I'd create a screen to use this component, and a server-side object that would process the input using a DataStore.

A DataStore is the same as a DataWindow except that it doesn't display at runtime. Obviously this is useful in a server component, but you can have a DataStore on the client side and then drive multiple views from a single set of data.

PowerJ provides the ability to create what Sybase calls Visual Classes, which perversely enough are not visual at runtime. This ability allows you to do visual drag-and-drop programming on a class that you would normally edit completely in a code window. Sometimes this is useful, but many developers will still prefer to work completely in the code window.

The development environment of PowerJ is also geared toward team development and deployment of code, not just coding itself. ObjectCycle is included as a source code control solution. One advantage of this product is that every Sybase development tool works with ObjectCycle, and it's free. It's also not a bad control product. If you wish to use some other tool, such as PVCS, that's also supported. This in itself isn't really novel ­ JBuilder provides PVCS, for example. But the deployment options in PowerJ, and in its accompanying tools, are unique. By default there are a number of options, and you can configure more yourself. These options include deploying Java code to a Sybase database to run inside the database, to PowerDynamo for use in a Web site, to an EAS server, to a file system or to a Web site. Because of the way PowerJ organizes its source code into a hierarchy of Targets, you can choose to deploy all dependencies automatically as well, making it easy to ensure that the entire distribution gets where it's supposed to go.

As stated earlier, PowerJ ships with a wealth of accompanying tools. Adaptive Server Anywhere (ASA) is a single-user version of Sybaseıs departmental server. This is no toy database. Besides supporting two SQL syntaxes, the original Watcom SQL and Sybaseıs Transact SQL, ASA supports database replication and the use of Java. ASA is also extremely easy to administer, making it an ideal development tool.

PowerDynamo is a Web server that allows you to dynamically drive the content from your database in a simple, easy-to-develop fashion. I didnıt dive into PowerDynamo deeply, but the demonstration I got from Sybase was impressive and fast.

PowerSite is a Web site management tool and HTML authoring program. While not as polished as FrontPage, PowerSite is more flexible when used in a team environment. PowerSiteıs HTML editor is easy to use, straightforward and supports all server-side models. Once again Sybase has loaded this tool with drag-and-drop ability. PowerSite also features its own dialect for creating pages, one that allows the pages to be translated to ASP, JSP or PowerDynamo so they can be deployed in IIS, Netscape or Power- Dynamo servers. If youıre unsure where youıll be served up from, this is a good way to keep your options open, but itıll probably be easier to write to the model youıll be working with. PowerSite also makes this easy by placing all of the models on the drag-and-drop palette.

The most impressive add-on to PowerJ is Enterprise Application Server 3.0 (EAS). Under its old name of Jaguar, EAS was one of the first offerings in the application server arena, and offers the broadest support for development, including COM, CORBA, EJB and Native PowerBuilder. PowerJ comes with a development license ­ to deploy an application youıll need to purchase additional licenses. EAS was one of our Editorıs Choice winners this year, based largely on the solid Java support and the ability to integrate into just about any distributed coding environment. EAS runs on NT or Solaris, and will also be available on AIX and HP-UX at a later date. Unfortunately, the EJB support is only at the 0.4 spec level, but Sybase plans to bring this up to 1.0 compliance in a point release before the end of the year.

I tested PowerJ with EAS and was impressed by the integration provided. When you design screens you can drag EAS connections right onto them, and the setup wizards make it simple to establish the necessary connections. When you create a component for use within EAS, PowerJ creates all the necessary methods for you and then provides a fairly easy way to add attributes and methods. Unfortunately, this is driven from a menu rather than a toolbar, so there are annoying extra steps needed to perform this function. You also have to add all methods this way, or your interface class will be out of sync with your implementation class. (You can always edit the interface class directly, so this isnıt a large problem.)

One of the most valuable integration features of PowerJ is its multithreaded remote debugging. When debugging a multithreaded application, you can select the thread you wish to monitor and then control the state of all the other threads.

Possibly the most exciting feature, though, is debugging server code remotely. You can pick a component within EAS (you must be running the debug version of EAS, which is provided), set breakpoints and watch points, and wait for it to be executed. I canıt tell you how valuable this is in getting server code debugged. And you can do it from anywhere as long as you can make a TCP/IP connection to the server machine.

There are some areas for improvement in PowerJ. This tool was originally aimed at corporate developers, and it shows that focus. Itıs harder to learn than tools like JBuilder. Part of that is due to the increased functionality it provides, but also thereıs just too much of a learning curve. To really use the tool you need to learn about targets, projects, objects, classes and deployments. Itıll take the average developer longer to come up to speed on PowerJ. In general, I think itıll be worth it if you have a need for anything besides basic development.

Pricing is still somewhat higher than other solutions, although with the tools included the pricing is more than reasonable. Sybase has also provided a Java-only learning edition thatıs downloadable from their Web site. Itıs not known whether they will continue this when version 3.0 is released. Still, with the price now well under $1,000, if you have any need for more than just a straight Java IDE, this is definitely a product to consider. And if you have a shop that needs to leverage previous investments in PowerBuilder expertise, this is the tool for you.

About the Author
Sean Rhody is the editor-in-chief of Java Developerıs Journal. He is also a senior consultant with Computer Sciences Corporation, where he specializes in application architecture ­ particularly distributed systems. He can be reached by e-mail at [email protected]

 

All Rights Reserved
Copyright ©  2004 SYS-CON Media, Inc.
  E-mail: [email protected]

Java and Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. SYS-CON Publications, Inc. is independent of Sun Microsystems, Inc.