Start right with the new WDSC workbench

Get an overview of the basic features in IBM's new WebSphere Development Studio Client for iSeries Eclipse workbench.

This Content Component encountered an error

Jim Mason

WebSphere Development Studio Client for iSeries

Running in Windows workstations, the WebSphere Development Studio Client for iSeries (WDSCi) is IBM's newest client toolset for building almost any type of iSeries host, Java or Web application. It combines IBM's previous tools (VisualAge for Java and WebSphere Studio) into one Integrated Development Environment (IDE) and adds many new tools.

All of the IBM development tools for the iSeries, including WDSCi are contained in product 5722-WDS (WebSphere Development Studio, which is a no-charge upgrade for customers on software subscription for one of the existing older development tools (such as ADTS, RPG, COBOL, etc ).

The bottom line: With its easy-to-use wizards and full support for Java, J2EE, XML and Web services, WDSCi builds integrated, iSeries e-business applications and data for the Web easier, faster, cheaper and better than any other tool we've seen. WDSCi is a "multi-layer" tool that includes the following:

  • WebSphere Development Studio Client for iSeries (WDSC)
    Builds iSeries enhancements using WebSphere Studio Site Developer Advanced (WSSDA) and adding iSeries server integration, special wizards, WebFacing, CODE/400, etc. (Author: IBM Toronto)
  • WebSphere Studio Site Developer Advanced (WSSDA)
    Builds WebSphere Studio using Eclipse and adding Web perspective, XML tooling, Data, server perspectives, Web services support. (Author: IBM Raleigh)
  • Eclipse open source workbench
    An open-source, open-standards based, "pluggable" Java development tool environment. (Author: IBM OTI)


David Slater

What is Eclipse?

When you use Eclipse or any IBM tool built on Eclipse, you work in the Eclipse workbench using its features and all the "plug-in" tools included. It has a generic set of development services that can be used by any plug-in tool and includes a built-in Java Development Tool plug-in.

Currently, WebSphere Studio tools are built on top of Eclipse version 1.0. Eclipse version 2.0 is nearing release. Future Studio tool versions will use version 2.0.

Eclipse development concepts

Multi-language capable, standards-based workbench
Eclipse tools are built on open standards (W3C and Java), and the code that it generates complies with open standards so that you can write Java applications that are portable across platforms. Where else could you create one Java bean that can update your iSeries general ledger, an Excel spreadsheet and a Lotus Notes database at the same time?

While Eclipse includes a built-in Java Development Tool (JDT), it can be used for development in other languages as well. WDSCi supports development of RPG and COBOL using the LPEX editor, Remote Systems Explorer (RSE), iSeries host compilers and the distributed debug tool for debugging iSeries applications remotely. IBM is moving other language development (C++, for example) into Eclipse as well.

Tool features added as workbench plug-ins
Eclipse provides a standards-based platform that IBM and ISVs can easily extend equally. ISeries change-management vendors such as MKS and Aldon are building plug-ins. Ebt-now is building a plug-in to automate its WebFacing Extensions in its QuickWebFactory along with some other automation tools. Eclipse's architecture allows vendors to deliver tools that integrate automatically. In other IDEs, the user, vendor or both must work to integrate tools.

Role-based, integrated development scenarios
Role-based development has separate views or perspectives for each role. Whether you are part of a development team or a one-person shop, roles DO make it easier --especially for new developers -- to focus on the common tool features you need for a specific task. Some base roles included in WebSphere Studio:

  • Web
  • Java
  • Web services
  • EJB
  • Server Tools

A perspective for a role includes different views for browsing and selecting various resources. In addition, perspectives contain editors for editing resources. The editors are invoked based on the type of a selected resource. Each perspective can be customized as needed. You can easily open new views and editors or close existing ones in the perspective.

Blends file-based development with actively managed workspace
IBM's older tools took different approaches to managing development resources. The older versions of WebSphere Studio used a file-based approach to managing ALL resources similar to other Java development tools on the market such as Forte, JBuilder, etc. VisualAge for Java used an active-managed workspace and linked code repository to dynamically manage editing and compiling in Java.

Eclipse really blends both approaches, and you should be aware of this. While your development is organized using a file-based approach matching the standards models that exist (J2EE, etc.), the workbench actively manages development for editing, validating, compiling, debugging, etc. Many of Eclipse's easy-to-use features wouldn't be available without this support.

Version control options
Eclipse supports both standalone and team development scenarios. For team-based development, Eclipse allows third-party version control systems to manage source code in projects dynamically using standard Java interfaces. CVS is an open-source version control system in wide use that is free from www.cvshome.org. Other vendors also offer version control systems for Eclipse. For standalone developers, Eclipse offers a configurable local history option allowing developers to "rollback" to previous versions of source code as needed.

Eclipse workbench features

Overall, there are significant pluses for this new IDE. Yes, there are some missing features from the older WebSphere Developer Tools for iSeries, BUT there are usually reasonable equivalents available. Let's review some of the advantages the new tools have over the old:

  • Multiple windows can be open at the same time for rapid navigation between perspectives.
  • Configurable source code repository -- the default model is CVS available for free at www.cvshome.org, but you can install ClearCase or other version control repositories.
  • Configurable Java runtime environments -- your project can target and test in a specific JDK.
  • Automated application packaging by application type to simplify deployment.
  • Wizards automate many of the common tasks to create and configure resources that meet J2EE specifications, improving your productivity.
  • Customization -- besides look and feel, you can customize the behavior of the IDE using the preferences editor. For instance, I can easily add other editors for a given file type (e.g. jpg ) in addition to or replacing the default editors provided with the tool.
  • Reorganizing Java classes is easy with built-in refactoring tools, most of which come from VisualAge.
  • An integrated, flexible unit-test environment and a distributed, remote debugger further shorten the development cycle.
  • More productive editors -- IBM's added optional line number references (which just happen to be used in debug displays for reference) and optional, dynamic content-assist menus that make it faster for new developers to build code.
  • Vendor plug-ins for the workbench -- for instance, ebt-now has tools we want to plug-in that allow customers to easily create Java WebReady application definitions from existing 5250, batch applications and DB2 databases quickly. We can now make that a downloadable feature for your Studio IDE. We can now integrate our services and your development over the Web.
  • The help perspective is similar to VisualAge help but has better search control and is context sensitive. (In any view, press F1 and a context help menu for that object shows with options to select.)

Java Development Tool (JDT ) features

JDT perspective features include the following:

  • Packages view
    Shows all packages defined IN your project as well as packages referenced on your project "build path".
  • Java editor
    The editor provides automated formatting, context sensitive assists, incremental edit and compile as well as other ease of use features.
  • Outline view
    Shows all fields and methods in the currently select Java class. You can navigate quickly be selecting an element in the outline view.
  • Tasks view
    Lists every error found when your Java source is compiled. Click on an error to go that portion of your code for editing.
  • Console view
    Shows Java console output from running your applications.
  • Incremental Java compiler.
  • Context Assist menu in Java editor
    Select the System class in our example and below and click right mouse button to find the context assist menu showing all the elements you can choose from the System class.
  • Refactoring tools
    Reorganizing Java classes is easy with built-in refactoring tools, most of which come from VisualAge.
  • Configurable preferences to control editing.
  • Export options for packaging your applications.
  • Import options for bringing outside Java resources into your project.

Build your first Eclipse application

In this section you will learn how to create, compile, debug, run and export Java classes in Eclipse. We will create a simple Java program that will display the current runtime environment: classpath, etc.

If you are new to Java, it is handy to be able to retrieve the runtime Java configuration information running this application. When completed, the application will retrieve a properties object from the System class with the Java runtime information. Then it will iterate over each key-value pair in the properties object and print the key (description) and value to a separate line in the console for output.

Some sample output in the console view will show:

ShowEnvironment ran
ShowEnvironment - lists java runtime properties from System object

 java.assistive   ON
 java.runtime.name   Java(TM) 2 Runtime Environment, Standard Edition
 sun.boot.library.path   C:wdscWSSDjrebin
 java.vm.version   1.3.0
 java.vm.vendor   IBM Corporation
 java.vendor.url   http://www.ibm.com/
 path.separator   ;

Steps to create ShowEnvironment.java

  • Create a new Java project
  • Create a new Java class
  • Run the Java class
  • Debug the Java class
  • Modify a method in the Java class
  • Run the Java class
  • Export the Java class to the file system

Eclipse navigation
If you can't find an icon to press start a function listed below or have any other issues performing these steps, press the Help on the Eclipse menu bar and you can look up the specific task.

The left side of the Eclipse workbench has two top icons available. The top one is a wizard to create a new instance of some object type: Java class, project etc. The second one is a wizard to open one of Eclipse's perspectives: Java, server, debug, etc.

Note on Eclipse configuration
We have not configured WDSC to use anything other than default behaviors. After this simple exercise, you might want to browse the workbench configuration options under Windows | Preferences to see what customizations you can make.

Create a new Java project

  • If you haven't, start WDSC from the Windows desktop
    << The Development Studio Client workbench opens.
  • Open the Java perspective
    Click perspective icon and select Java perspective to open
    << The Java perspective opens with a package view on the left.
  • Create a new Java project named: cte_test1
    Click the new icon, select Java project as the type to create and click Next
    << The Project page opens.
    Enter the project name: cte_test1 and click Next
    << The Project configuration workbook opens showing source, projects, libraries.
    Browse the information on each page and click Finished
    << The Java project is created and displayed in the packages view.

Create a new Java class

Create a new Java class named: ShowEnvironment
Click the new icon, select Java class as the type and click Next
<< The class definition page displays.
Set the package name = cte1
Set the class name = ShowEnvironment
Under which stub methods to create, select public static void main and constructors from superclass
click Finish
<< The class is created and automatically opened in the Java editor for you.
To the right an outline view shows the elements contained in the class: fields, methods etc. You can navigate by selecting elements in the outline view.

Every time you click File | Save or press Ctl-S, the Java source code is saved and compiled. IF the compile fails, error messages are automatically displayed in the Tasks view below the editor. You can click an error and the editor will be positioned automatically to that line in the source code.

The class source code created is below:

package cte1;
public class ShowEnvironment {

 /**
  * Constructor for ShowEnvironment
  */
 public ShowEnvironment() {
  super();
 }

 public static void main(String[ ] args) {
 }
}

  • Add a new method to this class named: show
    Below the main method, add a new method by typing the code. Press Ctl-S to save the source. Check the source and the tasks view for error messages. The updated source code below the main method will look like this:

public static void main(String[ ] args) {
 }

 public void show() {
  System.out.println("n ShowEnvironment ran");
 }
}

  • Modify the main method to create an instance and call the show method
    Modify the main method by typing the code below and press Ctl-S.
    The updated source code for the main method will look like this:

public static void main(String[ ] args) {
  ShowEnvironment se = new ShowEnvironment();
  se.show();
 }
Run the Java application class

  • Ensure that ShowEnvironment.java is selected in the Packages view.
  • On the top icon bar, select the running man icon then Run | Java application.
    << Eclipse runs the Java application, automatically opens the Debug perspective.
    The Debug perspective shows a Navigator view with application class as terminated and a console window with the message "ShowEnvironment ran".
  • You can optionally press the right mouse button over the Debug Navigator window and select the option to remove all terminated processes.
  • On the Eclipse short-cut bar on the left, select the "J" icon to return to the open Java perspective.

Debug the Java class

  • In the Java editor for ShowEnvironment, there is vertical blue bar to the left on the editor highlighting the class source.
    Position the cursor over the dark blue bar to the left of the line that reads:
    "se.show();" and double click the mouse.
    << Around blue dot is added to the line as a debug breakpoint.
  • Ensure that ShowEnvironment.Java is selected in the Packages view.
  • On the top icon bar, select the DEBUG icon then Run | Java application
    << Eclipse runs the Java application, automatically opens the Debug perspective and halts at the line with the debug breakpoint.
    The Debug perspective shows a Navigator view with application class and a middle pane with the source code highlighted on the "se.show();" line.
  • On the Debug navigator pane at the top, you can optionally control how the application runs by pressing the buttons for: resume, go-into, go-over, go-to-end etc.
    Press the resume button ( the faded green right arrow button > ).
    << The Debug perspective shows the Navigator view with application class as terminated and a console window with the message "ShowEnvironment ran".
  • You can optionally press the right mouse button over the Debug Navigator window and select the option to remove all terminated processes.
  • On the Eclipse short-cut bar on the left, select the "J" icon to return to the open Java perspective.

  • Remove the debug breakpoint in the Java editor.
    In the Java editor for ShowEnvironment, there is vertical blue bar to the left on the editor highlighting the class source.
    Position the cursor over the dark blue bar to the left of the line that reads:
    "se.show();" and double click the mouse on the round blue dot.
    << The round blue dot is removed from the source line.

