Transcript EGL - IBM

Enterprise Generation Language
Doug Fulmer
WW Sales Exec,
e-bus Infrastructure
iSeries
2337 Hazy Meadows Ln
Flower Mound, TX 75028
Tel 972-724-0288 (Bus)
Tel 972-724-1202 (Home)
Tel 214-507-0859 (Cell)
[email protected]
Developer’s Road Map
Presentation
Today
Better
Tools
5250
5250
Better
User
Interface
Better
Architecture
Better
Portability
Better
Scalability
Web
Web Services
Logic
RPG/COBOL
Tools
PDM
ILE RPG/COBOL
Java
WDS AE / RSE
WDS / RSE
iWA
EJBs
Web Tools
Java Tools
WebFacing
HATS
DB2 / DDS
Database
J2EE / EJBs
WAS Express
WebSphere
Customers and partners may enter the map at any
stage and may choose to exit at any stage as well.
SQL
Stored Proc / Triggers
Portal Express
WAS Base
WAS ND
Portal Express Plus
WebSphere MQ
WebSphere BI
©
2004 IBM Corporation
PAGE 2
RSE
= Remote System Explorer
Development in the era of e-Business
• Maintain and Extend existing core systems
• Develop new strategic Internet based systems
– Support the entire spectrum of e-Business solutions
• Simple Web
• Complex Transactional systems
• Integrated Business Processes
• Modernize and Integrate existing core systems
©
2004 IBM Corporation
PAGE 3
Application Development Challenges
• Lack of a cohesive, systematic, comprehensive approach
– Islands of AD tasks optimization
• Fragmented, obsolete, poor or absent
– Methodologies and Processes
– Architectural and Implementation Best Practices
– Tools
• Complexity of new technologies
– Skills mismatches
– Slow skills ramp-up
– Slow, error prone development
• Legacy
– Not integration-ready
– Costly to maintain
©
2004 IBM Corporation
PAGE 4
Application Construction Challenges
User
Interface
Control
Logic






 Servlets
 Struts
 JSF
HTML
JSP
WML
VML
JSF
Portlets
 WSDL
 SOAP
 UDDI
 XML
 SOA
 BP Choreography
 Many parts
 Many standards and APIs
 Complex Architectural Structure
©
2004 IBM Corporation
PAGE 5
Business
Logic
 JavaBeans
 EJB
 EGL
 CICS
 RPG
 COBOL
Enterprise
Information
Connection
 JDBC
 JCA
 JMS
 EGL
Web
Services
Business
Process
Integration
 High Skills … Slow ramp-up
 Many Tools, Methodologies, Processes
 Slow, error prone development
WebSphere Studio Solution
User
Interface
Control
Logic
Business
Logic
Enterprise
Information
Connection
Web
Services
Business
Process
Integration
Test and Deployment Made Easy!
Comprehensive, well integrated
developer assistance tools
©
2004 IBM Corporation
PAGE 6
 Increase productivity
 Lower skills requirements
Why Enterprise Generation Language?
• Pressure to move to Java/J2EE
• Available developers skills
are business oriented programming
technologies
– COBOL, PL/I, RPG, 4GL
• Cost of re-training can be significant
– Gartner study finds that cost can be
over $20,000 per developer
• Business pressure may not afford
time to re-train
• Results may be sub-optimal
– Application architecture
– Maintainability
– Performance
©
2004 IBM Corporation
PAGE 7
Rapid Development with JSF and EGL
User
Interface
Control
Logic
Business
Logic
Enterprise
Information
Connection
Web
Services
Business
Process
Integration
JSF RAD tools virtually eliminates
complex error prone manual coding

Point and click Web presentations

Control Logic and Navigation automation

Rich UI components

No-code input validation
EGL simplifies business logic and shields from
complexities of data access (Databases, Files,
Message Queues) and legacy integration

High level simple I/O verbs insulate from
coding data access APIs

Procedural easy to learn language

