RECLAIM YOUR
ARCHITECTURE!
Tools und Techniken um deine Software Architektur zurück
zu erobern!
Begriffsde nition
Die Feinde der Architektur
Unsere Waffen (aka Tools und Techniken)
Beispiele und Code
Rational Uni ed Process, 1999
“the highest level concept of a system in its
environment. The architecture of a software
system (at a given point in time) is its
organization or structure of signi cant
components interacting through interfaces,
those components being composed of
successively smaller components and
interfaces“
Martin Fowler, 2003
“Stuff that's hard to change later“
KNOW YOUR ENEMY!
Technische Schuld
“doing things the quick and dirty way sets us
up with a technical debt, which is similar to a
nancial debt. Like a nancial debt, the
technical debt incurs interest payments,
which come in the form of the extra effort that
we have to do in future development because
of the quick and dirty design choice.“
Bewußte Entscheidung!
Entropie (phys.)
“Tendenz in der unbelebten Welt zu immer
größerer Unordnung.“
Unbewußte Entwicklung!
SYMPTOME DER ENTROPIE
SCHLECHT ZU WARTEN
SCHWER ZU ERWEITERN
MANGELNDE WIEDERVERWENDBARKEIT
SCHWER ZU TESTEN
ZUNEHMENDE UNVERSTÄNDLICHKEIT
URSACHEN
ZIRKULÄRE ABHÄNGIGKEITEN
Zwischen Klasse, Packages, Modulen etc.
FEHLENDE ABSTRAKTION
Klassen, Packages, Module haben sehr viele Abhängigkeiten
KEINE ODER MANGELHAFTE UMSETZUNG VON
ARCHITEKTURREGELN
Unerlaubte Abhängigkeiten
NIEDRIGE KOHÄSION, HOHE KOPPLUNG
Kohäsion bezeichnet den Zusammenhalt innerhalb einer
Komponente, Kopplung die äußere Bindung
CODE SMELLS
Zyklomatische Komplexität, Duplizierter Code, Große
Klassen / Methoden, ...
FIGHT BACK!
SCHRITT 1: BESTANDSAUFNAHME
“If you can't measure it, you can't manage it.“
Bestehende Architektur ermitteln
Dependency Structure Matrix (DSM) Analyse
Zirkuläre Abhängigkeiten aufdecken
Metriken sammeln
SCHRITT 2: DEFINITION DER ZIELPARAMETER
Zielarchitektur bestimmen
Ziel-Code-Coverage de nieren
Realistische Boundaries für Metriken de nieren
SCHRITT 3: ZIELPARAMETER KONTINUIERLICH
ÜBERPRÜFEN
Degraph (oder JDepend)
Jenkins + SonarQube
Structure101
LINKS UND WEITERFÜHRENDE INFORMATIONEN
http://schauder.github.io/degraph/
http://docs.sonarqube.org/display/HOME/Spaghetti+Design
http://erik.doernenburg.com/2010/04/dependency-
structure-matrix/
http://www.ndepend.com/docs/dependency-structure-
matrix-dsm
http://structure101.com/resources/
http://www.martinfowler.com/ieeeSoftware/coupling.pdf
Java Application Architecture, Kirk Knoernschild

Reclaim Your Architecture