continous architecture analysis - eclipsecon 2020 · static code analysis - lines of code,...

27
Continous architecture analysis with SonarQube in 3D

Upload: others

Post on 19-Jun-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Continous architecture analysis - EclipseCon 2020 · Static code analysis - Lines of code, complexity - Checkstyle, PMD, Findbugs Test results (unit and integration tests) Management

Continous architecture analysis with SonarQube in 3D

Page 2: Continous architecture analysis - EclipseCon 2020 · Static code analysis - Lines of code, complexity - Checkstyle, PMD, Findbugs Test results (unit and integration tests) Management

2

Software visualization

○ Visualization of information about software systems

○ Visualization of classes and components

○ Simplified risk analysis for all stakeholders

- reduce risks and costs

- increase productivity and quality

○ Promotes communication about the quality of software between different levels

Kontinuierliche Architekturanalyse in 3D

Why is software visualization so rarely used?

Page 3: Continous architecture analysis - EclipseCon 2020 · Static code analysis - Lines of code, complexity - Checkstyle, PMD, Findbugs Test results (unit and integration tests) Management

3

Master Thesis – 2012

Kontinuierliche Architekturanalyse in 3D

City metapher

○ Structure

○ Metrics

Districts

Building footprint

and height

Page 4: Continous architecture analysis - EclipseCon 2020 · Static code analysis - Lines of code, complexity - Checkstyle, PMD, Findbugs Test results (unit and integration tests) Management

4

Challenge 1: Context

Kontinuierliche Architekturanalyse in 3D

Page 5: Continous architecture analysis - EclipseCon 2020 · Static code analysis - Lines of code, complexity - Checkstyle, PMD, Findbugs Test results (unit and integration tests) Management

5

Challenge 2: Data

Kontinuierliche Architekturanalyse in 3D

Visualization

platform JDepend

…?

Page 6: Continous architecture analysis - EclipseCon 2020 · Static code analysis - Lines of code, complexity - Checkstyle, PMD, Findbugs Test results (unit and integration tests) Management

6

The software visualization obstacle

○ Platform setup

- Desktop application

- Server application

○ Import your project

- is my language supported?

- security constraints?

○ Analyse your project

- which metrics are available

- integration of specific metrics

○ Report

- Who can see the result / visualization

Kontinuierliche Architekturanalyse in 3D

How much effort is needed?

Page 7: Continous architecture analysis - EclipseCon 2020 · Static code analysis - Lines of code, complexity - Checkstyle, PMD, Findbugs Test results (unit and integration tests) Management

7

Continous inspection!

○ Structure of the software

○ Static code analysis

- Lines of code, complexity

- Checkstyle, PMD, Findbugs

○ Test results (unit and integration tests)

○Management of standards and rules

○ Analyse the results on a daily basis over a long period

Kontinuierliche Architekturanalyse in 3D

Page 8: Continous architecture analysis - EclipseCon 2020 · Static code analysis - Lines of code, complexity - Checkstyle, PMD, Findbugs Test results (unit and integration tests) Management

8

○ System tests

○ Akzeptanz tests

○ Performance tests

Deployment

Software development cycle at Payback

○ Unit tests

○ static code analysis

Development environment

○ Unit tests

○ Integration tests

○ static code analysis

Build automation

Test results

Errors and warnings of the static code analysis

Code quality and other metrics

Risk analysis

Jenkins

Kontinuierliche Architekturanalyse in 3D

Page 9: Continous architecture analysis - EclipseCon 2020 · Static code analysis - Lines of code, complexity - Checkstyle, PMD, Findbugs Test results (unit and integration tests) Management

9

Kontinuierliche Architekturanalyse in 3D

○ Java

○ Web

○ .NET

○ and many more…

○ Developer

○ Team lead

○ Project lead

○ Analyse results

○ Comparable with previous results

○ Tables, diagrams, …

Languages

Risk analysis For everyone !

○ Checkstyle

○ PMD, Findbugs

○ Management and export

Static code analysis

Page 10: Continous architecture analysis - EclipseCon 2020 · Static code analysis - Lines of code, complexity - Checkstyle, PMD, Findbugs Test results (unit and integration tests) Management

10

Deployment

Software development cycle at Payback

Development environment

Build automation

Analyse Export

of rules

○ Define rules to check

○ Store result over a long period

○ Show and analyse results

Kontinuierliche Architekturanalyse in 3D

Page 11: Continous architecture analysis - EclipseCon 2020 · Static code analysis - Lines of code, complexity - Checkstyle, PMD, Findbugs Test results (unit and integration tests) Management

11

Deployment

Software development cycle at Payback

Development environment

Build automation

Analyse Export

of rules

○ Define rules to check

○ Store result over a long period

○ Show and analyse results

Kontinuierliche Architekturanalyse in 3D

Visualization

Page 12: Continous architecture analysis - EclipseCon 2020 · Static code analysis - Lines of code, complexity - Checkstyle, PMD, Findbugs Test results (unit and integration tests) Management

12

SoftVis3D Sonar plugin - technology

○Webpage plugin for SonarQube

- Java backend connected via webservice

○ AngularJS for the frontend (menu / navigation / interaction)

○ GraphViz for the layout

○ threeJS as 3D framework

Kontinuierliche Architekturanalyse in 3D

Page 13: Continous architecture analysis - EclipseCon 2020 · Static code analysis - Lines of code, complexity - Checkstyle, PMD, Findbugs Test results (unit and integration tests) Management