Simple CALL interface to existing programs
insulates from connectivity APIs
©
2004 IBM Corporation
PAGE 8
EGL – What Is It?
• EGL = Enterprise Generation Language
– High level programming specifications
– Hides complexities of implementation technology
• For the non-Java programmer
• For the non-CICS programmer
• Special Parts + Scripting Language
– Stored in files managed by workbench repositories
• Interactive Development and Debugging
– Environment independent language
– Built-in debugger
– Can be used for RAD development
©
2004 IBM Corporation
PAGE 9
EGL Approach: Making the complex simple
 Simplify specification and construction
 High-level language specifications
 Shields from systems complexities
 Easy and quick to learn
 Similar to traditional, procedural languages
 Facilitate verification
 Test/debug at logical level
 No deployment required, iterative prototype-to-production
 Automate generation for
 Java or COBOL (WDSc AE) for iSeries
©
2004 IBM Corporation
PAGE 10
EGL – What Is It?
Rapid development using a platform-neutral high level 4GL specification
language
Abstractions, wizards, and tooling for lower skill requirements to take advantage
of new technologies (e.g. EJBs, Java, web services, Struts, MQSeries)
Migration path from VisualAge Generator's 4GL
Bringing forward and enhancing the core technologies created over the last
20+ years in VisualAge Generator and CSP
With significant additions and enhancements necessary for robust ebusiness Web Application development
©
2004 IBM Corporation
PAGE 11
EGL – Conceptual Summary
SQL,
WAS,
CICS
Bind EGL variables
to page via Page
Data view
Server scripting
in EGL
MQ,
Call,
Web Services,
…
EGL Code
DB2
The Outside
World
Websphere Studio-based 4GL (comfortable
for 4GL, COBOL, RPG developers)
…builds on top of Websphere
Studio Tools, like Page Designer.
iSeries
Latest Web
capabilities
plus “heritage”
support
Simplify complex
runtimes
pSeries
zSeries
xSeries
…supports Text-based UI’s for
migration of existing apps
EGL
Deploy optimally to
diverse platforms
For
developers who need to solve Business Problems, not Technology Problems
©
2004 IBM Corporation
PAGE 12
EGL Development Process Overview
Model
Use Rational Rose/XDE
Export data model from DB Schema or UML model to EGL & DDL
Optional, but useful
Develop
Iterative
Specify business logic using high level abstractions
Build web pages or text screens
Target platform neutral - Shield complexity of target system
Interactive test of application logic
Strong Team support
Generate
Transform EGL logical specification into Java or COBOL
Create build script for server artifacts
Create class files ready to export to JAR for deployment
Deploy and Run
iSeries
Windows
zOS: CICS or Batch (IMS in follow on release)
Linux, AIX (Solaris and HP in follow on release)
©
2004 IBM Corporation
PAGE 13
WebSphere Development Studio
Current 5722-WDS customers with software subscription
for V5R3 and V5R2, to upgrade use feature #: 2656
Available after GA
RPG
COBOL
C/C++
PDM
SEU
SDA,
RLU
Unlimited
Licenses
iSeries
iSeries
JavaTM
Debug
JSF
EGL
Java
generation
iSeries
Struts
iSeries
Web
Web
Service
Trace
Profiling
Web
Facing
DB
WebSphere Development Studio Client V5.1.2
©
2004 IBM Corporation
PAGE 14
iSeries
Projects
RSE
XML
+CODE
+VisualAge RPG
App
Server
HATS
Studio
www.ibm.com/software/awdtools/iseries
WDSc Advanced Edition V5.1.2
Workstation License
order through Passport Advantage
http://www.lotus.com/services/passport.nsf/WebDocs/Passport_Advantage_Home
iSeries
iSeries
Java
Debug
JSF
EGL
Java
generation
EGL *
COBOL
generation
iSeries *
Struts
2004 IBM Corporation
PAGE 15
Web
Facing *
Web
Web
Service
Trace
Profiling
DB
EJB *
Test *
Cases
Portal *
Toolkit
J2EE *
www.ibm.com/software/awdtools/iseries
©
iSeries
iSeries
Projects
+CODE
+VisualAge RPG
RSE
XML
App
Server
HATS
Studio
Page Builder Tools enhancements
Palette:
Contains rich JSF
controls. It can be
customized with
additional controls
and groups.
Navigator:
Simplified project
navigator hides
complexity of J2EE
artifacts.
Page Templates:
Page Data View:
Separate out
common page
elements in a
single template file
Reflects data
available for use by
the page. Allows easy
binding of data to UI
tags/controls
Quick Edit View:
Attributes View:
Allows scripting of
client or server side
events in Java or
EGL.
Customize the key
properties of the
selected component
Results:
Rapid UI Creation
Simple binding of UI to Data
Quick Server-side event scripting using Java or EGL
©
2004 IBM Corporation
PAGE 16
Coexistence with “Heritage Apps”
• Native calls to COBOL, RPG, C, or Java from generated EGL
applications via “Call” keyword
Project
Explorer
• Text-based UI support needed for:
– VisualAge Generator
– Informix
– Other 4GL’s
Visual
editor
• WYSIWYG TUI builder planned
– <2004/2005>
Attributes
©
2004 IBM Corporation
PAGE 17
What Applications can be developed in EGL?

