TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
Eclipse Summit 2009 Bernhard Merkle Stop The Software Architecture Erosion
1. Stop the Software
Architecture Erosion
Bernhard Merkle
Central Research & Development
Software-Engineering
SICK-AG Waldkirch
mailto: Bernhard.Merkle@gmail.com
Contact on linkedin.com or xing.com Erosion“
Bernhard Merkle „Stop the Software Architecture
Page: 1
2. Note:
this is only a subset of
the presentation slides !
Bernhard Merkle
Central Research & Development
Software-Engineering
SICK-AG Waldkirch
mailto: Bernhard.Merkle@gmail.com
Contact on linkedin.com or xing.com Erosion“
Bernhard Merkle „Stop the Software Architecture
Page: 2
3. Traffic and Luggage Control
Bernhard Merkle „Stop the Software Architecture Erosion“
Page: 7
4. Introduction / Overview
Levels of Static Analysis
– Code, Design, Architectural
– Examples
Architectural Analysis
– Use Cases
– Tool Support,
– Examples
– Pros/Cons
Summary
Bernhard Merkle „Stop the Software Architecture Erosion“
Page: 8
5. Possible levels of Static Analysis:
Micro-Level
– Code
– =, ==, { },
Macro-Level
– Class-Design
– by reference, String concat, Exception-Handling
Architecture-Level:
– Layers, Graphs, Subsystems, Compoments, Interfaces
– Coupling, Dependency, etc…
Bernhard Merkle „Stop the Software Architecture Erosion“
Page: 9
6. Tool Example Java: findbugs
Bernhard Merkle „Stop the Software Architecture Erosion“
Page: 13
7. Software-Architecture: Definitions
IEEE 1471-2000:
– The fundamental organization of a system,
– embodied in its components,
– their relationship to each other and the environment,
– and the principles governing its design and evolution.
Kruchten: captured in two documents:
– Software Architecture Document
– Software Design Guidelines
Bernhard Merkle „Stop the Software Architecture Erosion“
Page: 15
8. Erosion ALWAYS
happens
– Prototypes become products
– Hacks. Architectural restrictions ignored
– Lack of understanding the “should
architecture” (e.g. outsourcing)
– Time pressure leads to abbreviations
– impossible to detect manually only
Bernhard Merkle „Stop the Software Architecture Erosion“
Page: 16
9. Architectural Erosion
“Sometimes the developers manage to
maintain this purity of design through the
initial development and into the first release.
More often something goes wrong.The
software starts to rot like a piece of bad
meat”.
Uncle Bob: “Agile Software Development”
Bernhard Merkle „Stop the Software Architecture Erosion“
Page: 17
10. Architectural Erosion
Why should we care ?
– In (lots of) Projects, Architecture decay happens
– We are not alone, as we‘ve some good representatives… ;-)
Bernhard Merkle „Stop the Software Architecture Erosion“
Page: 18
11. Findbugs
Is there a architecture ?
Is there a erosion ?
Do AA-Tool work well ?
do codelevel lints care about architecture ?
Bernhard Merkle „Stop the Software Architecture Erosion“
Page: 19
12. ONE BIG Tangle…
1.3.8
Bernhard Merkle „Stop the Software Architecture Erosion“
(03/2009)
Page: 25
21. Basic Approaches
– Your makesystem…
– makedepend, jdepend
– RE code into UML model
– Eclipse (Java Build Path)
Bernhard Merkle „Stop the Software Architecture Erosion“
Page: 36
30. Eclipse Architecture
Bernhard Merkle „Stop the Software Architecture Erosion“
Page: 50
31. Eclipse Architecture
Bernhard Merkle „Stop the Software Architecture Erosion“
Page: 51
32. E3.4: Runtime Update
Bernhard Merkle „Stop the Software Architecture Erosion“
Page: 53
33. E3.4: Workbench Text, Update, Help
Bernhard Merkle „Stop the Software Architecture Erosion“
Page: 54
34. CDT:
Bernhard Merkle „Stop the Software Architecture Erosion“
Page: 72
35. Interface Design
more than OSGI
Well balanced arragement of…
Layout/Visualize the
calling graph key communication
inheritance key abstractions
Bernhard Merkle „Stop the Software Architecture Erosion“
Page: 75
37. Dependent BaseClass
– Type:
• Design Problem
– Problem:
• one of more Methods shall implement different
• behavior, depending on the type, passed in
– Context:
• make “extensible” systems, frameworks
– Forces:
• Programming languages offer, instanceof/typeid funcs.
– Antipattern:
• Methods of the baseclass, depend on derived classes, e.g. accessing their
members, doing switch/case depending on type information
Bernhard Merkle „Stop the Software Architecture Erosion“
Page: 78
39. Code Clones
Bernhard Merkle „Stop the Software Architecture Erosion“
Page: 81
40. Code Clones
– identical Files
• E2.0 JDT,CDT
– jdtdebuginternaluidialogfieldsListDialogField.java
– cdtdebuginternaluidialogfieldsListDialogField.java
• E3.4 CDT: identical packages
– cdtdebuginternaluidialogfields, cdtdebugmiinternaluidialogfields
– variation of former identical Files
• E34 JDT,CDT
– jdtdebuginternaluidialogfieldsListDialogField.java
– cdtdebuginternaluidialogfieldsListDialogField.java
– identical behaviour in different Classes
• e.g. Codegeneration ;-)
– Identical behaviour in same Class
• swt.graphics.ImageData.java
– static void blit(…) // four variations
Bernhard Merkle „Stop the Software Architecture Erosion“
Page: 82
41. Rating Eclipse Architecture
– VERY clean
– OSGI helps a lot
– API Police
– Technology and People
Bernhard Merkle „Stop the Software Architecture Erosion“
Page: 88
42. Rating Eclipse Architecture:
Process and Tools !
– Violations
• Upper layers
• Internal access
– OSGI is not enough
– Small amount of
• AntiPatterns
• CodeCones
Bernhard Merkle „Stop the Software Architecture Erosion“
Page: 89
43. Pictures under CC license from flickr:
1191285966_d701fcb1c3_b_flickr_bluemeat.jpg
3425532267_bd74526b23_b_flickr_tiwo.jpg
1813471845_5a4be999dc_o_flickr_thatcanadiangrrl.jpg
2401122677_c25dea1233_b_flickr_EnglishGirlAbroad.jpg
501709581_f3729ceaeb_b_flickr.jpg
Bernhard Merkle „Stop the Software Architecture Erosion“
Page: 91