Session AC23
IBM Rational SoftwareDevelopment ConferenceIBM Rational SoftwareDevelopment Conference
2008
© 2007 IBM Corporation
®
UML to EGL without writing code and deploy as Java or COBOL
Reginaldo BarosaExecutive IT Specialist, TechWorks [email protected]
Brian Colbert.Certified IT Specialist, Rational for Systems [email protected]
IBM Rational Software Development Conference 2008
Session 20036 2
Presentation Agenda What is Rational Business Developer ?
Why Model-based Development?
What is UML
Enabling Business Oriented Developers
Model Driven EGL Development
Flow from Model to Code
Transformation Parameters Editor
Class Diagram Transformations
IBM Rational Software Development Conference 2008
Session 20036 3
PortalsBatch
ProcessesText UI Web Rich UI Reports Web/Native
Services
External Interfaces
COBOL RPG PL1
Databases
DB2 UDB SQL Server Oracle Derby
Write business and control logic with EGL
Encapsulate existing or create new resources
Service/InterfaceService/Interface
ProgramProgram User InterfaceUser Interface
Business LogicBusiness Logic
Control LogicControl Logic
Enterprise ConnectionEnterprise Connection
Service/InterfaceService/Interface
ProgramProgram User InterfaceUser Interface
Business LogicBusiness Logic
Control LogicControl Logic
Enterprise ConnectionEnterprise Connection
C, C++ Java
Informix IMS
VSAM other…
What is Rational Business Developer?
WebSphere
USS
Linux
Batch
CICS
IMS
System z
WebSphere
Native i5OS
Native i5OS
System i WebSphere
Tomcat
Native
Windows, Linux, Unix
Architecture
Skills
IBM Rational Software Development Conference 2008
Session 20036 4
Why Model-Based Development?
Modeling: Facilitates collaboration between architects and developers
Provides simplified representation of a complex system
Allows engineers to focus on relevant details instead of extraneous implementation details
Facilitates communication of plans to those involved in construction phase
Is a traditional means to reduce engineering risk
Can greatly increase the pace of development!
IBM Rational Software Development Conference 2008
Session 20036 5
What is UML (Unified Modeling Language)
Unified Modeling Language
A standard graphical language and meta-model used to Specify, Visualize, Construct, and Document software-intensive systems
Created based on industry-wide experiences regarding modeling and building large and complex software systems
UML includes many diagram types, including: Class diagrams to describe static structure of the system
What classes are in the system
How the classes are related
What are the class methods and attributes
Sequence, activity, state chart diagrams to describe dynamic system behavior
Class diagrams are often used as input for basic code generation Generate initial source files with “standard” business logic in the functions
IBM Rational Software Development Conference 2008
Session 20036 6
Enabling Business Oriented Developers So, Model Driven Development is:
Transforming models into code…
Then augmenting that code with business logic
Rational Business Developer Goals: Allow modelers/architects and “Business Oriented Developers” to collaborate
Implement models on Enterprise Platforms, quickly and efficiently
IBM Rational Software Development Conference 2008
Session 20036 7
Model Driven EGL Development and Transformation
* DDL = Data Definition Language, can create the DB
RelationalDB
Java
Application server
JSF
DDL*
Generators
Generate
UML
JSP
RBD
TPM Editor
Workstation
EGL
optional
CRUDandLIST
COBOL
IBM Rational Software Development Conference 2008
Session 20036 8
Flow from model to code
1. Create UML Model(using RSA)
2. Add/Edit Transform Parameters(using RBD)
3. Generate EGL Code
IBM Rational Software Development Conference 2008
Session 20036 9
Transformation Parameter Editor
Allows users to: Enables code gen
customization Transform one or more
UML elements to EGL
Parameters are available at the level of: Model Class Attribute Datatype
Examples: Generate EGL services
or EGL Libraries Generate DDL UI choices (labels, items in list..) Data naming, data mapping choices
Uncheck this to generate EGL
services
Choose to generate Web pages, data access functions,
and/or data definitions
Use this to run the transformations
Select the data base
IBM Rational Software Development Conference 2008
Session 20036 10
Class-Level Parameters
Override defaultsthat are based onmodel values
IBM Rational Software Development Conference 2008
Session 20036 11
Attribute-Level Parameters
IBM Rational Software Development Conference 2008
Session 20036 12
Primitive type elements
IBM Rational Software Development Conference 2008
Session 20036 13
“Run Transformation” Sheet
Can select all model elements fortransforming, or some
JSPoptional
EGL
DDL*
IBM Rational Software Development Conference 2008
Session 20036 14
Optionally - User Interface Transformation
Produces the JSPs and Page handlers required to drive the CRUD operations
Incorporates the associations between classes by providing navigation JSF pages have contextual
buttons and links based on associations
Detail pages will have buttons that will allow the user to update/modify information
Custom templates and CSS can be applied to any of the default pages that are created
Flexibility to specify read only fields (non-modifiable) in pages
IBM Rational Software Development Conference 2008
Session 20036 15
Class Diagram Transformations… Data Definition Transformation
dataitem Name CHAR(30) end
dataitem Address CHAR(50) end
dataitem Phone CHAR(14) end
dataitem _Money MONEY(10, 2) end
dataitem Integer INT end
record Student type sqlRecord {tablenames=[["Student"]],
keyItems=[studentId] }
studentId Integer {column="Student.studentID"};
name Name {column="Student.name"};
address Address {column="Student.address"};
phoneNumber Phone {column="Student.phoneNumber"};
seminar_seminarId Integer {column="Student.seminar_seminarID"};
end
record Seminar type sqlRecord { tablenames=[["Seminar"]],
keyItems=[seminarId]}
seminarId Integer {column="Seminar.seminarID"};
name Name {column="Seminar.name"};
seminarFees _Money {column="Seminar.seminarFees"};
end
IBM Rational Software Development Conference 2008
Session 20036 16
Class Diagram Transformations… Data Access Transformation (Student example for CRUD application)
EGL Generated Data Access Functions
Function UpdateStudent(updateRecord Student, status StatusRec) try if ( IsValid(updateRecord) ) replace updateRecord noCursor; HandleSuccess(status); end onException (exception SQLException) HandleException(status, exception); endend
Update
Read
Function AddStudent(newRecord Student, status StatusRec)
if ( IsValid(newRecord) ) try
add newRecord;
HandleSuccess(status); onException (exception SQLException) HandleException(status, exception); end
else HandleInvalidDBRecord(status); endend
Function GetStudent(searchRecord Student inout, status StatusRec)
try get searchRecord; if (SysVar.sqlData.sqlCode == 100) HandleDBRecordNotFound(status, "Student"); else HandleSuccess(status); end SysLib.commit(); onException (exception SQLException) HandleException(status, exception); endend
Function DeleteStudent(deletionRecord Student, status StatusRec) try delete deletionRecord noCursor; HandleSuccess(status); onException (exception SQLException) HandleException(status, exception); endend
Create
Delete
IBM Rational Software Development Conference 2008
Session 20036 17
Class Diagram Transformations… Data Access Transformation (Student example for CRUD application)
Function GetStudentListAll(studentArray Student[] out, status StatusRec)
try
get studentArray;
if (studentArray.getSize() == 0)
HandleDBRecordNotFound(status, "Student");
else
HandleSuccess(status);
end
onException (exception SQLException)
HandleException(status, exception);
end
end
List
EGL Generated Data Access Functions
IBM Rational Software Development Conference 2008
Session 20036 18
Session summary – We discussed.. Why Model-based Development
What is UML
Enabling Business Oriented Developers
Model Driven EGL Development
Flow from Model to Code
Transformation Parameters Editor
Class Diagram Transformations
IBM Rational Software Development Conference 2008
Session 20036 19
DEMO
IBM Rational Software Development Conference 2008
Session 20036 20
QUESTIONS
IBM Rational Software Development Conference 2008
Session 20036 21
Session summary – We discussed.. Why Model-based Development
What is UML
Enabling Business Oriented Developers
Model Driven EGL Development
Flow from Model to Code
Transformation Parameters Editor
Class Diagram Transformations
IBM Rational Software Development Conference 2008
Session 20036 22
Discovering the value of Rational Business Developer Proof of Technology
POT Link
Duration : 2 days
IBM Rational Software Development Conference 2008
Session 20036 23
EGL Café –
Accelerates EGL Momentum
IBM Rational Software Development Conference 2008
Session 20036 24
New EGL Book !
http://www.mc-store.com/5087.html
IBM Rational Software Development Conference 2008
Session 20036 25
© Copyright IBM Corporation 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. 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 products and services are 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.
Learn more at: IBM Rational software IBM Rational Software Delivery Platform Process and portfolio management Change and release management Quality management Architecture management
Rational trial downloads Leading Innovation Web site developerWorks Rational IBM Rational TV IBM Rational Business Partners
THANKYOU
IBM Rational Software Development Conference 2008
Session 20036 26
BACKUP
IBM Rational Software Development Conference 2008
Session 20036 27
UML to EGL Type Mapping
UML Type EGL Equivalent
Package Package
Class EGL SQL Record
Operation Stub Functions
Attribute/Property EGL Data Item
Association Key Item Within the EGL SQL Record