Modify a method in the Java class
Modify the show method to create display Java environment info by typing the code below and press Ctl-S. The updated source code for the show method will look like this:

 public void show() {
  System.out.println("n ShowEnvironment ran");
  StringBuffer sb = new StringBuffer();
  try {
   java.util.Properties _p = System.getProperties();
   java.util.Enumeration _e = _p.keys();
   sb.append("ShowEnvironment - lists java runtime properties from System objectn");
   while (_e.hasMoreElements()) {
    String _key = (String) _e.nextElement();
    sb.append("nt" + _key + "ttt" + _p.getProperty(_key));
   };
   System.out.println(sb.toString());
  } catch (Exception ex) {
   System.out.println("ERROR " + getClass().getName() + ".showProperties() = " + ex);
   ex.printStackTrace();
  };  
 }
 

Note, some of the lines above may be "wrapped" by the word processor you are using to read this example.

Run the Java application class again
See the instructions above for Run the Java application class. When the Debug perspective opens, check the console view on the bottom for the added runtime Java information you printed out.

Export the Java class to the file system

  • Ensure that ShowEnvironment.java is selected in the Packages view.
  • Export the application using the export wizard.
    Select menu File | export.
    << The export wizard opens.
    Select File System as the export destination and click Next.
    << The export page opens.
    Select the cte_test1 project.
    Enter the directory c:temp and click Finish.
    << If the directory doesn't exist, you will be prompted to create it.
    << The application will be exported to the c:temp directory.
  • Open a DOS command window to the application directory.
    From Windows, open the DOS command window.
    << DOS window opens.
    Enter 'cd c:tempcte_test1' to change to the project directory.
  • Run the Java application and check results in the DOS window.
    java cte1.ShowEnvironment
    << The ShowEnvironment class is run and the output is displayed.