13

DEMO SoftVis3D

Kontinuierliche Architekturanalyse in 3D

Page 14: Continous architecture analysis - EclipseCon 2020 · Static code analysis - Lines of code, complexity - Checkstyle, PMD, Findbugs Test results (unit and integration tests) Management

14

Software architecture = structure ?

Kontinuierliche Architekturanalyse in 3D

P1

P2

C1

P3

C2 C3

Package "1"

○Package "2"

- C1class.java

○Package "3"

- C2class.java

- C3class.java

Page 15: Continous architecture analysis - EclipseCon 2020 · Static code analysis - Lines of code, complexity - Checkstyle, PMD, Findbugs Test results (unit and integration tests) Management

15

Software architecture = structure + dependencies !

Kontinuierliche Architekturanalyse in 3D

Package "1"

○Package "2"

- C1class.java

○Package "3"

- C2class.java

- C3class.java

P1

P2

C1

P3

C2 C3

Page 16: Continous architecture analysis - EclipseCon 2020 · Static code analysis - Lines of code, complexity - Checkstyle, PMD, Findbugs Test results (unit and integration tests) Management

16

Overflow !

Kontinuierliche Architekturanalyse in 3D

Page 17: Continous architecture analysis - EclipseCon 2020 · Static code analysis - Lines of code, complexity - Checkstyle, PMD, Findbugs Test results (unit and integration tests) Management

17

Transformation of dependencies I

Kontinuierliche Architekturanalyse in 3D

P1

P2

C1

P3

C2 C3

P1

P2

C1

P3

C2 C3

Page 18: Continous architecture analysis - EclipseCon 2020 · Static code analysis - Lines of code, complexity - Checkstyle, PMD, Findbugs Test results (unit and integration tests) Management

18

Transformation of dependencies II

Kontinuierliche Architekturanalyse in 3D

P1

P2

C1

P3

C2 C3

P1

P2

C1

P3

C2 C3

Page 19: Continous architecture analysis - EclipseCon 2020 · Static code analysis - Lines of code, complexity - Checkstyle, PMD, Findbugs Test results (unit and integration tests) Management

19

Transformation of dependencies III

Kontinuierliche Architekturanalyse in 3D

P1

P2

C1

P3

C2 C3

P1

P2

C1

P3

C2 C3

2

2

1 1

Page 20: Continous architecture analysis - EclipseCon 2020 · Static code analysis - Lines of code, complexity - Checkstyle, PMD, Findbugs Test results (unit and integration tests) Management

20

Visualization of dependencies I

Kontinuierliche Architekturanalyse in 3D

Page 21: Continous architecture analysis - EclipseCon 2020 · Static code analysis - Lines of code, complexity - Checkstyle, PMD, Findbugs Test results (unit and integration tests) Management

21

Visualization of dependencies II

Kontinuierliche Architekturanalyse in 3D

Page 22: Continous architecture analysis - EclipseCon 2020 · Static code analysis - Lines of code, complexity - Checkstyle, PMD, Findbugs Test results (unit and integration tests) Management

22

Visualization of dependencies III

Kontinuierliche Architekturanalyse in 3D

Page 23: Continous architecture analysis - EclipseCon 2020 · Static code analysis - Lines of code, complexity - Checkstyle, PMD, Findbugs Test results (unit and integration tests) Management

23

Wrap up dependencies

○ Inner dependencies

- direct connection

○ Dependencies to outside packages

- via "shortest path" transformed and aggragated

○ Districts are build to the bottom and will be represented in the upper layer

○ "Elevator-Buildings" are the connections between the layers / platforms

- Includes all incoming and outgoing dependencies of the package

○ Aggregated / abstract view on the dependencies

○ Explorative analysis enabled

Kontinuierliche Architekturanalyse in 3D

Page 24: Continous architecture analysis - EclipseCon 2020 · Static code analysis - Lines of code, complexity - Checkstyle, PMD, Findbugs Test results (unit and integration tests) Management

24

DEMO

Kontinuierliche Architekturanalyse in 3D

Page 25: Continous architecture analysis - EclipseCon 2020 · Static code analysis - Lines of code, complexity - Checkstyle, PMD, Findbugs Test results (unit and integration tests) Management

25

Kontinuierliche Architekturanalyse in 3D

Code quality management

Continous inspection of the source code

Consolidate and analyse results

Visualization as additional tool !

Wrap up

Page 26: Continous architecture analysis - EclipseCon 2020 · Static code analysis - Lines of code, complexity - Checkstyle, PMD, Findbugs Test results (unit and integration tests) Management

26

Kontinuierliche Architekturanalyse in 3D

SoftVis3d Sonarqube plugin

○ Easy installationn as SonarQube Plugin

○ Open source: https://github.com/stefanrinderle/sonar-softvis3d-plugin

○ Visualization of all existing Metrics in SonarQube

○ City view / Dependency view

○ Explorative user interface

○Details: http://softvis3d.com

Page 27: Continous architecture analysis - EclipseCon 2020 · Static code analysis - Lines of code, complexity - Checkstyle, PMD, Findbugs Test results (unit and integration tests) Management

27

Thanks

PAYBACK GmbH

STEFAN RINDERLE

Software Engineer

Theresienhöhe 12

80339 München

Phone +49 (0) 89 997 41 – 780

[email protected]

PAYBACK.net | PAYBACK.de