® IBM Software Group © 2006 IBM Corporation EGL/Web Project QuickStart – 1 of 4 – Creating the Data Access Layer These slides walk you through the process.

Slides:



Advertisements
Similar presentations
Stored procedures and views You can see definitions for stored procedures and views in the demo databases but you can’t change them. For views, expand.
Advertisements

Microsoft Office 2007 Access Chapter 3 Maintaining a Database.
UIC Data Conversion and Submission via CDX Node Client UIC Database V2 6/16/
Microsoft Office 2010 Access Chapter 1 Creating and Using a Database.
® IBM Software Group © 2006 IBM Corporation Additional AJAX Examples and Workshops This learning module provides additional AJAX use cases and examples.
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Access Project 1 Creating and Using a Database.
Figure 1. Hit analysis in 2002 of database-driven web applications Hits by Category in 2002 N = 73,873 Results Reporting 27% GME 26% Research 20% Bed Availability.
® IBM Software Group © 2006 IBM Corporation EGL / SOA – Creating and Consuming EGL Web Services This Learning Module shows how to utilize the RBD tooling.
® IBM Software Group © 2006 IBM Corporation The Eclipse Data Perspective and Database Explorer This section describes how to use the Eclipse Data Perspective,
® IBM Software Group © 2006 IBM Corporation EGL SQL Introduction This Learning Module shows how to understand and use the EGL language abstractions to.
® IBM Software Group © 2006 IBM Corporation EGL/Web Project QuickStart – 3 of 4 – Creating the U.I. Layer These slides walk you through the process of.
Working with SharePoint Document Libraries. What are document libraries? Document libraries are collections of files that you can share with team members.
® IBM Software Group © 2006 IBM Corporation How to read/write XML using EGL This Learning Module shows how to utilize an EGL Library to read/write an XML.
® IBM Software Group © 2006 IBM Corporation JSF Tab Controls This Learning Module shows how to develop server-side EGL applications with dynamic content.
Ch 8-3 Working with domains and Active Directory.
Advanced Tables Lesson 9. Objectives Creating a Custom Table When a table template doesn’t suit your needs, you can create a custom table in Design view.
® IBM Software Group © 2006 IBM Corporation Creating JSF/EGL Template Pages This section describes how to create.JTPL (Java Template Pages) using the Page.
Microsoft Windows 2003 Server. Client/Server Environment Many client computers connect to a server.
® IBM Software Group © 2006 IBM Corporation JavaScript – and EGL and.JSP Pages This learning module describes the use of JavaScript in your EGL and.JSP.
Microsoft Office 2007 Access 2007 Chapter 9 Administering a Database System.
CSCI 6962: Server-side Design and Programming
Session 5: Working with MySQL iNET Academy Open Source Web Development.
® IBM Software Group © 2013 IBM CorporationLast Update: August 2013 Workshops RDz Workbench – Using the Data Source Explorer Workshops.
Advanced Forms Lesson 10.
® IBM Software Group © 2009 IBM Corporation Rational Publishing Engine RQM Multi Level Report Tutorial David Rennie, IBM Rational Services A/NZ
INSERT BOOK COVER 1Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Microsoft Office Access 2010 by Robert Grauer, Keith.
1 IMPORTANT NOTE  IMPORTANT NOTE not  As of this writing the default project you will download, import and use in this class is not enabled for Tomcat.
Creating a Web Site to Gather Data and Conduct Research.
® IBM Software Group © 2006 IBM Corporation Programmatically Rendering and Hiding JSF Controls This section describes how to hide and show JSF controls.
Mail merge I: Use mail merge for mass mailings Perform a complete mail merge Now you’ll walk through the process of performing a mail merge by using the.
Key Applications Module Lesson 21 — Access Essentials
Access Manual 2 By Dhawala Kovuri Elham S.Khorasani Ismail Guneydas.
® IBM Software Group Appendix C - Code Reuse - Program Templates - Code Snippets - Code Templates.
® IBM Software Group © 2006 IBM Corporation EGL/Web Project QuickStart – 2 of 4 – Creating the Business Logic Layer These slides walk you through the process.
Office 2003 Post-Advanced Concepts and Techniques M i c r o s o f t Access Project 7 Advanced Report and Form Techniques.
Course ILT Forms and queries Unit objectives Create forms by using AutoForm and the Form Wizard, and add or modify form headers and footers Open and enter.
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Access Project 1 Creating and Using a Database.
® IBM Software Group © 2006 IBM Corporation Duplicating Your Workspace You may need to copy files from one workspace to another (example – you’ve developed.
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
® IBM Software Group © 2006 IBM Corporation Using JSF Mini-Calendar Controls This section describes how to use a JSF Mini-Calendar Control with EGL It.
® IBM Software Group © 2006 IBM Corporation JSF File Upload Control This Learning Module describes the use of the JSF File Upload component – for allowing.
® IBM Software Group © 2006 IBM Corporation Web JSF Overview – RBD Tooling – for Web Development This unit introduces you to the aspects of the RBD tooling.
Chapter Fourteen Access Databases and SQL Programming with Microsoft Visual Basic th Edition.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 7 1 Microsoft Office FrontPage 2003 Tutorial 8 – Integrating a Database with a FrontPage.
Microsoft FrontPage 2003 Illustrated Complete Integrating a Database with a Web Site.
® IBM Software Group © 2006 IBM Corporation Finding Out Which Submit Button Was Clicked – and Other JSF Command Button Techniques This section describes.
® IBM Software Group © 2006 IBM Corporation JSF Panel – Section Controls This Learning Module shows how to develop server-side EGL applications with dynamic.
® IBM Software Group © 2006 IBM Corporation JSF Rich Text Area Component This Learning Module describes the use of the JSF Rich Text Area component – for.
What is MySQL? MySQL is a relational database management system (RDBMS) based on SQL (Structured Query Language). First released in January, Many.
® IBM Software Group © 2007 IBM Corporation Module 1: Getting Started with Rational Software Architect Essentials of Modeling with IBM Rational Software.
® IBM Software Group © 2009 IBM CorporationLast Update: 5/27/2009 Setup Guide for the RUI EGL Distance Learning Course RBD v7.5.1 Workstation.
Modify Tables and FieldsModify Tables and Fields Lesson 4 © 2014, John Wiley & Sons, Inc.Microsoft Official Academic Course, Microsoft Word Microsoft.
® IBM Software Group © 2006 IBM Corporation Dependent Combo-Box U.I. Development This Learning Module walks you through the options and development techniques.
® IBM Software Group © 2006 IBM Corporation Rational Business Developer – Version 7.1 Foundation Training and Class Setup Instructions.
IBM Software Group software Rational Business Developer.
Software-Projekt 2008 Seminarvortrag“Short tutorial of MySql“ Wei Chen Verena Honsel.
® IBM Software Group software © 2011 IBM Corporation Rational Business Developer v8 Services.
® IBM Software Group © 2006 IBM Corporation EGL.CSV (Excel) File Reading and Writing This section describes how to access.CSV (Excel Spreadsheet) files.
C Copyright © 2009, Oracle. All rights reserved. Using SQL Developer.
COM621: Advanced Interactive Web Development Lecture 10 PHP and MySQL.
2 Copyright © 2008, Oracle. All rights reserved. Building the Physical Layer of a Repository.
Perform a complete mail merge Lesson 14 By the end of this lesson you will be able to complete the following: Use the Mail Merge Wizard to perform a basic.
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Access Project 1 Creating and Using a Database.
® IBM Software Group © 2006 IBM Corporation Create EGL/JSF HelloWorld Pages This learning module walks you through the process of creating two simple “hello.
Creating and Using a Database
1. Press the Power button or switch to flip on the printer, if it is turn off. 2. From the Home display screen on the product control panel, click the.
Installing the HP LaserJet Pro 500 color MFP M570 printer software in Windows on a Wireless Network & Wired Network.
Exploring Microsoft® Access® 2016 Series Editor Mary Anne Poatsy
Using JDeveloper.
Presentation transcript:

® IBM Software Group © 2006 IBM Corporation EGL/Web Project QuickStart – 1 of 4 – Creating the Data Access Layer These slides walk you through the process of creating a simple C.R.U.D. (Create, Read, Update and Delete) dynamic data content web application. This Section shows you how to use the EGL Data Access Application Wizard to generate a default data access layer for your project.

2 Course  RBD and Course Setup  RBD Workbench EGL/Web QuickStart  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 Programming

3 Unit Objectives At the end of this unit, you will be able to:  Describe the general principles and generic steps in the EGL application development approach  Import database schema into EGL records, functions and DataItems  Create a small web site-map and define global templates for your pages  Create simple dynamic data-content web- pages, such as:  Read/Only list pages with scrolling, categorization and hyper-links to  Detail pages that allow database update and delete  Write functions calls to imported data access functions from JSFHandlers  Code simple EGL business logic (conditional statements)

4 Unit Objectives – Back-end Data and Process Logic  Using the automated tooling of RBD, you will generate the following database access business logic: Control Records Data Access Libraries Data Access Records EGL DataItems

5 Unit Objectives – Pages and SiteMap And you will use generated back- end data structures and functions along with other RBD tooling, to create these four dynamic content web pages:  Menu:  Customer List  Customer Update  Orders List  Order Update (optional)

6 UNIT Development Model – Terms and Concepts  Development Model – Terms and Concepts  Importing Database Schema  Creating Custom Business Logic  Creating the U.I. Model  Creating Dynamic Content Web Pages Topics: EGL/Web QuickStart

7 The EGL Project Model – 10,000 Foot View  EGL and RBD are about increasing development productivity. You gain productivity in software through raising the level of abstraction at which you work. That and – whenever possible - using tools to do things - as opposed to manually writing, testing and maintaining code.  For a simple EGL Web application you can use the following development model:  Every production project will be different. Each will offer unique challenges AND require different amounts of time spent on each of the above lifecycle phases. For a simple EGL web application let’s see how things go. 2. Custom Business Logic 1. Data Access Model 3. U.I. Model 4. Page Development

8 UNIT  Development Model – Terms and Concepts Importing Database Schema  Importing Database Schema  Creating Custom Business Logic  Creating the U.I. Model  Creating Dynamic Content Web Pages Topics: EGL/Web QuickStart

9 Data Access Wizard To simplify data access EGL provides custom record types, with “properties” that enable generation of native database and file I/O call APIs. You can write these custom records – or – allow RBD’s tooling to build or derive them from the relational tables and views you want to access.  To get you jump-started on your EGL/SQL statements, the RBD tooling creates design pattern functions, for reading and writing to your database.  You can create your own custom EGL data access records, design patterns, functions and SQL statements. But for this simple web application, let’s see how far the wizard-generated code gets us. Table schema in your Database Catalog Data Access Wizard sqlRecords Functions

10 Data Access Application Wizard – Steps for the Upcoming Workshop  These steps are what you WILL be doing, to import your database:  Stop the Application Server (for Derby and CloudScape databases)  Launch the EGL Data Access Application Wizard  Define a connection to your database  Specify any table filtering  Select the tables you want to import  Verify/Specify search keys  Specify statement qualification  Generate  View Results  Customize Results Note stop the Application Server.  Note: Because Derby is a single-threaded database, before you start the wizard you will probably need to stop the Application Server. Do this now, before continuing. While you do this, run the Viewlet on the next slide.

11 Launch the EGL Data Access Application Wizard  Launch the EGL Data Access Application Wizard Like creating all new resources, you start from Project Explorer: EGLSource  Right-click over \EGLSource\ and select: New  Other EGL  Scroll down to, and expand the EGL folder and select:  EGL Data Access Application Next >  Click Next >

12 Define a Connection to Your Database – 1 of 2  Define a Connection to Your Database – 1 of 2  The next step in the import process is to specify which project to import the EGL definitions into. In this lab, you will import them into your EGLWeb project Open the combo-box and select the Project Name: EGLWeb EGLWeb Click New… Click New…

13 Define a Connection to Your Database – 2 of 2  Define a Connection to Your Database – 2 of 2 In order to retrieve your tables’ schema, you will connect to your relational database. This will vary by which database you use. To connect to Derby: Derby Select: Derby The Database location (folder) of the Derby database – this should be: C:\databases\EGLDerbyR7 C:\databases\EGLDerbyR7 derby.jar 3** The Class location of the JDBC Driver Class derby.jar file. This file can be found under your product installation directory, as shown here. 4. Click Test Connection (for Derby, you do not need a Password) 5. Click Next > D:\<RBDInstallDir>\runtimes\base_v61\derby\lib\derby.jar **3. See Notes on the location of the RBD software. Or do a My Computer, find on: derby.jar

14 Specify Table Filtering  Specify Table Filtering  In our small test database you might be able to get away without filtering, but in your production applications you will most likely want to filter out certain tables – examples:  System tables  Other tables in a database you do not want to import at this time. Steps: Selection 1. Click:  Selection 2.EGL 2. Check:  EGL 3.Finish 3. Click: Finish

15 Select Tables for Import  Select Tables for Import ** You can select individual – or all tables shown through this connection’s filter for Import Select All 1. Click: Select All 2. Click Next > ** You may get warning boxes to login or previously created model. Click OK to both

16 Verify Table Search Keys  Verify Table Search Keys  If a selected table does not have a Primary Key specified for it in the database catalog, you will be prompted to select a key field for it. This key field is used in the EGL SQL statement generation.  It might be the case that SiteUser needs you to choose a key field.  Choose: SiteUser_ID Next >  Click: Next >

17 Qualify Table Names  Qualify Table Names  For this workshop you will qualify the table name with the table’s schema- name (the schema-name is usually the authorization-id of the table “owner” – like a DBA, for example).  Qualify table names with schema 1. Check:  Qualify table names with schema Next > 2. Click: Next >

18 Generate  Generate  Finally, a summary screen is shown, which shows your Data Access import options. You can expand and look at them, go back, or just: Finish  Click: Finish

19 What Just Happened? The Data Access Wizard created the following four sets of resources: 1.Control Records – used in the default Data Access Library SQL statements 2.Data Access Libraries – which contain EGL data access statements (basic data access design patterns), that generate to SQL statements and routines 3.Data Access Records – EGL records of type sqlRecord, which participate in the Java and SQL generation, allowing you to code at a high-level of abstraction DataDefinitions.egl 4.EGL DataItems – in DataDefinitions.egl. This file contains default type definitions for each column in each imported table.  See notes for more on DataItems Control Records Data Access Libraries Data Access Records EGL DataItems

20  View Results – See What Was Produced by the Wizard  Expand the four new folders under EGLSource named: eglderbyr7.  Open a few of the files produced by the wizard in the Content Area (Double-click: CustomerLib.egl, Customer.egl, DataDefinitions.egl, etc.) and view the code that was generated.  Since we will be covering EGL in an upcoming unit of this course it is not expected that you understand all – of what was produced from Data Access import.  However the default data access code is:  A nice starting point for doing and learning about database programming in EGL  Nice to have been generated (as opposed to hand-coding yourself)  Let’s do a few specific things to some of these files (steps begin on the next slide)… Control Records Data Access Libraries Data Access Records EGL DataItems

21  Customize the Default-Generated Code – 1 of 3  As discussed, the default SQL data access code generated is a good start, on the road to EGL/SQL database programming, but it’s only a start. You will definitely be adding to, and modifying the default code produced by the data access wizard.  This next workshop will give sense of this customization – you will change:  DataItems  An SQL Function (From Project Explorer) \EGLSource\eglderbyr7.primitivetypes.data\ From \EGLSource\eglderbyr7.primitivetypes.data\ 1.OpenDataDefinitions.egl 1.Open DataDefinitions.egl in the Content Area Ctrl/F 2.Do a global replace (Ctrl/F) of the datatype DecimalMoney Decimal  Money 3.Save your changes Ctrl/S  With your mouse clicked in the file, press Ctrl/S)  Note – if you get any red X’s in the source file you’ve made a typo. Correct all typos.