Internet applications

Callable Web Services

Database applications

Callable programs from traditional Java rich GUI clients

Standalone batch applications

Standalone TUI applications

For iSeries, CICS (zOS), Linux, AIX, Windows
Web
Servers
egl
J2EE
Transactions
Servers
egl
Other
Transactions
Servers
Web
Services
egl
©
2004 IBM Corporation
PAGE 18
Accelerate Application Delivery with ARAD
Internal productivity benchmark for Sun PetStore reference
application
Hand-Coded in Java IDE
507.5 Hours
WebSphere Studio and EGL
60 Hours
 WebSphere Studio JSF/EGL is dramatically faster than
traditional development
©
2004 IBM Corporation
PAGE 19
EGL inter-operability = flexibility
 Powerful integration of EGL, RPG/CL, COBOL and Java
for no-compromise solutions
 Maximum productivity, maximum flexibility
 Two-way interoperability
 Tools integration (Seamless workbench, Editors, Debuggers)
Productivity
Existing Application Frameworks
Business Logic and Components
EGL
RPG – CL – COBOL
Java/C/C++
Flexibility
©
2004 IBM Corporation
PAGE 20
Other Alternatives
Lansa
www.LANSA.com
mrc
www.mrc-productivity.com
Business Computer Design
ww.bcdsoftware.com
Magic Software
www.magicsoftware.com
GeneXus
www.genexus.com
Computer Associates
www.ca.com
ASNA
www.asna.com
©
2004 IBM Corporation
PAGE 21
What is the same for RPG/COBOL
Developers?
• Team development
• Business logic
– Procedural legacy language(s) replaced by EGL
• SQL  SQL (and RDBMS  RDBMS)
– If developers have used DB2
– However, if using local DB2 system, dissimilar tools and IDE
• Transactions
– All principles of online systems design apply
– Most differences are vocabulary-based
• Code Construction
– If developers have used products such as CSP, IEF, IEW, TELON,
APS, etc.
©
2004 IBM Corporation
PAGE 22
What's different but similar for
RPG/COBOL Developers?
• WDSc  TSO/ISPF
• EGL Library file  Set of related copybooks (database schema)
• Pages  Screens – and many similar U.I. Concepts with…
– CICS/BMS maps … HTML forms
• EGL Program  RPG/CL/COBOL program source file
• EGL executable  Program executable
• JCL  CL Pgm
• Managing state – especially if developers are experienced in
"conversational" C.I.C.S. programming
• Almost all EGL language constructs similar … and familiar
©
2004 IBM Corporation
PAGE 23
COBOL  EGL … Programming Similarities
•
•
•
•
•
•
•
•
•
•
©
EGL Program  Legacy Source file definition
Datatypes and variables similar – Slightly different syntax (actually pretty
close for an iSeries programmer)
Assignment/Move  MoveL/MOVE/COMPUTE statement
EGL Function  RPG Procedure, COBOL paragraph
EGL call  RPG/COBOL CALL – to RPG Procedure or COBOL subprogram, passing parameters, etc.
Conditional expressions – similar. Use of || && in place of OR/AND
Conditional expressions
– EGL while  PERFORM UNTIL…
– EGL for  PERFORM UNTIL…VARYING
EGL Redefines/Function  REDEFINES clause
Comments  Comments – Slightly different rules
Type definitions are similar extensions to Field Reference File
2004 IBM Corporation
PAGE 24
What's new for RPG/COBOL Developers?
• Rich, window'd IDE (WDSc)
– Not if experienced using WDSc RSE
– If totally "green-screen" get them to read a Redbook on WDSc
before they start with EGL
• EGL Artifacts - High level of abstraction in development
• Other EGL and WSED aspects
– Projects and administrative artifacts (Workspace, etc.)
– Libraries
– Debugging
• Web Services and XML
©
2004 IBM Corporation
PAGE 25
Similar aspects of EGL and RPG
• Field Reference File
(RPG/DDS)
*************** Beginning of data **************************
R FLDREF
A** A
A
APARTMENT 10A
A** C
A
CITY
30A
A
CUSTOMERID 9P 0
RANGE(1 1000)
A** D
A
DIRECTIONS 255A
A** E
A
EMAILADDR
50A
A** F
A
FIRSTNAME
30A
A** L
A
LASTNAME
30A
A** P
A
PASSWORD
8A
A
PHONE
10A
A
POSTALCODE 10A
A** S
A
STATE
2A
A
STREET
30A
****************** End of data ******************************
©
2004 IBM Corporation
PAGE 26
• Data Items (EGL)
package data;
// A
dataItem Apartment char(10) {displayName="Apartment"} end
// C
dataItem City char(30) {displayName="City"} end
dataItem CustomerId int
{displayName="Customer#“
range = (1, 1000)}
end
…
// P
dataItem Password char(8) {displayName="Password",
displayUse=secret} end
dataItem Phone char(10) {displayName="Phone"} end
dataItem PostalCode char(10) {displayName="Zip Code"} end
// S
dataItem State char(2)
{displayName="State",
selectFromList = StateTable.stateAbbreviation,
selectType = value}
End
Similar aspects of EGL and RPG
• RPG is…
–
–
–
–
–
–
–
–
Field Reference File
Records
Programs
Subroutines
Text UI
Reports
SQL or Indexed database access
…
• EGL is…
–
–
–
–
–
–
–
–
–
–
–
–
–
–
–
©
2004 IBM Corporation
PAGE 27
Data Items
Records
Programs
Functions
Text UI
Reports
SQL or Indexed database access
Libraries/Services
Integrated Websphere Studio debugger breakpoints/watchpoints
JSF-based web apps w/”Page Handlers”
Portlet support
Deploy to Linux and other platforms
UML import
Web services support
…
Compiling an RPG IV program
compile
bind
CRTRPGMOD
RPGIV
Source
Members
(RPGLE)
CRTSRVPGM
©
2004 IBM Corporation
PAGE 28
link
CRTBNDRPG
CRTRPGMOD
RPGIV
Source
Members
(RPGLE)
ILE Service
Program
(*SRVPGM)
ILE Modules
(*MODULE)
RPG
IV
ReUsable!
compile
ILE Modules
(*MODULE)
CRTPGM
bind
ILE Program
(*PGM)
Compiling an EGL program
EGL
EGL Script
EGL
©
2004 IBM Corporation
PAGE 29
compile
bind
Intermediate
Final
ReUsable!
EGL Application Artifacts
Welcome.egl
Welcome.jsp
• Page Handler
–
–
–
–
–
Contain functions and data related to a .jsp
“On Page Load” function
Declare data structures that are available to “Seoul”
Functions bound to command buttons
Should be mostly “Controller Logic”
Call “getCustomer”
function
CustomerLib.egl
• Library
– Multiple entry points
– Put “Business Logic” here for web apps
– Contain functions and data declarations
•
•
generally related in some way
Example: “Data Access Library” for Customer Table
–
–
–
SQL Record definition
All basic CRUD functions
Generated by Data Access Library Wizard from existing Schemas
Calcs.egl
Called pgm
Payroll.egl
PrintChecks.egl
• Program
– Used for single point of entry situations
– TUI program, Batch program, GUI program, …
©
2004 IBM Corporation
PAGE 30
Called pgm
Main pgm
Rich Data
• Data Dictionary, iSeries Field Reference file, …
• Define Validations, Formatting, Display information, etc… once for Data Items
– These rules apply wherever the data item surfaces (Web Page, TUI, business logic, …)
– Validations are automatically run by EGL runtime and appropriate messages are displayed
• Use Data Items to create Record definitions or other data structures to leverage Rich
Data
// Customer SQL Record
Record Customer SQLRecord
{ tableNames=("PIZZABYIBM.CUSTOMER"),
keyItems=("customerId“) }
customerId CustomerId;
firstName FirstName;
lastName LastName;
…
state State;
end
// StoreLocation SQL Record
Record Store SQLRecord
…
state State;
end
©
2004 IBM Corporation
PAGE 31
DataItem CustomerId int
{ column=CUSTOMER_ID,
range=(1, 1000),
displayName="Customer Number",
format= “######” }
end
DataItem State char(2)
{displayName=“State Abbr.",
format= “AA”,
validatorTable=StateTable }
end
DataTable StateTable type matchValidTable
StateAbbreviation char(3);
{contents = [["NC"], ["MN"], ["TX"], ["VA "] ...]}
end
Data Access
Add
Get
• “Record” abstracts access to:
–
–
–
–
Replace
Delete
Relational data
MQ messages
Indexed, Relative, Serial data
DL/I (v6.0)
Commit
EGL Record
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
©
2004 IBM Corporation
PAGE 32
EGL – Comments
// rest of line is comment
/* comment delimiters
- single/multiple lines
- cannot be nested */
-- SQL statement comment
©
2004 IBM Corporation
PAGE 33
EGL Structure Example
One dimensional array
of 20 elements
Two dimensional array
of 20 by 15 elements
©
2004 IBM Corporation
PAGE 34
Data Parts – DataItem – Examples
©
2004 IBM Corporation
PAGE 35
Logic Statements – If-Else
• Selectively runs a block of code
– based on result of logical expression
– runs block when true
– runs alternative block when false
• Syntax:
if (logicalExpression)
EGL statements when true
else
EGL statements when false
end
• else clause is optional
©
2004 IBM Corporation
PAGE 36
Logic Statements – While
• Selectively loops through a block of code
– based on result of logical expression
– while block runs when evaluated true
– expression evaluated
•
•
when while construct first entered
after each execution of the while block
– execution repeats until evaluated false
©
2004 IBM Corporation
PAGE 37
• Syntax:
while (logicalExpression)
EGL statements when true
end
• Can use to simulate For loop
Logic Statements – Case – Examples
Case using
Matching Criteria
©
2004 IBM Corporation
PAGE 38
Case using
Logical Evaluation
EGL - Debugging
• EGL source level debugger
– Breakpoints, watch variables, change values, …
– Extends base Eclipse debugger
• Debug entire application seamlessly regardless of ultimate deployment
targets
– Transition from debugging JSP’s to EGL code to Java to … and back
Java Classes,
Configuration Files,
…
• Validate system correctness prior to deployment
EGL Generator
EGL Code
// Event handler: Delivery Address button clicked
Function forwardToDeliveryAddress()
customer.emailAddr = emailEntered ;
get customer;
setSessionAttr(PizzaConst.custrKey, customer);
forward to DeliveryInfo ;
End
…
EGL Model
Generation Process - Runtime:
EGL Java Runtime
(.jar containing common routines)
Interpretive Debug Process - Development:
EGL Interpreter
Websphere Studio Debugger
©
2004 IBM Corporation
PAGE 39
Makes calls to EGL
runtime from Debugger
EGL Product Deliveries
EGL 5.1.2
• Websphere Studio Site Developer/Application Developer (available May
21st)
–
–
–
–
–
–
Web Applications (based on Java Server Faces)
Text UI applications for distributed platforms
iSeries/Java support (WDSC for iSeries)
VG migration tooling
Many misc enhancements
Creation of EGL-based Web Services
• WDSC Advanced Edition for iSeries (available July 21st)
– i-series/COBOL support
– 5250 TUI applications
• Websphere Studio Enterprise Developer (available 3Q)
– COBOL deployment to CICS and Batch
• Utilities developed in collaboration with BP’s
– UML to EGL import tool
– <other tools> to EGL migration tool
©
2004 IBM Corporation
PAGE 40
Recap - EGL Benefits
• Easy to learn, lowers skills barrier to e-business
• Maximize existing “Business Oriented” developers
• Higher productivity to deliver systems faster
• Maximum flexibility
• Multiple platforms and topologies
• Step to Java if required
• Bring legacy to e-business
• Easily connect to existing resources
• Quickly develop new functions on traditional platforms
©
2004 IBM Corporation
PAGE 41
Recap - EGL Benefits
• Expand e-business developers team with
traditionally skilled programmers
• Tap into new valuable resources with strong
business domain knowledge
• Lower risk and increase project success rate
• Lower costs of training
• Lower Cost of development and
• Deliver Projects faster and lower development
costs
©
2004 IBM Corporation
PAGE 42
Questions
©
2004 IBM Corporation
PAGE 43