automating application development for legacy it systems with soa & mda

18
Automating Application Development for Legacy IT Systems with SOA & MDA Framework & Code Generator By Dr. Chung-Yeung Pang, Seveco AG, Switzerland [email protected] www.seveco.com

Upload: hue

Post on 21-Jan-2016

29 views

Category:

Documents


0 download

DESCRIPTION

Framework & Code Generator By Dr. Chung-Yeung Pang, Seveco AG, Switzerland [email protected] www.seveco.com. Automating Application Development for Legacy IT Systems with SOA & MDA. Situation in IT. Programming Languages: ~3 million COBOL programmers. ~1.6 million VB programmers. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Automating Application Development for Legacy IT Systems with SOA & MDA

Automating Application Development for Legacy IT Systems with SOA & MDA

Framework & Code GeneratorBy Dr. Chung-Yeung Pang, Seveco AG, Switzerland

[email protected]

www.seveco.com

Page 2: Automating Application Development for Legacy IT Systems with SOA & MDA

Situation in IT Programming Languages:

~3 million COBOL programmers. ~1.6 million VB programmers. ~1.1 million C/C++ programmers.

Most mission critical applications have been written in COBOL. The dependency on the interfaces, performance, transaction scopes

prohibits the change and mixing of other programming languages.

IBM reported the usage of zSeries mainframes grew 28% year-to-year in 2005.

The COBOL Center publishes: Investment in COBOL expected to be over $1.5 Trillion. Number of transaction in COBOL > hits on the Internet.

Page 3: Automating Application Development for Legacy IT Systems with SOA & MDA

Experience (1)

1998 Experience with CORBA IDL drove us to move from fixed record remote

procedure call style messaging to document-style messaging with XML and took a step into Service Oriented Architecture (SOA).

2000 Facing problems with interoperability between old and new platforms led

to the development of SOA in legacy IT environment and COBOL XML framework.

2003 First code generator for Data Object Descriptors for marshalling and

unmarshalling of XML structure from / into COBOL data structure based on class diagrams.

Page 4: Automating Application Development for Legacy IT Systems with SOA & MDA

Experience (2)

2004 Introduced Model Driven Architecture (MDA) techniques into business

service development. Developed a context based centralized service process controller

service architecture that allows plug and play of business components.

2005 Leveraged SOA and MDA in multiple projects.

2006 Developed service and unit test automation using MDA approach. Developed high level platform independent modelling and generation of

platform dependent code such as PL1 and Java. Developed frameworks for integrating existing applications written in

different languages into SOA.

Page 5: Automating Application Development for Legacy IT Systems with SOA & MDA

Experience (3)

Success in 8 IT projects Treasury Products, Credit, Payments, and Securities. Project size: 10-30 team members.

Page 6: Automating Application Development for Legacy IT Systems with SOA & MDA

Achievement Turned failure projects to success.

From Undocumented systems Ad-hoc software development style Low productivity Error prone Inflexible for code adaptation to standards Low/no reusability Require experienced programmers for the development

To Documented systems with modelling Architect & Analyst driven development High productivity Minimum error Flexible code adaptation to standards High reusability Automation through the use of models and effectively reduce the number of

experienced programmers for the development

Page 7: Automating Application Development for Legacy IT Systems with SOA & MDA

Traditional Modular Architecture

Strong coupling of modules with no central control of business logic.

Difficult to test individual modules.

Does not allow plug and play of modules.

Difficult to enhance and maintain.

Silo or monolithic approach to solving business requirements.

A

B C

D E F G H

Service Interface

Page 8: Automating Application Development for Legacy IT Systems with SOA & MDA

Component Based Service Oriented Architecture

Mainframe

Service Mediator

Ada

ptor

Context Container (IDOM)

Existing Program

Ada

ptor

Existing Program

Service Component

Service Component

XML

Service Process Controller

Page 9: Automating Application Development for Legacy IT Systems with SOA & MDA

Framework XML Handling Facilities in COBOL, PL1, C++, Java

XML parser for transformation of XML messages into integrated document object model IDOM.

Marshalling and Unmarshalling Data Object structure to and from XML tree structure using meta-information from Service Data Object Descriptors (SDOD).

XPath support. Service Mediator

Control transaction. Handle service messages. Set up the context container. Resolve and instantiate service process controller.

Context Container (IDOM) Contains service context in a document style tree structure in an Integration

Document Object Model. Provides API to insert and extract data from the service context as well as

navigation of the context tree. Service Process Controller

A finite state machine that performs the centralized process control based on Service Process Control Descriptor (SPCD) with state, event and transition.

Page 10: Automating Application Development for Legacy IT Systems with SOA & MDA

Message Interface Modelling and Generation Message Interface Modelling (MIM) and SDOD generation based

on class diagrams

Data Structure of Existing

Program (e.g. COBOL Copy

Book)

SDOD in COBOL/ PL1/ Java/ C

XML/DTD/XSD