Summary

You're on your way to becoming a Java developer. You created a project and a Java application. Coded it. Debugged it. Then deployed it and tested it again. Excellent!

Clearly, new WebSphere Studio toolset is a big improvement in productivity, types of e-business applications supported with shorter learning curves overall for developers than the existing bag of tools. It supports development of e-business and server applications for any server or Web application server, not just WebSphere. It is the best tool I've seen to date for building complex, enterprise applications.

Future articles will demonstrate development of different application types and provide more tips for using the new WebSphere Studio IDE. As mentioned earlier, look for IBM Toronto to deliver the iSeries enhanced version of WebSphere Studio Site Developer for iSeries with the additional iSeries Java development tools included.

The Web sites below can provide more information:

Eclipse open-source organization
IBM WebSphere Developer Domain
Worldwide Web Consortium
Sun Microsystems J2EE site
IBM WebSphere
WebSphere Development Tools for iSeries
Apache organization
ebt-now -- automated Web development
QuickWebSupport

--------------------------
About the authors: Jim Mason is president of ebt-now.com, and he writes, consults, teaches, designs and develops iSeries Web applications using Java, WebSphere, DB2, Lotus Domino and the WebSphere Development Tools for iSeries. David Slater is World Wide Market Manager ofiSeries Application Development at IBM Canada.


This was first published in June 2002

Dig deeper on Web Tools

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchEnterpriseLinux

SearchDataCenter

Close