Session: I02
Jean Georges Perrin
IIUG
Monday, October 2 nd 2006 • 13:30 – 14:30.
Platform: IDS, EGL
• Who Am I
• EGL Overview
• 4GL to EGL Conversion
• Partner Technology
• Summary
2
• Who Am I
• EGL Overview
• 4GL to EGL Conversion
• Partner Technology
• Summary
3
• My Unix box usually answers…
4
• Jean Georges Perrin
• Development tools (xGL, Java EE, PHP)
• Works with Informix products since ’97
• IIUG board member since ’02
• Lives in
Strasbourg, France
5
• Application developer, started with Visual Basic, in the early 90s
• In the web since 1994
• Move to 4GL in 1997
• Goals:
• Webizing all things I touched (business apps, catalogs and i4GL…)
• Find the ease of use of Visual Basic
6
• Who knows 4GL?
• Who knows Java?
• Who thinks Java is difficult?
• Who knows EGL?
• Who knows .net?
• Who is going my Java & PHP lectures later this week?
7
• Who Am I
• EGL Overview
• 4GL to EGL Conversion
• Partner Technology
• Summary
8
What is EGL?
• Business Programming Language + Development
Environment
Business Programming Language
• Robust, easy-to-learn, mature
• Aimed squarely at technical business developers, who need to solve business problems as quickly and efficiently as possible
• Based on combination of Informix 4GL + IBM’s VAGen
• Over 25 years of R&D + production use
+ Development Environment
• Integrated into Rational Software Development Platform
• Based on industry-standard artifacts and development patterns
9
4GL
VAGen
Power
Builder
Visual
Basic
EGL
Oracle
Forms
B
O
10
L
RP
G
C
O
EGL
Deploy to diverse platforms
Higher
Productivity
What can you build using EGL?
• Database oriented applications
• Standalone Batch / Reporting applications
• Standalone CUI (Character User Interface) applications
• Linux, Unix, Windows, iSeries, CICS (zOS)
• Web applications
• Provide Web Services / Consume Web services
• Message-oriented applications (WebSphere MQ Support builtin)
• Rich GUI clients (planned for Rational SDP 7.0)
• Callable programs from traditional Java rich GUI clients
• EGL generates both Java (standard) and COBOL (optional)
• WSED required for COBOL generation
11
Rational Software Architect
For architects and lead developers building J2EE or C++ based solutions
Rational Application
Developer
Robust J2EE transactional
Applications
EJB development
Rational Web Developer Web Applications
Page & site visual composition
JSP, Servlet, XML, & Web services tools
Rich Java Client tools
Rapid, simplified Development
JSF/WDO, Wizards, Struts Visual Builder
Enterprise Generation Language (EGL)
Integrated Test Environment
Portal/Portlets design and construction tools
Code analysis assistance and automation
UML visual editors
Team Support
Clearcase LT
United Java and C/C++ development platform
Application analysis assistance and automation
UML language transforms
Full RSM capabilites
Full RAD capabilites
Workbench:
A comprehensive Java IDE with unprecedented flexibility & extensibility
Configurations & “perspectives"
Plug-in Architecture
Local & Team resource management
Common IDE across Windows & Linux
Superior Java programming facilities
http://www.eclipse.org
12
• “Record” abstracts access to:
• Relational data
• MQ messages
• Indexed, Relative, Serial data
• DL/I (v7.0) EGL Record
Add
Get
Replace
Delete
Commit
SQL MQ DL/I XML
* - future
Serial Indexed Relative
• Common verbs for data access/unit of work management
• Add, Get, Replace, Delete, Commit
• I/O errors handled in a common fashion across disparate data types
• Data format conversions handled automatically
13
Easy access to data sources
• EGL record concept
Inline coding of SQL statements
• execute #sql{ ... }
Command line arguments are supported
• SysLib.getCmdLineArg()
• SysLib.getCmdLineArgCount( )
Character based output and
• displayLineMode()
• result = promptLineMode()
14
EGL supports character oriented (CUI) and text oriented (TUI) applications
• CUI: Windows, Linux, Unix
• TUI: zOS, iSeries
EGL CUI applications can be deployed either ascurses-based (Linux, Unix) or
Java windows based (Windows, Linux,
Unix)
The EGL CUI look and feel is based on the Informix
4GL menus and forms behaviour
EGL CUI forms support Query by
Example (QBE)
15
• Seamles integration with JSP
(Java Server pages) and JSF
(Java Server Faces)
• Pagehandler code: 100% EGL
• Contains functions and data related to a .jsp page
• “onPageLoad()” function
• Declare local data structures
• Functions bound to command buttons
• Deployment support for
WebSphere application server and Apache‘s Tomcat
16
• EGL has a builtin reporting API, based on
JasperReports
• JasperReports: powerful OpenSource,
Java based reporting engine
• Multiple Output formats: Text, PDF,
HTML, XML, CSV
• Callback function support
• Complex sub-report and grouping functionality
• http://jasperreports.sourceforge.net
• The JasperReports libraries are bundled with Rational SDP
• Jasper report design editors available
• iReport – Standalone, OpenSource
•
JasperAssistant
– Eclipse plugin,
Commercial
17
• EGL supports easy access to message queues and external files
• Based on the EGL record concept
• EGL Messaging support based on
WebSphere MQ
• Allows easy integration with heterogeneous applications
• EGL file access
• serialRecord (all operating systems)
• indexedRecord, relativeRecord (VSAM access only – AIX and zOS)
•
EGL relational database table export / import functions
• sysLib.unloadTable()
• sysLib.loadTable()
18
JSF Page
& Handler custSearch.jsp
Javascript
Service
Implementation custSearch.jsp
custSearch
JSF customer Customer; customerLib.getcust(id); customerLib.getdisc(id);
End
Function updateCustomer() updateCustomer(); calcDiscount(cust);
End
DiscountService
Service Discount
Function
EGL
…
End
Interface
Service
Implementation
CustomerService
Service Customer
Function allCustomers () get customers;
End
Function updateCustomer () update customer
End
EGL
Function sendRequest ()
…
Customer
Informix,
DB2,
Cloudscape
19
• Who Am I
• EGL Overview
• 4GL to EGL Conversion
• Partner Technology
• Summary
20
• Support for Informix IDS and DB2
• Support for Windows platforms
• A single development environment:
• supporting EGL, Java, COBOL and Web application development
• to maintain and enhance existing TUI applications
• Mature, field-tested I4GL business logic can be used within new web applications
• Standard “curses” library will allow much better color support in character applications
• Many legacy I4GL constructs can also be deployed as host (z and i-series) applications
• Enhanced reporting capabilities
21
C functions c_code.c
form.per
main.4gl
catalog.
4gl inventory
.4gl
Text
Reports
IDS
Database
I4GL to EGL Conversion main_program.egl
formForm.egl
main.egl
inventory
.egl
catalog.
egl
22
Text
Reports
C functions c_code.so or c_code.dll
SchemaLib.egl
Goal is to convert an I4GL application to the equivalent EGL application that uses:
• the same display device
• the same database server
• I4GL TUI applications will be converted to EGL TUI applications
Convert, on a program-by-program basis, using the conversion utilities:
• provided as part of the IDE
• also available from the command line
Separate conversion passes required for:
• database metadata extraction
• 4GL shared libraries
• I4GL source code
Automated conversion should convert most I4GL source code
• some I4GL programs may require manual intervention
23
Rational SDP conversion plug-in
• runs within the EGL development
• GUI wizard collects information
• generates configuration XML files
• invokes the conversion utility
Command line conversion utility
• Java program can be run in current I4GL build environments
• requires configuration file describing current I4GL environment
• generates EGL conversion “projects”
24
Configuration file
• XML file generated from interaction with conversion wizard
• contains required conversion project information
Manifest file
• XML file generated during conversion of shared libraries
• contains declaration and usage information about the functions used in the shared library
Log file
• contains warnings and errors
• status of each source file
• summary of conversion
Makefile
• single makefile for all I4GL platforms
• used to re-link the project shared library with EGL JNI stack library
25
• I4GL code is “legal”
• it will compile with I4GL 7.32 compiler
• conversion will not “fix” invalid I4GL code
• Multiple passes are required
• Functions that can not be resolved during conversion are assumed to be C code functions
• if function is later found to be an I4GL function, re-conversion would be required
• C code functions do not use undocumented I4GL internal functions
26
Database metadata
• conversion creates EGL packages for each database used in the project
• schema metadata will become a separate EGL project which can be referenced by other EGL projects
I4GL Shared libraries
• conversion generates Manifest file and makefile
I4GL Source files
• .4gl files
• .per (form) files
• message files
27
• Identify & locate all the components of the 4GL application to be converted (.4gl, .per, message files, shared libraries)
• Identify connection information for each database used
• Start Informix database instances
• Mount/copy source code to EGL development machine, if required
• Determine destination directory for converted EGL source code & conversion artifacts
• Identify “Client” locale – used to convert message files
• Identify font information – used to generate report designs
28
• Review log file
• Fix identified problems
• on the 4GL side and re-convert or
• in the new EGL file
• shared libraries may have to be re-converted if functions cannot be resolved
• Open the project in the IDE
• Verify EGL packages and source files
• View/update EGL build descriptor file
• “Generate” Java code for the project
• fix problems in the EGL code
• Set runtime properties from existing environment variables
• Launch new EGL project
29
• Database connections cannot be shared between EGL and C code
• C code cannot call EGL functions
30
Webmain.egl
Use your I4GL
Business
Logic in EGL
Web Services
Use your I4GL
Business Logic in whatever comes next!!!
Webinventory.egl
Use your I4GL with Message
Queues
HTML
Output
DB2
IDS
XML
Output
Output
C functions c_code.so
SchemaLib.egl
Text
Reports form.egl
BL main.egl
BL inventory.egl
31
BL
BL catalog.egl
EGL
GUI App
(RSDP 7.0)
Eclipse
RCP Plugin
(RSDP 7.0) e.g. Lotus
Workplace
Informix
4GL App
Batch-/
Character based
EGL App
WebSphere
Application Server
Web (JSF)
EGL App
EGL based
Portlet
(EGL.Next) e.g. WebSphere
Portal Server
32
• Who Am I
• EGL Overview
• 4GL to EGL Conversion
• Partner Technology
• Summary
33
Migrate Informix 4GL to EGL web using eSmartSoft EGL TUI to
EGL web conversion Parser
EGL Web
Application
EGL Text
UI
Application
4GL Text
UI
Application
34
• Field tested with three 4GL to EGL web conversion already completed and in deployed in production.
• Capability to handle large complex projects. Already implemented conversion of
1600 module 4GL application to EGL Web.
• Language neutral, bidirectional including 7-bit locale conversion to
Unicode
35
Movie Time
36
• Who Am I
• EGL Overview
• 4GL to EGL Conversion
• Partner Technology
• Summary
37
Easy to learn, lowers skills barrier to e-business
Higher productivity to deliver systems faster
Maximum flexibility
Multiple platforms and topologies
Step to Java if required
Integrated with latest technology (Eclipse, JSF, Jasper, …)
Bring legacy to e-business
Easily connect to existing resources
Quickly develop new functions on traditional platforms
EGL = Great language for new application development!
38
• I recommend you come ’n see: “ Introduction to
Java development with IDS ” and “ Introduction to PHP development with IDS ”
• Come to see me in San Jose (May 2007):
“ Introduction to EJB3 dev. with IDS and Viper ”
• (Give me good marks so I can be selected as best speaker of the conference and beat Darryl, Lester and Art - previous speakers).
39
• Download EGL (I guess you all have IDS already)
• Download the fix packs
• Download Jonathan Sayles’ excellent work from http://www.jsayles.com/ibm
• Join the development-tools forum on IIUG web site
• Get started with a few examples
40
The 4GL/EGL Redbook!
• EGL Language Concepts
• The Rational SDP environment
• A simple EGL web application
• 4GL to EGL conversion
• EGL and databases
• Advanced EGL web programming
• EGL and JasperReports
• EGL Deployment
• EGL CUI applications
• plus much more...
41
• EGL on
IBM DeveloperWorks
• EGL Tutorials
• EGL Documentation
• EGL Code Examples
• An active EGL Forum
• plus more...
URLs: http://www.ibm.com/developerworks/rational/products/egl http://tinyurl.com/lz6l9
42
I02
4GL to EGL – Hype or Reality
IIUG jgp@iiug.org
jgp@jgp.net
43