Guided Exercise 1.1: Setting up the sample OpenEdge Data Object Services Overview Before you can develop a web app, you must set up the back-end services for the data providers that the web app will use. In this Guided Exercise you will extract the database files for the sample application and start the Database Server for the Sports3000 database. Then you will import the ABL Web App project that contains pre-written OpenEdge Data Object Service code into Progress Developer Studio for OpenEdge and modify some workspace configuration settings. Finally, you will deploy the OpenEdge Data Object Services to an instance of PAS for OpenEdge, which is the application server that hosts the sample application. These deployed OpenEdge Data Object Services will be the source of the data for the web app that you create in this course. This exercise has 3 parts. The exercise steps take approximately 30 minutes to complete. You perform this exercise in your live version of Progress OpenEdge and Kendo UI Builder by Progress. Important: If you already have a Developer Studio workspace where you have deployed the OpenEdge Data Object Services for SportsInc from the course Creating Progress OpenEdge Data Object Services for Kendo UI Builder, you can continue using that workspace (\progress_education\openedge\pdo-kuib\workspace) for this course. Before you begin Before you begin, you must: Step Description 1. Complete the course setup instructions to extract the course files to the \progress_education\openedge\kuib directory. 2. Ensure that Progress Developer Studio for OpenEdge (V 11.6.3) is installed. 3. Ensure that Kendo UI Builder by Progress: OpenEdge Edition (V 1.0) is installed. 4. Ensure the Admin Service for Progress OpenEdge 11.6 is running. Hint: Use the Windows Service Viewer to check it and start it if necessary. Location of files: Exercise files: \progress_education\openedge\kuib\exercise\lesson01
Guided Exercise 1.1: Setting up the sample OpenEdge Data Object Services, Steps Steps, Part 1 Starting the Database Server Note: If you will be using the \progress_education\openedge\pdo- KUIB\workspace from the course, Creating Progress OpenEdge Data Object Services for Kendo UI Builder, you can skip this part of the exercise. Before you can test the web app, the database for the application (Sports3000) must be started. Follow these steps to set up and start the database that is used for the sample application for this course. Step Task 1. Extract the files in Sports3000_OE116.zip to C:\OpenEdge\WRK. The files extracted are the database files, as well as a sub-folder of database triggers. 2. Open a Proenv window by selecting Start > Progress > OpenEdge > Proenv. 3. Start the database server for the sports3000 database as follows: proserve sports3000 H localhost S 9999 Note: If port 9999 is unavailable on your system, use a different port number. 4. Close the Proenv window. Steps, Part 2 Preparing your workspace and project in Progress Developer Studio for OpenEdge Note: If you will be using the \progress_education\openedge\pdo- KUIB\workspace from the course, Creating Progress OpenEdge Data Object Services for Kendo UI Builder, you can skip this part of the exercise. The OpenEdge Data Object Services have been already written for you. In this part of the exercise, you will set up your workspace in Developer Studio, import the project that contains the OpenEdge Data Object Services, and modify some settings in your workspace.
Step Task 1. Start Developer Studio by selecting Start > Progress > OpenEdge > Developer Studio. 2. You will first see the welcome screen as shown here. Click the Workbench icon to continue to the workspace for Developer Studio. 3. If this is the first time you are using Developer Studio, the first dialog box is for you to specify where your workspace is located. a. Specify \progress_education\openedge\kuib\workspace as the workspace location. b. Click OK. c. Click the Workbench icon to start the workspace. 4. If you have previously used Developer Studio for OpenEdge, you must switch to a new workspace. a. Select File > Switch Workspace > Other. b. Specify \progress_education\openedge\kuib\workspace as the workspace location.
c. Click OK. Developer Studio will restart. d. Click the Workbench icon to start the workspace. 5. Next, you must ensure that Developer Studio has a valid connection to the Admin Server and that when you start the PAS for OpenEdge instance from Developer Studio, it will use the launch configuration you set up. a. Select Window > Preferences. b. In the Preferences window, navigate to Progress OpenEdge > Server. c. Ensure that in the Run/Debug area, Update properties from server before starting/launching is not selected. d. Navigate to Progress OpenEdge > Server > OpenEdge Explorer Connections. e. In the OpenEdge Explorer Connections window, select Explorer 1. f. Click Edit. g. Click Test Connection. h. If the connection does not succeed, you must enter a valid password for the admin user. The default password for first-time use is admin, but when you access the Admin Server for the first time, you are asked to change the password. You should enter the latest password configured for the admin user. i. Click Test Connection to confirm that you can successfully log in to the Admin Server. j. Click Create Servers & Finish. k. Click OK. l. If you do not see a Servers tab in the lower area of your Developer Studio workspace, ensure that this view is visible by selecting Window > Show View > Servers. Hint: If Servers is not visible, it will be under Other
m. The Servers tab should appear as follows: 6. Next, you will import the project that contains the back-end service code. a. Select File > Import. b. Select General > Existing Projects into Workspace. c. Click Next. d. Select Archive File. e. Browse to and select Exercise\Lesson01\SportsInc.zip. f. Click Finish. The newly imported project should appear as follows:
7. Next, you will define a database connection in Developer Studio and ensure that the SportsInc project has a connection to the Sports3000 database. a. Right-click the SportsInc project and then select Properties. b. Navigate to Progress OpenEdge > Database Connections. c. Click the Configure database connections link. d. Click New to open the Add Connection Profile wizard e. Enter the connection name, Sports3000DB. f. Click the Browse button and then navigate to and select c:\openedge\wrk\sports3000.db. g. Specify the host name as localhost. h. Specify 9999 as the port number. Note: If port 9999 is unavailable on your system, use a different port number. It must be the same port number that you specified when you started the Database Server. i. Click the Test Connection button. j. The AVM runs the code to test the connection. After the test completes successfully, click OK. If the connection did not succeed, you will need to investigate why the connection failed. Is the Database Server for the database running? k. Click Next. The Define a SQL connection window opens. l. Click Next. The Add SQL Connection Profile window opens. Here, retain the values that have been automatically set for you. Note: The Database name specified must be in lower case. If the name has upper-case letters in it, you must modify them to be lower case. m. Click the Test Connection button. Then click OK when the connection succeeds. n. Click Next. The Define Database Server Configuration window opens. Notice that the Auto-start database server is selected. Leave that box selected. Developer Studio will automatically start the Database Server for you. Do not select Auto-shutdown database server. o. Click Finish. p. After the configuration is completed, the connection string is shown as: -db C:\OpenEdge\WRK\sports3000.db -H localhost -S 9999 q. Click OK. You are taken back to the Database Connections. r. Select the connection profile you just configured.
s. Click OK to complete the configuration. 8. Next you will configure the PAS for OpenEdge Instance, oepas1 so that it starts with a database connection and uses the SportsInc/AppServer folder in its PROPATH. a. In the Servers tab at the bottom of your workspace, double-click oepas1. b. The configuration properties for this application server opens. c. In the General Information area, click the Open launch configuration link. d. Click the Databases tab. e. Select the Sports3000DB database connection.
f. Click the PROPATH tab. g. Click Add Workspace Directory. h. Select the SportsInc/AppServer folder. i. Click OK. j. Click OK. k. Close the oepas1 configuration properties window. Steps, Part 3 Deploying the OpenEdge Data Object Services and testing them Note: If you will be using the \progress_education\openedge\pdo- KUIB\workspace from the course, Creating Progress OpenEdge Data Object Services for Kendo UI Builder, you can skip Step 1, but you should test that you can access the OpenEdge Data Object Services from your browser.
Now that you have configured your workspace to use a database connection to the Database Server for the Sports3000 database and have imported the OpenEdge Data Object Services project, you are ready to deploy the OpenEdge Data Object Services to the PAS for OpenEdge instance, oepas1, and test them. Step Task 1. Next, you will deploy the SportsInc services to the PAS for OpenEdge instance, oepas1. a. In the Servers tab, right-click oepas1. b. Select Add and Remove. c. Select the CustomerService and SportsIncService services. d. Click Add. e. Click Finish. 2. Next, you will start oepas1. a. In the Servers tab, select oepas1. b. Click the Start icon. It will take a few minutes for the server to start. Everything is started when you see the following:
3. Finally, you will test that you can access the OpenEdge Data Object Services and their corresponding catalogs in oepas1. The catalog for a Data Object Service contains details about the resources you can access for a data service in a web app. a. In a browser (preferably Google Chrome), type the following URL to access the Catalog for CustomerService: http://localhost:8810/sportsinc/static/customerservice.json b. You should see the following: c. In the browser, type the following URL to access the data for CustomerService: http://localhost:8810/sportsinc/rest/customerservice/customer d. You should see the following:
e. In the browser, type the following URL to access the Catalog for the SportsIncService: http://localhost:8810/sportsinc/static/sportsincservice.json f. You should see the following: g. In the browser, type the following URL to access the data for SportsIncService: http://localhost:8810/sportsinc/web/pdo/sportsincservice/employee h. You should see the following:
Guided Exercise 1.1: Setting up the sample OpenEdge Data Object Services, Wrap-up Exercise summary In this Guided Exercise you extracted the database files for the sample application and started the Database Server for the Sports3000 database. Then you imported the ABL Web App project that contains the pre-written OpenEdge Data Object Service code into Progress Developer Studio for OpenEdge and modified some workspace configuration settings. Finally, you deployed the OpenEdge Data Object Services to an instance of PAS for OpenEdge, which is the application server that hosts the sample application. These deployed OpenEdge Data Object Services will be the source of the data for the web app you create in this course.