Visualize your architecture ITARC2013 Peter Norrhall, Chief Architect [email protected]
Customers using Extenda POS
Thermometer
3
Microstates
Macrostate (Abstrac<on)
Code
Xunit
Architect/Design Document SoAware Guidebook
Why Images?
”A picture says more than 1000 words”
4
Unconscious Communica<on
5
Eyesight 10.000.000 bit/s
Touch 1.000.000 bit/s
Hearing 100.000 bit/s
Smell 100.000 bit/s
Taste 1.000 bit/s
M Zimmerman, Physiologie des Menchen
Percep<on model
Stage 1 Features
Stage 2 PaVerns
PaVerns and contours
7
A B
C D
A B
C D
B has a rela<on to A, C and D
Coulors
Coulors
Coulors
Opponent Colours
RISK
RDS Relevance Data
Admin
-‐ Trigger Report
Interac<on
Data Flow
Legend
Percep<on model
Stage 1 Features
Stage 2 PaVerns
Stage 3 Visual working memory
Verbal working memory
Bla bla bla
14
GUL!GUL! GUL!
GUL!SVART!
SVART!
SVART!
BLÅ!BLÅ!
BLÅ!RÖD!
RÖD!
RÖD!GRÖN!
GRÖN!
Stroop Effect
15
GUL!GUL! GUL!
GUL!SVART!
SVART!
SVART!
BLÅ!BLÅ!
BLÅ!RÖD!
RÖD!
RÖD!GRÖN!
GRÖN!
Percep<on model
Stage 1 Features
Stage 2 PaVerns
Stage 3 Verbal working memory
Bla bla bla
Visual working memory
Visual Query
Long-‐term memory
Effec<ve Sketches
17
Icons & Symbols
hVp://commons.wikimedia.org/wiki/File:Icon_03017_Bogorodica_Umilenie.jpg
Semio<cs of Graphics
Sensory Symbols
«device,smartphone»
«database»
Arbitrary Symbols
Different Associa<on
Actor
Developer Account Manager
Les Misérables – Communica<on tree
21
Exforma<on -‐ removed important informa<on Associa<on
Victor Hugo Publisher Tor Nörretranders, ”Märk Världen”
Agile Development Documenta<on
22
Stakeholders
Developers
Architect/ Developer
Code & Refactor
Refactor
Effec<ve Sketches
23
RISK
RDS
TDS
AD
Mail System
Relevance Data
Trade Data No<fica<on
Creden<als
Risk System Context User Admin
-‐ Trigger Report -‐ User Report -‐ Configure Params
Interac<on
Data Flow
Legend
• Maven Site • Maven APT format • PowerPoint/Visio/ PlantUML
Select and Learn your tools
27
Powerpoint/Keynote
Enterprise Architect
Visio
Erwin
Create an Icon and nota<on Repository
Interac<on
Data Flow
Legend
Documenta<on – The Problem • Systems and soAware are evolving –> ”Document Dept”
• What is important and to whom? The sender or the receiver?
• hVp://mar<nfowler.com/ieeeSoAware/whoNeedsArchitect.pdf
• Perhaps the most important is to write/visualize • Andy Hunt, Pragma<c Thinking
29
Explora<on SoAware Visualiza<on
• GeneraDng images instead of doing it by hand when we want to explore the informa<on (microstates).
• Informa<on visualiza<on is essen<al in making sense out of large data sets (microstates) by finding paVerns.
• Generate and Display for a specific purpose – Rela<onships between modules/components/classes/en<<es/…
– Code or Informa<on dept
30
Visualize SoAware
31
Scanner/Parser
Data Source Code
Instrumenta<on
Running Systems
Mapper
Nodes: A, B Edges: A-‐>B Renderer Model
Diagram
Code Quality
Code Quality
Code Metrics
Rela<onships
Lines of Code Average Number of Methods (NOM) per Class Average Lines of Code (LOC) per method Average Cycloma<c Number (CYCLO) per line of code Duplica<on Check-‐in counts / churn Test Coverage Coupling …
Code Metrics
• SonarSource
34
Code Metrics – Industry Standard
35
Find the truth
36
CodeCity
37
Dependencies
38
Dependencies
• ”Design is beneficially related elements”, K Beck – hVp://www.threeriversins<tute.org/blog/?p=111
• Predic<ng Subsystem Failures using Dependency Graph Complexi<es – hVp://research.microsoA.com/pubs/70340/tr-‐2006-‐126.pdf
39
Structure 101
• Code Parser and Analyzer for Java, .Net and C/C++
• Interac<ve explorer of rela<onships and quality of code finding and displaying technical dept
• CI ”integra<on”
40
Demo : Spring
41
Commercial Alterna<ves
• Sotoarc/Sonargraph/… -‐ hVp://www.hello2morrow.com/
• Laxx hVp://www.laxx.com/
42
Graphviz -‐ Model & Diagram
digraph G { a-‐>b; }
43
$ dot -‐Tpng simple.dot –o simple.png
Graphs • Directed Graph !digraph G {! a -> b;! b -> c;! a -> c;!}!
• Undirected Graph graph G {! a -- b;! b -- c;! a -- c;!}!
44
Informa<on Dept : E-‐Commerce Catalog
45
Books
SoAware Engineering
Agile
Agile Development
Management 3.0
Programming
Novels
18th Century
Country #1
46
Category
Product
$ neato -‐Tpng catalog.dot –o catalog.png
Country #2
47
Country #3
48
Other
• Component Dependencies (Spring XML Bean Config)
• Ant Target Dependencies • System Dependencies
49 hVp://blogs.informa<ca.com/perspec<ves/2011/10/25/whose-‐fault-‐is-‐the-‐integra<on-‐hairball
Summary
50
Know your brain
Use VisualizaDon
PracDce ExformaDon
Ques<ons?
51
Referenser • ”Märk Världen”, Tor Nörretranders, ISBN 9100570702 • ”Informa<on Visualiza<on, 3rd Edi<on”, Colin Ware • ”Designing Data Visualiza<on”, Illinsky & Steele • ”Making soAware, …”, Oram & Wilson • hVp://www.codingthearchitecture.com • hVp://mar<nfowler.com/ieeeSoAware/whoNeedsArchitect.pdf • hVp://www.headwaysoAware.com/ -‐ Structure 101 • hVp://www.hello2morrow.com/ -‐ Sonargraph • hVp://www.sonarsource.org/ -‐ SonarSource • hVp://www.graphviz.org/ -‐ Graphviz • Similar presenta<ons • hVp://www.jfokus.se/jfokus11/preso/jf11_Vizualiza<onsForCodeMetrics.pdf • hVp://erik.doernenburg.com/wp-‐content/archive/Doernenburg_SoAwareQuality_ver2a.pdf • hVp://www.slideshare.net/girba/pragma<c-‐quality-‐assessment-‐tutorial-‐icse-‐2008 • hVp://www.infoq.com/presenta<ons/Where-‐Did-‐My-‐Architecture-‐Go
[email protected] @peternorrhall LinkedIn
53
Top Related