Towards Clean Legacy Code

533 views

Published on

My slides from the Clean Code Days 2013 presentation.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
533
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Towards Clean Legacy Code

  1. 1. Towards Clean Legacy Code Lars Martin, Clean Code Days 2013, 11.09.2013
  2. 2. Towards Clean Legacy Code §  Developer, Architect, Consultant §  Java Enterprise, Eclipse, Continuous … Who am I?
  3. 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. 4. Towards Clean Legacy Code Motivation §  legacy system §  heavy database access §  ORM è java.sql.* §  new team ©  Katharina  Bregulla  /  pixelio.de  
  5. 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. 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. 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. 8. Towards Clean Legacy Code MoDisco - Modernization Phases Models Discover Viewpoints UnderstandExisting Artifacts Software Artifacts •  Source Code •  Configuration •  Tests •  Database •  … New Artifacts Transform
  9. 9. Towards Clean Legacy Code MoDisco – Use Cases ©  Michael  Bührke    /  pixelio.de  
  10. 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  
  11. 11. Practical Session (1/2) Towards Clean Legacy Code
  12. 12. JUnit4 é JUnit3 ©  Katharina  Wieland  Mülle  /  pixelio.de   Towards Clean Legacy Code Practical Session
  13. 13. JUnit3 Queries JUnit3 Facet JUnit3 Customization java.ecore uses uses customizes extends conforms to Java EMF Model Towards Clean Legacy Code
  14. 14. Practical Session (2/2) Towards Clean Legacy Code
  15. 15. Abstract Factory, Adapter, Bridge, Builder, …, Singleton, …, Visitor ©  kiramain  /  pixelio.de   Towards Clean Legacy Code Practical Session
  16. 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. 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. 18. ©  Gerd  Altmann  /  pixelio.de  
  19. 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. 20. SMB GmbH – Plauenscher Ring 21 – D-01187 Dresden Dipl.-Inf. Lars Martin +49-(0)173-64 24 461 lars.martin@smb-tec.com

×