Data Object (COBOL Copy Book/ PL1 Structure/ Java Class/ C

Header File)

Customer

id : txt32

name : txt32

firstName : txt32

Address

street : txt32

streetNo : n4

city : txt32

cityCode : n9

country : txt32

11

Optional

Page 11: Automating Application Development for Legacy IT Systems with SOA & MDA

Service Message and Context Design

Customer

id : txt32

name : txt32

firstName : txt32

Address

street : txt32

streetNo : n4

city : txt32

cityCode : n9

country : txt32

Account

no : txt32

type : txt32

balance : amount

infoText : txt256

Custody Account

Bank Account

interestRate : n3

Current Account

FX Account

Movement

transId : txt32

mDate : date

type : txt32

mAmount : amount

infoText : txt256

Trade Movement

buySellCode : txt1

stockId : txt32

stockName : txt32

price : amount

totalStock : n9

Deposit Withdraw Movement

depositWithdrawCode : txt1

FX Trade Movement

buySellCode : txt1

currency : currencyCode

transactionRate : amount

currencyAmount : amount

Saving Account

11

*

1

*

1

*

1

*

1

XML/DTD/XSD

Page 12: Automating Application Development for Legacy IT Systems with SOA & MDA

Service Process Control Descriptor Design and Generation

SPCD design and generation from state model.

Customer Info Processing

«Process State»

Service

Get Customer Info

Account Info Processing

«Process State»

Service

Get Customer Account Info

Normal Account Position Keeping Processing

«Process State»

Service

Get Account Movements

FX Account Position Keeping Processing

«Process State»

Service

Get FX Account Movements

[Control Stack Empty]

Custody Account Position Keeping Processing

«Process State»

Service

Get Custody Account Movements

Customer Asset View Request

Customer Info Retrieved

Custody Account Info Retrieved Account Info Retrieved FX Account Info Retrieved

Custody Account Movements Retrieved Account Movements

Retrieved

FX Account Movements Retrieved

Page 13: Automating Application Development for Legacy IT Systems with SOA & MDA

Service Component Modelling and Generation Frame and pattern based modelling and

up to 100% code generation.Customer Adaptor

«Procedure» initializeAdaptor ()

«Procedure» createDataObject ()

«Procedure» getCustomerID ()

«Procedure» callCustomerInfo ()

«Procedure» setEvent ()

«Procedure» setLogicalRef ()

«SOAF Start Class»CustomerInfo

W-Parm

CustomerID : txt32

1 1«reference»

1 1 01 IDOM-Data. COPY FWPC0000.

01 W-Parm. 05 CustomerID PIC X(32).

LINKAGE SECTION. *+---+---+---+---+---+---+----------+----------------------------* 01 CustomerInfo. COPY CUSTINFO.

01 PC-Data. COPY FWPC0000.

*----------------------------------------------------------------* PROCEDURE DIVISION USING PC-Data . *+---+---+---+---+---+---+----------+----------------------------* MAIN SECTION.

PERFORM initializeAdaptor IF Status-Error THEN PERFORM Handle-Error GO TO Return-Point END-IF PERFORM createDataObject IF Status-Error THEN PERFORM Handle-Error GO TO Return-Point END-IF PERFORM getCustomerID IF Status-Error THEN PERFORM Handle-Error GO TO Return-Point END-IF PERFORM callCustomerInfo IF Status-Error THEN PERFORM Handle-Error GO TO Return-Point END-IF

Error Sequence Frame

Module

initializeAdaptor

«Procedure»

createDataObject

«Procedure»

getCustomerID

«Procedure»

callCustomerInfo

«Procedure»

setEvent

«Procedure»

setLogicalRef

«Procedure»

initializeAdaptor

«Procedure»

createDataObject

«Procedure»

getCustomerID

«Procedure»

callCustomerInfo

«Procedure»

setEvent

«Procedure»

setLogicalRef

«Procedure»

Pattern

InitActionChain

«Code Pattern»

CreateDataObject

«Code Pattern»

GetAttributeFromIDOM

«Code Pattern»

CallObject

«Code Pattern»

SetEvent

«Code Pattern»

SetLogicalRef

«Code Pattern»

InitActionChain

«Code Pattern»

CreateDataObject

«Code Pattern»

GetAttributeFromIDOM

«Code Pattern»

CallObject

«Code Pattern»

SetEvent

«Code Pattern»

SetLogicalRef

«Code Pattern»

DOD="Customer Info"DataObject=CustomerInfo

XPath="./Customer[@ID]"Attribute=CustomerID

Object=CUSTINFOParameters="CustomerID, CustomerInfo"

Event="Customer Info Retrieved"

LogicalName="Customer ID"Reference=CustomerID

Page 14: Automating Application Development for Legacy IT Systems with SOA & MDA

Test Automation (1) Test data has XML format and structure is generated from class

model. Direct testing for business services with XML messages. Test service components or any existing applications with test

modules generation.

Interface Class Test Data Structure Test Data

Test Case Model

Test Module

mapXMLToDataStructure ()

