® IBM Software Group © 2006 IBM Corporation Rational Business Developer – Version 7.1 Foundation Training and Class Setup Instructions
2 Last update: 12/04/2007 IBM Trademarks and Copyrights © Copyright IBM Corporation 2007,2008. All rights reserved. The information contained in these materials is provided for informational purposes only, and is provided AS IS without warranty of any kind, express or implied. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, these materials. Nothing contained in these materials is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software. References in these materials to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. This information is based on current IBM product plans and strategy, which are subject to change by IBM without notice. Product release dates and/or capabilities referenced in these materials may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. IBM, the IBM logo, the on-demand business logo, Rational, the Rational logo, and other IBM Rational products and services are trademarks or registered trademarks of the International Business Machines Corporation, in the United States, other countries or both. Other company, product, or service names may be trademarks or service marks of others.
3 Last update: 12/04/2007 Course Details Audience This course is designed for application developers who have programmed in a 3 rd or 4 th generation language – and who need to build leading-edge applications using Rational Business Developer. Prerequisites This course assumes that the student has the basic knowledge of IS technologies, data processing, software and havs programmed for at least two or more years in a language such as: COBOL, RPG, PL/1, Pascal, or some 4 th Generation Language or tool. Knowledge of SQL (Structured Query Language) for database access is assumed as well. Basic PC and mouse-driven development skills is also assumed. Finally, it is assumed that you know a little bit about IBM’s Rational Business Developer and EGL (Enterprise Generation Language) – at least from a high- level “what is” perspective.
4 Last update: 12/04/2007 At the end of this course, you will be able to: Create EGL Programs, Libraries, Services and JSFHandlers that operate in a leading-edge application like a web app to deliver business functionality. Code statements to define and declare EGL primitive data, DataItems, Records and EGL properties Code structured looping, conditional and assignment statements. Code EGL SQL and data access statements to read and write from programs to external databases and files Analyze whether an SQL statement is efficient and code it differently if it is not. Create EGL business logic at or near the production requirements specification level in terms of: Complexity Breadth and Scope Course Objectives
5 Last update: 12/04/2007 Course Introduction – Unit Descriptions The first unit, RBD Workbench, introduces the Eclipse IDE (Integrated Development Environment) and discusses EGL terms and concepts from a high-level perspective. The EGL QuickStart unit takes you through the process of building a small web application using EGL and JSF from scratch throughout the entire development lifecycle. In the third unit, Programming In EGL, you learn how to translate what you know in System z and System i programming language parlance to EGL, and to write production-quality business applications using EGL statements. In the fifth unit, Database and File Access Using EGL, you learn how to leverage the EGL language abstractions to simplify and expedite developing complex and efficient database access. You will also learn how to access external files from EGL programs. In the sixth unit, EGL and Services you learn how to create, consume, deploy, test and use externally created Web Services, and you also learn about how EGL can be used in a Service Oriented Architecture. The final unit, Calling External Programs in Other Languages, discusses how to call Java, COBOL, RPG and C++ programs from EGL.
6 Last update: 12/04/2007 Course RBD and Course Setup RBD and Course Setup RBD Workbench EGL/Web QuickStart Programming in EGL Database and File Access EGL and Services (SOA) Calling External Languages From EGL EGL and Batch Applications Appendices Units: RBD/EGL Development
7 Last update: 12/04/2007 UNIT How to take this course How to take this course Downloading RBD software (trial edition) Installing and configuring Tomcat (application server) Installing and configuring the course project and database Topics: RBD Product and Course Setup
8 Last update: 12/04/2007 How to use this book This course has two different modes of educational delivery – each based on both content matter, and on effective knowledge transfer: Read and Learn: Do and Acquire:
9 Last update: 12/04/2007 Read and Learn Read and learn Read and learn is the most prevalent form of education presented in this course. From the slides you are viewing, you can read and understand concepts about RBD and EGL. This is static information presented as traditional text and graphics. do Occasionally a slide will have a double-right-pointed triangle in the header: This means you should do or try something on your computer. The Notes (at the bottom of most slides) present additional information on each concept. The Notes also present (wherever relevant) System z and System i programmer analogies There are numerous slides that allow you to test your knowledge and learning. These slides contain paper/pencil questions. The answers to most of these questions are at the end of the PowerPoint slides.
10 Last update: 12/04/2007 How to use this book Do and Acquire Do and Acquire To make all of the pieces of information covered in this course yours – and to convince you that you’ve got the skills to match the knowledge you accumulate, you will need to use RBD and EGL to create software functionality. There are lots of workshops and labs throughout this course, that will allow you to discover, practice and master the RBD functionality and development techniques used to create no-compromise, production-worthy applications. All of the “do this” steps have a consistent icon to the left of them, the: When you see this symbol either at the top of a page, or at the beginning of a step, it signifies that you are to “do” something with the product or language.
11 Last update: 12/04/2007 View the Slide Notes Using your mouse expand the Notes at the bottom of this slide and read them. Adjust the size of the slides or notes to suit your viewing Figure 1 – PowerPoint Notes View
12 Last update: 12/04/2007 Learn More! There are a large number of excellent sources for background information freely available online. Here are a few we use a lot: Product Help Help Contents Search Tutorials and examples – from the Sample Gallery Programmer’s Guide EGL Language Reference Cheat Sheets IBM Systems Information Center From the home page, click: GOOGLE Search on any topic Wikipedia Search for virtually any topic
13 Last update: 12/04/2007 Product Help – Help Contents and EGL
14 Last update: 12/04/2007 UNIT How to take this course. Downloading RBD software (trial edition) Installing and configuring Tomcat (application server) Installing and configuring the course project and database Topics: RBD Product and Course Setup
15 Last update: 12/04/2007 RBD v7.1 can be installed standalone, or can be installed into (on top of): RDz RDi/SOA The RBD v7.1 installation process is as follows: 1.Download and install Installation Manager – a separate piece of IBM software that will guide you through the rest of the installation process 2.Download and install RBD v7.1 …The link to get the trial software for RBD v7.1 is here: In addition to the RBD v7.1 software, you will also need to download to your workstation: EGLDerbyR7.zip – the course database And either v71Project_Tomcat.zip – for doing this course using Tomcat …or… v71Project_WAS.zip – for doing this course using WAS Your course setup will direct you as to where to get these resources RBD v7.1 Installation Process
16 Last update: 12/04/2007 Installation Snapshots – 1 of 9 The following slides show the installation snapshots for RBD v7.1 and WebSphere Application Server (v6.1). Follow these steps carefully. Click Install Packages
17 Last update: 12/04/2007 Install Rational Business Developer (Trial Edition) – 2 of 9 Check: Show all versions. And select Rational Business Developer, Version 7.1
18 Last update: 12/04/2007 Install Rational Business Developer (Trial Edition) – 3 of 9 Accept the terms and conditions (in order to continue) and click: Next
19 Last update: 12/04/2007 Install Rational Business Developer (Trial Edition) – 4 of 9 Create a new package group, and browse to where you want the product installed. Click Next
20 Last update: 12/04/2007 Install Rational Business Developer (Trial Edition) – 5 of 9 Install (do not extend) Eclipse. And Click Next
21 Last update: 12/04/2007 Install Rational Business Developer (Trial Edition) – 6 of 9 Choose your installation language (the default is English). Click Next
22 Last update: 12/04/2007 Install Rational Business Developer (Trial Edition) – 7 of 9 (Recommendation – even if you’re going to use Tomcat during class) – Be sure to install WebSphere Application Server development Click Next
23 Last update: 12/04/2007 Install Rational Business Developer (Trial Edition) – 8 of 9 Specify personal info Click Next
24 Last update: 12/04/2007 Install Rational Business Developer (Trial Edition) – 9 of 9 Review your installation specifications/settings Click Install
25 Last update: 12/04/2007 UNIT How to take this course. Downloading RBD software (trial edition) Installing and configuring Tomcat (application server) Installing and configuring Tomcat (application server) Installing and configuring the course project and database Topics: RBD Product and Course Setup
26 Last update: 12/04/2007 IMPORTANT NOTES IMPORTANT NOTES WebSphere Application Server Tomcat With RBD and EGL you have a choice of a number of application servers to run web applications with, including: WebSphere Application Server and Tomcat In order to accommodate customers with limited access to application servers, we will use Tomcat in our examples. (go to slide 39) Someone may have already installed and configured the Tomcat application server for you. If this is the case, or if you’re going to use WebSphere Application Server skip ahead to the next step in this process – (go to slide 39) If you wish to use Tomcat, you might first read about the software from this link: To install and configure Tomcat on your PC follow the steps listed in the upcoming slides *** See Slide Notes Course Application Server Considerations
27 Last update: 12/04/2007 Installing and configuring the course database – Tomcat Server Users This course uses a pre-configured Project and an open-source (Derby) database, which you will need to install and configure. Before installing Tomcat, you should unzip the class database on your machine. Someone may already have installed and configured the database for you. If so, skip ahead to the next section. If not, please follow the steps below to unzip the Derby database. EGLDerbyR7.zip Unzip the EGLDerbyR7.zip file into:C:\databases\ The files in the folder should look like this after you have unzipped them *** See Slide Notes
28 Last update: 12/04/2007 In a Web browser, go to the Apache Tomcat Web page: Click the Download link for Tomcat 5.x. On the download page, find the most recent version of Tomcat with a version number like 5.5.x, such as Several downloads are available for each version. Do not use versions marked as ″alpha″ or ″beta″. Under the 5.5.x version of Tomcat, look under Binary Distributions and then under Core. Download the Core version of Tomcat 5.5.x for your operating system. For Windows, select the ZIP file For Linux, select the TAR.GZ file. Installing Tomcat
29 Last update: 12/04/2007 Installing and configuring Tomcat Unzip the file you downloaded and place the server files in an appropriate location on your computer. It isn’t important where you put the server files as long as you can find them again later. You must now give Tomcat the proper driver file for the database. Find a file named derby.jar located at: \SDP70\runtimes\base_v61\derby\lib\ Copy/paste this derby.jar file to \common\lib
30 Last update: 12/04/2007 Configuring Tomcat For Use With RBD From Windows, launch RBD. Window → Preferences In the workbench, click Window → Preferences. The Preferences window opens. Server At the left side of the Preferences window, expand Server. Installed Runtimes. Under Server, select Installed Runtimes. The right side of the Preferences window now shows a list of all of the server runtimes installed in the workbench. Add Click Add. The New Server Runtime window opens. Apache In the New Server Runtime window, expand Apache. Tomcat v Under Apache, click Tomcat v Click Next. Browse Under Tomcat installation directory, click Browse. Locate the folder that contains the Tomcat installation files and then click OK. Finish Preferences Click Finish. Tomcat is added to the list of installed runtimes. The Preferences window looks like this Click OK
31 Last update: 12/04/2007 Import the Tutorial Project From the RBD Workbench Open the File menu, and select Import… Expand the Other folder (at the bottom of the list) and select: Project Interchange Click Next – this opens the Import Project window From Import Project v71Project_Tomcat.zip Click the top Browse… button, next to From zip file, and browse to, and select v71Project_Tomcat.zip The file you down-loaded in a previous step Selecting the zip file will open its contents in the window, and two resource folders will appear Click Select All Click Finish This will import the Project into your Workspace Next, we’ll configure your Workspace preferences, to simplify your new life as an Eclipse developer
32 Last update: 12/04/2007 Configure Preferences – 1 of 2 You need to configure a few preferences, in order to complete the labs in this course. From the RBD Workbench menu Window Preferences… Pull down the Window menu, and select Preferences… EGL Expand the EGL folder and from within the EGL folder… Click Page Designer Check all three options as shown in the screen capture Click APPLY Server Expand the Server Preferences Launching From Launching – check: Automatically restart servers when necessary Click Apply not Do not leave Preferences yet
33 Last update: 12/04/2007 Configure Preferences – 2 of 2 Still from within the Preferences Window Validation Click Validation Disable All Click Disable All OK Click OK
34 Last update: 12/04/2007 Clean the Tutorial Project From the RBD Workbench Open the Project menu, select Clean… At the Clean window, press OK
35 Last update: 12/04/2007 Run an Installation Verification Page To run the installation verification page (from the Workbench/Project Explorer): Expand the EGLWeb folder Expand the WebContent folder allcustomers.jsp Right-click over allcustomers.jsp Select Run As –Run on Server… You will be prompted to Select Tasks –Check Update context root for Web module EGLWeb –Click Finish You will also be prompted to choose a Server –(see the next slide)
36 Last update: 12/04/2007 Installing and configuring Tomcat When prompted to Define a New Server Manually define a new server Expand the Apache folder Select “Tomcat v5.5 Server with EGL debugging support Set server as project default (do not ask again) Click Finish!
37 Last update: 12/04/2007 Your First Page You should see something that looks like this!
38 Last update: 12/04/2007 UNIT Topics: How to take this course. Downloading RBD software (trial edition) Installing and configuring RBD Installing and configuring Tomcat (application server) Installing and configuring the course project and database (WebSphere Application Server Users) RBD Product and Course Setup
39 Last update: 12/04/2007 Installing and configuring the course database This course uses a pre-configured Project and an open-source (Derby) database, which you will need to install and configure. Someone may already have installed and configured these artifacts. If so, you may skip ahead to the next section. If not, please follow the steps below to install and configure the Derby database. EGLDerbyR7.zip Unzip the EGLDerbyR7.zip file into: C:\databases\ Your files should look like this after you have unzipped them Note that the folder will appear after after you begin using the database during the labs in this course.
40 Last update: 12/04/2007 Installing and configuring the course project This course uses a pre-configured Project, which you will need to install and configure. Someone may already have installed and configured the project for you. If so, you may skip ahead to the next section. If not, please follow the steps below to install and configure the course project: From the Windows start menu, launch RBD …or…RAD with RBD (depending on what product you have installed on your PC) At the Workspace Launcher window, specify the directory into which you want to organize all of your RBD Education resources. Usually something like: c:\RBDv7\ …or… d:\RBDv7\ Close the Welcome window This opens to the RBD Workbench (next slide)
41 Last update: 12/04/2007 Import the Tutorial Project From the RBD Workbench Import… Open the File menu, and select Import… Project Interchange Expand the Other folder (at the bottom of the list) and select: Project Interchange Next Click Next – this opens: Import Project Interchange Contents Import Project Interchange Contents: From Import Project Interchange Contents: Browse Click the top Browse… button, next to From zip file, and browse to, and select: v71project_WAS.zip **** WebSphere Application Server 6.1 (If you are using WebSphere Application Server 6.1) Note that if you plan on using Apache/Tomcat, you will have completed this step in the previous section of the course Selecting the zip file will open its contents in the window, and two resource folders will appear Select All Click Select All Finish Click Finish Yes If a popup window emerges during the import that asks if you want to “Update resources?” answer: Yes This will import the Tutorial Project into your Workspace **** These are files you down-loaded in a previous step
42 Last update: 12/04/2007 Configure Preferences – 1 of 2 You need to configure your preferences, in order to complete the labs in this course. From the RBD Workbench menu Pull down the Window menu, and select Preferences… Expand the EGL folder and from within the EGL folder… Click Page Designer Check all three options as shown in the screen capture on the right Click APPLY not Do not leave Preferences yet
43 Last update: 12/04/2007 Configure Preferences – 2 of 2 Still from within the Preferences Window Validation Click Validation Disable All Click Disable All OK Click OK
44 Last update: 12/04/2007 Clean the Tutorial Project From the RBD Workbench Open the Project menu, select Clean… At the Clean window, press OK
45 Last update: 12/04/2007 You should see results similar to this If this web page does not come up in the browser and/or if you have errors: Starting the server …or… Publishing your project …please check out the next slides, which might help! Run an Installation Verification Page To run the installation verification page (from the Workbench/Project Explorer): Expand the EGLWeb folder Expand the WebContent folder allcustomers.jsp Right-click over allcustomers.jsp Select: Run As Run on Server… You will be prompted to choose a Server –Check: Set server as project default Click Finish
46 Last update: 12/04/2007 What if My Server Doesn’t Start? Try this solution: Servers From the Servers view Right-click over the server entry Open Select: Open SOAP Select SOAP Instead of RMI for the connection type It seems to help if there are conflicts with firewalls, etc. Right-Click Server entry
47 Last update: 12/04/2007 What if I Can’t Publish My Project? From Project Explorer, right-click over EGLWeb and: Select Properties Select Targeted Runtimes If WebSphere is un-checked, Check (the checkbox next to it) Click Apply, then OK If WebSphere was already checked and you’re having this problem: 1.Uncheck 2.Apply 3.Check (again) 4.Apply (again) 5.Click OK
48 Last update: 12/04/2007 Now that you have completed this topic, you should be able to: Launch RBD – and select a workspace View the Education Project in eclipse Connect to the Derby database and view data rendered in a simple EGL/JSF web page Note this verifies that all of the software components necessary for this course are: –Installed –Configured –Operational Unit Summary