Recovery and Migration of Application Logic from Legacy ... · Recovery and Migration of...

26
Recovery and Migration of Application Logic from Legacy Systems Krajowa Konferencja Inżynierii Oprogramowania Kraków, Poland, September 10-13, 2012 Wiktor Nowakowski , Michał Śmiałek, Albert Ambroziewicz, Norbert Jarzębowski, Tomasz Straszak Warsaw University of Technology

Transcript of Recovery and Migration of Application Logic from Legacy ... · Recovery and Migration of...

Page 1: Recovery and Migration of Application Logic from Legacy ... · Recovery and Migration of Application Logic . from Legacy Systems . Krajowa Konferencja Inżynierii Oprogramowania.

Recovery and Migration of Application Logic from Legacy Systems

Krajowa Konferencja Inżynierii Oprogramowania

Kraków, Poland, September 10-13, 2012

Wiktor Nowakowski , Michał Śmiałek, Albert Ambroziewicz, Norbert Jarzębowski, Tomasz Straszak

Warsaw University of Technology

Page 2: Recovery and Migration of Application Logic from Legacy ... · Recovery and Migration of Application Logic . from Legacy Systems . Krajowa Konferencja Inżynierii Oprogramowania.

KKIO 2012 2

Overview

Idea & Solution overview

Essence

Recovery from legacy system

Migration to modern technology system

Summary

Page 3: Recovery and Migration of Application Logic from Legacy ... · Recovery and Migration of Application Logic . from Legacy Systems . Krajowa Konferencja Inżynierii Oprogramowania.

KKIO 2012 3

Idea

Software recycling

Developed within the REMICS project

Reuse & Migration of Legacy Software Systems

7th Framework Program, Information & Communication Technologies

Page 4: Recovery and Migration of Application Logic from Legacy ... · Recovery and Migration of Application Logic . from Legacy Systems . Krajowa Konferencja Inżynierii Oprogramowania.

KKIO 2012 4

Solution overview