callApplModule ()

renderOutputXMLFromDataStructure ()

Test XML

11 generates 1 1..*fill in for

*

1

generates

*

1

generates

*

1

«use»

«use»

Page 15: Automating Application Development for Legacy IT Systems with SOA & MDA

Test Automation (2)

Test Case Model Test Service Mediator

Test Module

mapXMLToDataStructure ()

callApplModule ()

renderOutputXMLFromDataStructure ()

Application Module

Test XML Message

*

1

activates

1

1

calls

Case Tool Host System

Use of SOA for testing.

Page 16: Automating Application Development for Legacy IT Systems with SOA & MDA

Test Automation (3) Modelling test process using

class and activity diagram. Generate test scripts in VB or

Java Script for test process. Execute test scripts direct from

modelling tool or from a batch file.

Trade Sequence Test Case

Define_Files

«Code Segment»

Fetch_Abacus_Id

«Code Segment»

Update_Abacus_Id

«Code Segment»

Set-Abacus_Id

«Code Segment»

Do_Test

«Code Segment»

Get_Status

«Code Segment»

Log_Status

«Code Segment»

Write_Output

«Code Segment»

Display_Output

«Code Segment»

Exit_For

«Code Segment»

For

For

Display_Complete

«Code Segment»

If

Joint

Define_Files

«Code Segment»

Fetch_Abacus_Id

«Code Segment»

Update_Abacus_Id

«Code Segment»

Set-Abacus_Id

«Code Segment»

Do_Test

«Code Segment»

Get_Status

«Code Segment»

Log_Status

«Code Segment»

Write_Output

«Code Segment»

Display_Output

«Code Segment»

Exit_For

«Code Segment»

For

For

Display_Complete

«Code Segment»

If

Joint

VBS Pattern

Define-Variables

«Code Pattern»

Get-XML-Value-With-Check

«Code Pattern»

Calculate-Value

«Code Pattern»

Set-XML-Value-With-Check

«Code Pattern»

Execute-Test-From-File

«Code Pattern»

Get-XML-Value-From-Stream

«Code Pattern»

Add-Log-Entry

«Code Pattern»

Write-String-To-File

«Code Pattern»

Display-File-In-Application

«Code Pattern»

Display-Message

«Code Pattern»

Define-Variables

«Code Pattern»

Get-XML-Value-With-Check

«Code Pattern»

Calculate-Value

«Code Pattern»

Set-XML-Value-With-Check

«Code Pattern»

Execute-Test-From-File

«Code Pattern»

Get-XML-Value-From-Stream

«Code Pattern»

Add-Log-Entry

«Code Pattern»

Write-String-To-File

«Code Pattern»

Display-File-In-Application

«Code Pattern»

Display-Message

«Code Pattern»

«Use Pattern»«Use Pattern»

Variable-Name=aFilesVariable-Value="""" & Directory & "TR.xml", """" & Directory & "TB.XML", """" & Directory & "TC.xml"

«Use Pattern»«Use Pattern»

File-Name="""" & Directory & "TB.xml"XPath="//transactionRef"Check-XPath="//ids/system/systemID"Check-Value="ABACUS"Return=abacus_id

Variable-Name=abacus_idWith-Value=+1

«Use Pattern»«Use Pattern»

File-Name=fileNameXPath="//transactionRef"Value=abacus_idCheck-XPath="//ids/system/systemID"Check-Value="ABACUS"

«Use Pattern»«Use Pattern»

User-Name=User-NameFile-Name=fileNameOutput=testResult

«Use Pattern»«Use Pattern»

Stream=testResultXPath="//Status@Result"Return=status

«Use Pattern»«Use Pattern»

Entry-Value="File Name: ", fileName, " Status: ", status}

«Use Pattern»«Use Pattern»

File-Name="exception.xml"Value=output

«Use Pattern»«Use Pattern»

File-Name="exception.xml"Application-Name="notepad"

«Use Pattern»«Use Pattern»

Message-Text="Test process successfully completed!"

[Each fileName in files]

[Each fileName in files]

[status = 'Exception']

«Action Module»Test-Case-One

User-Name

Directory

Library-Directory = S:\Test Automation Demo\Library\

«Action Module Constructor» Test-Case-One ()

Yeung Test Case One:Test-Case-One::Test-Case-One

User-Name = yeungDirectory = C:\TestData\YeungLibrary-Directory = S:\Test Automation Demo\Library\

«Action Module»

Test Script

Page 17: Automating Application Development for Legacy IT Systems with SOA & MDA

Benefits Best practices. Well documented system. Plug & play SOA. Simplify testing and integration. Maximize reuse. Increase business and IT agility. Leveraging what already exists and add

functionality as required. Scalable development. Resource sharing across organization

using repository based (ARTISAN) modelling tool.

Reduce development & maintenance cost.

Traceable from requirements to the code.

Page 18: Automating Application Development for Legacy IT Systems with SOA & MDA

Demo

Model Definition Code Generation