visualize your architecture and information
DESCRIPTION
Visualization is an effective method of communication and there is more than UML. Peter will in this presentation show a few of the most common methods and tools to visualize your system's design (or lack of it) and the theories used. You will also be able to visualize how the information in the system looks like from different perspectives in order to detect any "information dept" or how the system behaves in operation. The purpose of the presentation is to inspire you to use visualization as a technique to improve the quality of your software.TRANSCRIPT
![Page 2: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/2.jpg)
Visualize your architecture© Extenda
Why Images?• ”A picture says more than 1000 words”
2
![Page 3: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/3.jpg)
Visualize your architecture© Extenda
Thermometer
3
Microstates
Macrostate (Abstraction)
![Page 4: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/4.jpg)
Visualize your architecture© Extenda
The holy number 7
4
7
1
13
2
21
95
Peter
Maria
Phrida
Linnea
Jakob
Moa
Alfons
1956 George Miller
![Page 5: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/5.jpg)
Visualize your architecture© Extenda
Conscious Communication
5
7 = 2-3 bit / s
![Page 6: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/6.jpg)
Visualize your architecture© Extenda
Unconscious Communication
6
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
![Page 7: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/7.jpg)
Visualize your architecture© Extenda
Les Misérables – Communication tree
7
Exformation -removed important information Association
Victor Hugo Publisher
?
!Tor Nörretranders, ”Märk Världen”
![Page 8: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/8.jpg)
Visualize your architecture© Extenda
Pictures vs Text
8
Bla, bla, bla L-Mode
R-Mode + L-Mode
![Page 9: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/9.jpg)
Visualize your architecture© Extenda
Why do we need Architect Documents?
9
Code
Xunit/BDD
Architect/Design Document
![Page 10: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/10.jpg)
Visualize your architecture© Extenda
ISO 42010• Recommended practice for architectural description of software-
intensive systems
10
![Page 11: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/11.jpg)
Visualize your architecture© Extenda
Architectural Views
11
Deployment
Functional
Process Non-Functional
Logical
Interface
Design
Intrastructure
Operational
Security
Data
http://www.codingthearchitecture.com/
![Page 12: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/12.jpg)
Visualize your architecture© Extenda
Agile Development Documentation
12
Stakeholders
Developers
Architect/Developer
Code & Refactor
Refactor
![Page 13: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/13.jpg)
Visualize your architecture© Extenda
Methods & Tools
13
Meta-model – UML/DDD/… – Association
Design Tools – White Board/Enterprise Architect/Visio/PPT/…
Exformation
![Page 14: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/14.jpg)
Visualize your architecture© Extenda
The problem• Systems and software are evolving –> ”Document Dept” using
notioned based architecture or design• What is important and to whom? The sender or the receiver?
• http://martinfowler.com/ieeeSoftware/whoNeedsArchitect.pdf
• Perhaps the most important is to write/visualize• Andy Hunt, Pragmatic Thinking
14
![Page 15: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/15.jpg)
Visualize your architecture© Extenda
Software Visualization• Generating images instead of doing it by hand when we want to
explore the information (microstates).
• Information visualization is essential in making sense out of large
data sets (microstates) by finding patterns.
• Generate and Display for a specific purpose
• Relationships between modules/components/classes/entities/…
• Code or Information dept
15
![Page 16: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/16.jpg)
Visualize your architecture© Extenda
Visualize Software
16
Scanner/Parser
Data Source Code
Instrumentation
Running Systems
Mapper
Nodes: A, BEdges: A->B RendererModel
Diagram
![Page 17: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/17.jpg)
Visualize your architecture© Extenda
Code Quality• The Code (source and test) is the actual system• Find Relations and dependencies
• Beneficial Relationships
• Finding unwanted relationships
• Code metrics
• Average Number of Methods (NOM) per Class
• Average Lines of Code (LOC) per method
• Average Cyclomatic Number (CYCLO) per line of code
• …
17
![Page 18: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/18.jpg)
Visualize your architecture© Extenda
Code Metrics• Lines of Code• Average Number of Methods (NOM) per Class• Average Lines of Code (LOC) per method• Average Cyclomatic Number (CYCLO) per line of code • Duplication• Check-in counts / churn• Test Coverage• Coupling • …
18
![Page 19: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/19.jpg)
Visualize your architecture© Extenda
Cyclomatic Complexity
19
if( c1() ) f1();else f2(); if( c2() ) f3();else f4();
http://en.wikipedia.org/wiki/Cyclomatic_complexity
![Page 20: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/20.jpg)
Visualize your architecture© Extenda
Code Metrics• SonarSource
20
![Page 21: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/21.jpg)
Visualize your architecture© Extenda
Code Metrics
21
![Page 22: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/22.jpg)
Visualize your architecture© Extenda
Code Metrics – Industry Standard
22
![Page 23: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/23.jpg)
Visualize your architecture© Extenda
Rules Compliance
23
![Page 24: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/24.jpg)
Visualize your architecture© Extenda
Code Violations
24
![Page 25: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/25.jpg)
Visualize your architecture© Extenda
Measure over time
25
![Page 26: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/26.jpg)
Visualize your architecture© Extenda
Complexity Distribution
26
![Page 27: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/27.jpg)
Visualize your architecture© Extenda 27
![Page 28: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/28.jpg)
Visualize your architecture© Extenda
Find the truth
28
![Page 29: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/29.jpg)
Visualize your architecture© Extenda
CodeCity
29
![Page 30: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/30.jpg)
Visualize your architecture© Extenda
Dependencies
30
![Page 31: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/31.jpg)
Visualize your architecture© Extenda
Dependencies• ”Design is beneficially related elements”, K Beck
• http://www.threeriversinstitute.org/blog/?p=111
• Predicting Subsystem Failures using Dependency Graph
Complexities
• http://research.microsoft.com/pubs/70340/tr-2006-126.pdf
31
![Page 32: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/32.jpg)
Visualize your architecture© Extenda
Structure 101• Code Parser and Analyzer for Java, .Net and C/C++• Interactive explorer of relationships and quality of code finding and
displaying technical dept• CI ”integration”
32
![Page 33: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/33.jpg)
Visualize your architecture© Extenda
Demo : Spring
33
![Page 34: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/34.jpg)
Visualize your architecture© Extenda
Commercial Alternatives• Sotoarc/Sonargraph - http://www.hello2morrow.com/
34
![Page 35: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/35.jpg)
Visualize your architecture© Extenda
Drawbacks• Package Dependencies• CC metrics = # faults?
35
![Page 36: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/36.jpg)
Visualize your architecture© Extenda
Graphviz• You are in charge• Simple textual input -> different graphical output• Automated graph layout tool based on graph theory
• Developed by A&T, Common Public Licence
36
![Page 37: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/37.jpg)
Visualize your architecture© Extenda
Model & Diagram
digraph G {
a->b;
}
37
$ dot -Tpng simple.dot –o simple.png
![Page 38: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/38.jpg)
Visualize your architecture© Extenda
Graphs• Directed Graph
digraph G {
a -> b;
b -> c;
a -> c;
}
• Undirected Graph
graph G {
a -- b;
b -- c;
a -- c;
}
38
![Page 39: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/39.jpg)
Visualize your architecture© Extenda
Layout• Dot – Hierarchy graph• Neato – Undirected graph using spring model• Twopi – Radial Layout• Circo – Circular Layout• Fdp – Undirected graphs using force-directed spring model• Sfdp – Similar to Fdp
39
![Page 40: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/40.jpg)
Visualize your architecture© Extenda
Output Formats• PostScript (ps)• Structured Vector Graphics (svg)• Images (png, gif)• Imagemap (imap)• …
40
![Page 41: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/41.jpg)
Visualize your architecture© Extenda
Graph Attributes• Size = ”x, y”• Rankdir = LR | RL | BT• Rotate=90• Stylesheet=”.css”• …
41
![Page 42: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/42.jpg)
Visualize your architecture© Extenda
Information Dept : E-Commerce Catalog
42
Books
Software Engineering
Agile
Agile Development
Management 3.0
Programming
Novels
18th Century
![Page 43: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/43.jpg)
Visualize your architecture© Extenda
Country #1 – Dot layout
43
![Page 44: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/44.jpg)
Visualize your architecture© Extenda
Graph Attribute• Rotate=90
44
![Page 45: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/45.jpg)
Visualize your architecture© Extenda
neato
45
Category
Product
$ neato -Tpng catalog.dot –o catalog.png
![Page 46: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/46.jpg)
Visualize your architecture© Extenda
Node Attributes• Blue Box• node [shape=box,height=0.1,width=0.1,color=blue,style=filled]• product56001;• product57001;
• …
• Red Circle• node [shape=circle,style=filled,color=red,height=0.1,label="”]• category10002;• category10003;
46
![Page 47: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/47.jpg)
Visualize your architecture© Extenda
Node Attribute• node [shape=circle,style=filled,color=red,height=0.3,label=""];• category10002;
• node [shape=circle,style=filled,color=red,height=0.1,label=""];• category10003;• category10004;• …
47
![Page 48: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/48.jpg)
Visualize your architecture© Extenda
Highlight root category
48
![Page 49: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/49.jpg)
Visualize your architecture© Extenda
Twopi – Radial Layout
49
![Page 50: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/50.jpg)
Visualize your architecture© Extenda
Country #2
50
![Page 51: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/51.jpg)
Visualize your architecture© Extenda
Country #3
51
![Page 52: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/52.jpg)
Visualize your architecture© Extenda
Other• Component Dependencies (Spring XML Bean Config)• Ant Target Dependencies• Maven Jar Dependencies• …
52
![Page 53: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/53.jpg)
Visualize your architecture© Extenda
Other tools• Enterprise Architect – Code (better suited for user generated)• Erwin – Database ER-model
53
![Page 54: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/54.jpg)
Visualize your architecture© Extenda
Summary
54
Practice Exformation
Use Visualization
Question Metrics
![Page 55: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/55.jpg)
Visualize your architecture© Extenda
Questions?
55
![Page 56: Visualize your architecture and information](https://reader035.vdocument.in/reader035/viewer/2022062616/54b4e0514a795919738b459a/html5/thumbnails/56.jpg)
Visualize your architecture© Extenda
Referenser• ”Märk Världen”, Tor Nörretranders, ISBN 9100570702• http://martinfowler.com/ieeeSoftware/whoNeedsArchitect.pdf• http://en.wikipedia.org/wiki/Cyclomatic_complexity• http://www.enerjy.com/blog/?p=198 - CC > 74 not good• http://www.leshatton.org/Documents/TAIC2008-29-08-2008.pdf -
Tools• http://www.headwaysoftware.com/ - Structure 101• http://www.hello2morrow.com/ - Sonargraph• http://www.sonarsource.org/ - SonarSource• http://www.graphviz.org/ - Graphviz• Similar presentations• http://www.jfokus.se/jfokus11/preso/jf11_VizualizationsForCodeMetrics.pdf• http://erik.doernenburg.com/wp-content/archive/Doernenburg_SoftwareQuality_ver2a.pdf• http://www.slideshare.net/girba/pragmatic-quality-assessment-tutorial-icse-2008• http://www.infoq.com/presentations/Where-Did-My-Architecture-Go