際際滷

際際滷Share a Scribd company logo
Towards Clean Legacy Code
Lars Martin, Clean Code Days 2013, 11.09.2013
Towards Clean Legacy Code
則р Developer, Architect,
Consultant
則р Java Enterprise, Eclipse,
Continuous 
Who am I?
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
Towards Clean Legacy Code
Motivation
則р legacy system
則р heavy database access
則р ORM 竪 java.sql.*
則р new team
息	
 Katharina	
 Bregulla	
 /	
 pixelio.de
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
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
Towards Clean Legacy Code
MoDisco - Concepts
MoDisco
Eclipse Modeling
Source Code
Databases
Metrics
Norm checking
Configuration
Files
Restruct. Code
Migrated Code
Documentation
Impact Analysis
Models
Viewpoints
..other
Towards Clean Legacy Code
MoDisco - Modernization Phases
Models
Discover
Viewpoints
UnderstandExisting Artifacts
Software Artifacts
≒ Source Code
≒ Configuration
≒ Tests
≒ Database
≒ 
New
Artifacts
Transform
Towards Clean Legacy Code
MoDisco  Use Cases
息	
 Michael	
 B端hrke	
 	
 /	
 pixelio.de
則р Quality Assurance (Metrics, ...)
則р Documentation (Structure, Dataflow, )
則р Refactorierung (Design Pattern, Standards, )
則р Migration (Framework, Architecture, )
Towards Clean Legacy Code
MoDisco  Use Cases
息	
 Michael	
 B端hrke	
 	
 /	
 pixelio.de
Practical
Session (1/2)
Towards Clean Legacy Code
JUnit4
辿
JUnit3
息	
 Katharina	
 Wieland	
 M端lle	
 /	
 pixelio.de	
 
Towards Clean Legacy Code
Practical Session
JUnit3
Queries
JUnit3
Facet
JUnit3
Customization
java.ecore
uses uses
customizes extends
conforms to
Java EMF Model
Towards Clean Legacy Code
Practical
Session (2/2)
Towards Clean Legacy Code
Abstract Factory,
Adapter, Bridge,
Builder, , Singleton,
, Visitor
息	
 kiramain	
 /	
 pixelio.de	
 
Towards Clean Legacy Code
Practical Session
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
息	
 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
息	
 Gerd	
 Altmann	
 /	
 pixelio.de
Master Thesis / Abschlussarbeit 
Software Engineering
Aufgabengebiet:
≒ Entwicklung von Methoden zur
Informationsgewinnung
≒ Implementierung der Methoden mittels Eclipse
basierter Technologien
Studienbereiche:
≒ Informatik und -Informatik
息	
 Willi	
 Heidelbach	
 /	
 pixelio.de
SMB GmbH  Plauenscher Ring 21  D-01187 Dresden
Dipl.-Inf. Lars Martin
+49-(0)173-64 24 461
lars.martin@smb-tec.com

More Related Content

Towards Clean Legacy Code

  • 1. Towards Clean Legacy Code Lars Martin, Clean Code Days 2013, 11.09.2013
  • 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
  • 7. Towards Clean Legacy Code MoDisco - Concepts MoDisco Eclipse Modeling Source Code Databases Metrics Norm checking Configuration Files Restruct. Code Migrated Code Documentation Impact Analysis Models Viewpoints ..other
  • 8. Towards Clean Legacy Code MoDisco - Modernization Phases Models Discover Viewpoints UnderstandExisting Artifacts Software Artifacts ≒ Source Code ≒ Configuration ≒ Tests ≒ Database ≒ New Artifacts Transform
  • 9. Towards Clean Legacy Code MoDisco Use Cases 息 Michael B端hrke / pixelio.de
  • 10. 則р Quality Assurance (Metrics, ...) 則р Documentation (Structure, Dataflow, ) 則р Refactorierung (Design Pattern, Standards, ) 則р Migration (Framework, Architecture, ) Towards Clean Legacy Code MoDisco Use Cases 息 Michael B端hrke / pixelio.de
  • 12. JUnit4 辿 JUnit3 息 Katharina Wieland M端lle / pixelio.de Towards Clean Legacy Code Practical Session
  • 15. Abstract Factory, Adapter, Bridge, Builder, , Singleton, , Visitor 息 kiramain / pixelio.de Towards Clean Legacy Code Practical Session
  • 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
  • 18. 息 Gerd Altmann / pixelio.de
  • 19. Master Thesis / Abschlussarbeit Software Engineering Aufgabengebiet: ≒ Entwicklung von Methoden zur Informationsgewinnung ≒ Implementierung der Methoden mittels Eclipse basierter Technologien Studienbereiche: ≒ Informatik und -Informatik 息 Willi Heidelbach / pixelio.de
  • 20. SMB GmbH Plauenscher Ring 21 D-01187 Dresden Dipl.-Inf. Lars Martin +49-(0)173-64 24 461 lars.martin@smb-tec.com