public VCourseForm() { /* ... */ jbnClickHere = new JButton(„Click Here"); this.add(jbnClickHere); jbnOK.addActionListener( /* ... */ jbnClickHereActionPerformed(evt); /* ... */ ); }

private void jbnClickHereActionPerformed (java.awt.event.ActionEvent evt) { cAddNewCourse.clicksClickHereButton(); }

VSomeFormClass

GUI-ripping tool

TALE+ReDSeeDS Code

Courses Manager

Show course list

Add new course

Edit course«invoke»

«invoke»

Recovery

Migration

Page 5: Recovery and Migration of Application Logic from Legacy ... · Recovery and Migration of Application Logic . from Legacy Systems . Krajowa Konferencja Inżynierii Oprogramowania.

KKIO 2012 5

Recovery

Page 6: Recovery and Migration of Application Logic from Legacy ... · Recovery and Migration of Application Logic . from Legacy Systems . Krajowa Konferencja Inżynierii Oprogramowania.

KKIO 2012 6

Migration

Specification

Use Case

Use Case

Use Case

Use Case

Code

Transformation Use Case

Use Case Class Class

Class Class

Class

Class

Page 7: Recovery and Migration of Application Logic from Legacy ... · Recovery and Migration of Application Logic . from Legacy Systems . Krajowa Konferencja Inżynierii Oprogramowania.

KKIO 2012 7

Metodology: Process

GUI-ripping Tool

Initial RSL-AL model

Refined RSL-AL model

Target system structure models

MOLA Transformation

Engine

TALE Recovery Engine

ReDSeeDS RSL-AL Editor

Legacy system

Tooling framework

XML scripts

RSL-AL metamodel

UML/SoaML metamodel

Page 8: Recovery and Migration of Application Logic from Legacy ... · Recovery and Migration of Application Logic . from Legacy Systems . Krajowa Konferencja Inżynierii Oprogramowania.

Essence

Page 9: Recovery and Migration of Application Logic from Legacy ... · Recovery and Migration of Application Logic . from Legacy Systems . Krajowa Konferencja Inżynierii Oprogramowania.

KKIO 2012 9

Essential and accidental complexity

„The essence of a software entity is a construct of interlocking concepts: data sets, relationships among data items, algorithms, and invocations of functions. [..] such a conceptual construct is the same under many different representations.” *

„[..] accidental tasks arise in representing the construct in language.” *

* F.P. Brooks, ”No silver bullet: Essence and accidents of software engineering”

Page 10: Recovery and Migration of Application Logic from Legacy ... · Recovery and Migration of Application Logic . from Legacy Systems . Krajowa Konferencja Inżynierii Oprogramowania.

KKIO 2012 10

The „essence” in legacy systems

Some characteristics of legacy systems: poorly structured (eg. complex

monolithic structure) technology obsolescence (poor

interoperability) loss of knowledge (both technical

and business)

How to capture the essence of a legacy systems?

How to migrate it into a new technology?

How to cater this essence for new functionality?

Page 11: Recovery and Migration of Application Logic from Legacy ... · Recovery and Migration of Application Logic . from Legacy Systems . Krajowa Konferencja Inżynierii Oprogramowania.

Recovery from legacy system

Page 12: Recovery and Migration of Application Logic from Legacy ... · Recovery and Migration of Application Logic . from Legacy Systems . Krajowa Konferencja Inżynierii Oprogramowania.

KKIO 2012 12

Solution overview

public VCourseForm() { /* ... */ jbnClickHere = new JButton(„Click Here"); this.add(jbnClickHere); jbnOK.addActionListener( /* ... */ jbnClickHereActionPerformed(evt); /* ... */ ); }

private void jbnClickHereActionPerformed (java.awt.event.ActionEvent evt) { cAddNewCourse.clicksClickHereButton(); }

VSomeFormClass

GUI-ripping tool

TALE+ReDSeeDS Code

Courses Manager

Show course list

Add new course

Edit course«invoke»

«invoke»

Recovery

Migration

Page 13: Recovery and Migration of Application Logic from Legacy ... · Recovery and Migration of Application Logic . from Legacy Systems . Krajowa Konferencja Inżynierii Oprogramowania.

KKIO 2012 13

GUI-ripping tool

IBM Rational Functional Tester (RFT)

Tool for automated testing of software applications

Supports a broad range of applications such as Web-based, .Net, Java, terminal emulator based applications, Siebel, SAP, PowerBuilder, AJAX, Adobe Flex, Dojo Toolkit, GEF, Adobe PDF documents

Recording mechanism creates a test script from the actions

Object map containts information about GUI elements

Page 14: Recovery and Migration of Application Logic from Legacy ... · Recovery and Migration of Application Logic . from Legacy Systems . Krajowa Konferencja Inżynierii Oprogramowania.

KKIO 2012 14

From test scripts to requirements

Page 15: Recovery and Migration of Application Logic from Legacy ... · Recovery and Migration of Application Logic . from Legacy Systems . Krajowa Konferencja Inżynierii Oprogramowania.

KKIO 2012 15

TALE & ReDSeeDS

Eclipse based (perspectives)

Integrated use cases, notions and diagrams editors

Implements RSL metamodel

Notions with meanings connected to WordNet database

Enables requirements to code transformations

Enables model export to Enterprise Architect

Page 16: Recovery and Migration of Application Logic from Legacy ... · Recovery and Migration of Application Logic . from Legacy Systems . Krajowa Konferencja Inżynierii Oprogramowania.

KKIO 2012 16

Recovered Notions

Page 17: Recovery and Migration of Application Logic from Legacy ... · Recovery and Migration of Application Logic . from Legacy Systems . Krajowa Konferencja Inżynierii Oprogramowania.

KKIO 2012 17

Recovery

Automated recovery Manual recovery

Page 18: Recovery and Migration of Application Logic from Legacy ... · Recovery and Migration of Application Logic . from Legacy Systems . Krajowa Konferencja Inżynierii Oprogramowania.

KKIO 2012 18

TALE tool

Page 19: Recovery and Migration of Application Logic from Legacy ... · Recovery and Migration of Application Logic . from Legacy Systems . Krajowa Konferencja Inżynierii Oprogramowania.

Migration to modern technology system

Page 20: Recovery and Migration of Application Logic from Legacy ... · Recovery and Migration of Application Logic . from Legacy Systems . Krajowa Konferencja Inżynierii Oprogramowania.

KKIO 2012 20

Solution overview

public VCourseForm() { /* ... */ jbnClickHere = new JButton(„Click Here"); this.add(jbnClickHere); jbnOK.addActionListener( /* ... */ jbnClickHereActionPerformed(evt); /* ... */ ); }

private void jbnClickHereActionPerformed (java.awt.event.ActionEvent evt) { cAddNewCourse.clicksClickHereButton(); }

VSomeFormClass

GUI-ripping tool

TALE+ReDSeeDS Code

Courses Manager

Show course list

Add new course

Edit course«invoke»

«invoke»

Recovery

Migration

Page 21: Recovery and Migration of Application Logic from Legacy ... · Recovery and Migration of Application Logic . from Legacy Systems . Krajowa Konferencja Inżynierii Oprogramowania.

KKIO 2012 21

3-layer architecture

MCourse

fetches(aCourse :XCourse) : voidgetResult() : intsaves(aCourse :XCourse) : voidvalidates(aCourse :XCourse) : void

MCourseList

builds(aCourseList :XCourseList, aTeacher :XTeacher) : voidgetResult() : int

CAddNewCourse

_SelectsAddNewCourseOption() : void_SelectsAddNewCourseOption(invokingUC :IInvoke) : voidSelectsOK(pCourse :XCourse) : voidSelectsOK_2() : void

CShowOwnedCourseList

_SelectsShowCourseListOption() : voidSelectsOK() : voidinvokeAddCourse() : voidinvokeEditCourse() : voidreturnInvokeResult(res :int) : void

JFrameVCourseForm

displays(aCourse :XCourse) : void

JFrameVCourseListForm

shows(aCourseList :XCourseList) : void

JFrameVErrorMessage

shows() : void

cAddNewCourse

mCourse

vCourseForm

cAddNewCourse

cAddNewCoursecShowOwnedCourseList

cAddNewCourse

vErrorMessage

cShowOwnedCourseList

vCourseListForm

cShowOwnedCourseList

mCourseList

Presentation

Controller

Model

Page 22: Recovery and Migration of Application Logic from Legacy ... · Recovery and Migration of Application Logic . from Legacy Systems . Krajowa Konferencja Inżynierii Oprogramowania.

KKIO 2012 22

How it works?

v o : SVOSentenceSVOSentences}

ed : PredicateVOSentences}

v ph : SimpleVerbPhrase{Phrases}

h : NounPhrase{Phrases}

ject : NounLink

v erb : PhraseVerbLink{Phrases}

SVOSentences}

VOSentences}

sv ph : SimpleVerbPhrase{ }

cnph2 : NounPhras

ject : NounLink{Phrases}

1

ddP d C ll(@ b l @ bj t l "" @ @ l @ i )

utl_addProcedureCall(@cv erb.v alue, @dobject.v alue, @iobject.v alue, @genop, @cl, @ui_op)

{K l}

ource predicate

bject

ource

L S E }

p ed capredicate

target

complexVerbPhrass p e e b ase

verbPhrase

objec

verbPhrasej

ource

sourcenoun

Use Case model

RSL scenario model UML design model

+ Java method bodies

Java code

Transformation rules

MOLA program

Page 23: Recovery and Migration of Application Logic from Legacy ... · Recovery and Migration of Application Logic . from Legacy Systems . Krajowa Konferencja Inżynierii Oprogramowania.

KKIO 2012 23

MOLA

MOdel transformation Language

Graphical language

Based on metamodel-level pattern matching

Transformation (program) describes how to transform one model into antoher

Page 24: Recovery and Migration of Application Logic from Legacy ... · Recovery and Migration of Application Logic . from Legacy Systems . Krajowa Konferencja Inżynierii Oprogramowania.

KKIO 2012 24

MOLA - example

Page 25: Recovery and Migration of Application Logic from Legacy ... · Recovery and Migration of Application Logic . from Legacy Systems . Krajowa Konferencja Inżynierii Oprogramowania.

KKIO 2012 25

Summary

Combination of existing approaches:

• Software Reverse Engineering

• Requirements Engineering

• Model Driven Development

Shortens time needed for transition from legacy to modern technology system

Validated using a real-life system

Page 26: Recovery and Migration of Application Logic from Legacy ... · Recovery and Migration of Application Logic . from Legacy Systems . Krajowa Konferencja Inżynierii Oprogramowania.

Thank You!