This document discusses approaches for modernizing legacy code. It introduces model-based software modernization using Eclipse-based tooling. The MoDisco framework allows discovering models from legacy code and transforming them. MoDisco supports understanding legacy systems through reverse engineering, documentation, refactoring, and migrating systems to new frameworks or architectures. The document demonstrates migrating a legacy testing framework from JUnit3 to JUnit4 as a practical example. Overall, MoDisco provides customizable modeling and transformation capabilities to help modernize legacy Java code.
2. Towards Clean Legacy Code
則р Developer, Architect,
Consultant
則р Java Enterprise, Eclipse,
Continuous
Who am I?
3. Agenda
+introduction into model based
software modernization
approaches (software evolution)
+introduction of Eclipse based
tooling
full migration of legacy systems
Make sure you know what the code does
before you attempt any modifications, don't just
jump in.
Towards Clean Legacy Code
4. Towards Clean Legacy Code
Motivation
則р legacy system
則р heavy database access
則р ORM 竪 java.sql.*
則р new team
息
Katharina
Bregulla
/
pixelio.de
5. Towards Clean Legacy Code
Motivation
則р Raising Questions
which tables will be accessed?
will other tables (modules) be
accessed?
if yes, migrated already?
automation possible?
息
Katharina
Bregulla
/
pixelio.de
6. Towards Clean Legacy Code
Horseshoe-Model
PIM
PSMPSM
PIM
Code Code
ForewardEngineering(MDA)
ReverseEngineering(ADM)
Re-Engineering
Architecture
Transformation
Reverse engineering: is the process
of analyzing a software system to
create representations of the system
at a higher level of abstraction.
Re-Engineering: ... is the analysis and
modification of a software system to
change its form and implement it in its
new form.
(Forward) Engineering: is the way
of designing systems, starting from
abstract logical and implementation
independent specification to gradually
lead to the implementation of a
physical system. 息
unknown
16. Towards Clean Legacy Code
Conclusion
端錫 Customizability
o Metamodels
o M2M, M2T
端錫 Extensive
o Discoverer
o Queries
端錫 Workflow
端錫 DSL (Xtext, )
端錫 (Focus on Java)
端錫 Entry barriers
端錫 Toolset
息
Gerd
Altmann
/
pixelio.de
17. 息
Mario
De
Ma?a
/
pixelio.de
端錫 Metrics on software maintainability
o bugs / commits per time unit
o committer per time unit
o
端錫 Identification of variants within branches
o modularization
o
端錫 Sync domain model <> DB
Towards Clean Legacy Code
Outlook