22  Customize the Default-Generated Code – 2 of 3 In \EGLSource\eglderbyr7.access\  Open OrdersLib.egl and find the GetOrdersListAll function: GetOrdersListAll getordersArray;  Click your mouse between the word get and ordersArray;  Right-click  Right-click and select:  SQL Statement  Add  This causes RBD to insert the SQL statement it would generate, inline in your function, allowing you to customize the data access code (see next slide)

23  Customize the Default-Generated Code – 3 of 3 order by order_status  Change the order by clause to sort the results of this SQL statement by the order_status field.  Note – type  carefully. Ctrl/S  Press Ctrl/S to save See Notes  In doing EGL/Java development, most SQL statement typos are not caught at compile time, but at run-time, making them a royal pain to debug. See Notes  But the tooling can catch these (as we’ll see in an upcoming section) – want a hint? (see Optional Exercise on the next slide)

24  Test the Customized SQL Statement – 1 of 2 (Set Preferences)  Optional Exercise: From Window, Preferences, open EGL, SQL Database Connections, and select (from the ComboBox) your EGLDerbyR7 connection

25  Test the Customized SQL Statement – 2 of 2 select  Optional Exercise: Click your mouse inside the select statement.  Right-click and select: SQL Statement  Validate OK Click OK at the SQL User ID/Password prompt.  If there are SQL problems, you will find out now upon Validating your statement. Ctrl/S  If there are EGL “host variables” in your statement, and there are problems with your EGL host- variables, you will find out when you save (Ctrl/S)  If you are not familiar with the term, EGL “host variables” are covered later in this course.

26  Generate the Code Changes (From Project Explorer) EGLWeb  Right-click over EGLWeb Generate  Select Generate  This will generate new Java code for your changes to the default code created by the Database Access Application Wizard 

27  Now that you have completed this topic, you should have:  Used the EGL Data Access wizard to import – from your Derby database:  Data Access Libraries  Data Access Records  DataItems (an operational data dictionary)  SQL call control records  Customized:  The DataItems  A Data Access Library Function  Successfully re-generated all of the Data Access import wizard code. Topic Summary Summary