Illustration by Jon Flaming
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.
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:
On the second wizard page, which lets you select specific project facets, specify:
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:
Browse products and services for Developer.