Developer > WebSphere


Wizards That Work

A quick start in EGL for System i developers

Illustration by Jon Flaming

WebSphere - A quick start in EGL for System i developers

Print Email

IBM announced IBM* Rational* Business Developer Extension (RBDe) in April, and it's packed full of wizards that make building Web applications quick and easy. RBDe includes the Enterprise Generation Language (EGL) and many tools for EGL application developers. EGL lets you easily create multi-platform business applications.

EGL plugs into WebSphere* Development Studio Client (WDSC) V7 or Rational Application Developer (RAD) V7. If you still have an older version of WDSC or RAD installed, you need to upgrade to WDSC V7 or RAD V7 before you can take advantage of the advanced capabilities. To install RBDe, download it from the IBM developerWorks* Web site (ibm.com/developerworks/downloads) and use the IBM Installation Manager to add to your existing WDSC or RAD product. The download is a limited-time version valid for 60 days; eventually you'll need to buy a license key to get a permanent license.

In this article, we'll show you how to create a simple EGL Web application with two pages. The application provides access to an IBM i5/OS* DB2* Universal Database* (UDB) table and displays data from this table on the Web pages. The application lets users change existing data, delete rows from or add them to the table. Figures 1 and 2 show the completed application.

The Web page in Figure 1 lets us select specific data from a database table and then shows the data in a subfile-like list according to the filter criteria set in the search field. In this specific application, we chose to filter by employee last name. The employee number column contains a link that requests detail data for each employee. Figure 2 shows the detail data. The data is displayed in input fields you can change directly on this Web page. Apply changes to database-table fields with the Update button.

These two Web pages, as well as the SQL data-access code, were generated by pointing the EGL Data Access Application wizard to the i5/OS DB2 UDB database table. No coding is necessary to create this simple create/read/update/delete (CRUD) application. Using the EGL Data Access Application wizard is an easy way to get started with EGL development and create Web applications that access existing i5/OS DB2 databases. The wizard lets RPG or COBOL programmers jump-start their Web-application development.

Walking Through the Wizards

Let's examine the steps involved to create this EGL Web application. If you're familiar with the WDSC workbench and Remote System Explorer, you'll have an advantage because you already understand how to navigate. If you're just starting now with WDSC or RAD, you might want to take one of the tutorials included in the product for tips on navigating in the workbench.

In the workbench, start in the Web perspective since the application you want to build is an EGL Web application. Use the New>Dynamic Web Project wizard to create the new project. On the first page of the wizard, specify the following:

  • Project name of your choice
  • Configuration: Faces project - since the generated Web pages use JavaServer* Faces (JSF)
  • A new enterprise archive (EAR) file to create a separate runtime file for this application

On the second wizard page, which lets you select specific project facets, specify:

  • Default style sheet (channel subsystem file)
  • EGL support with JSF
  • EGL support with JSF component interfaces

The third wizard page deals with Web modules, and you can accept the default values.

The fourth wizard page asks for input for EGL-specific project settings so the wizard can generate the correct EGL build descriptor and Web XML file. Specify a Java Naming and Directory Interface* (JNDI) name to be used to access the i5/OS DB2 data at runtime. You'll need to set up the local IBM WebSphere Application Server (WAS) environment with the information for how to access the employee-data table on your System i platform using this JNDI name. When you set up the WAS environment, specify:

  • The JDBC* provider to use (DB2 UDB for iSeries* toolbox)
  • The data source to be used, which contains the JNDI name and the System i server name
  • The authentication information to be used when accessing the data

Next page: >>

Page 1 2 3

Claus Weiss is an advisory software consultant with the Rational Software System i - Ecosystem team at the IBM Toronto laboratory. He has degrees in industrial engineering and computer science from the University of Hamburg in Germany. He worked as a systems engineer with IBM Germany and joined the IBM Toronto lab in 1984.

Inge Weiss is a software engineer at the IBM Toronto laboratory. She worked as a systems engineer for mid-range systems at IBM Germany and joined the IBM Toronto lab in 1985, working mostly on System i tools.

Buyers Guide

Browse products and services for Developer.



Advertisement