Slide 1

Slide 1 text

qaware.de Vom Elfenbeinturm zur agilen Architektur Mario-Leander Reimer [email protected] @LeanderReimer

Slide 2

Slide 2 text

You have to use an Oracle database!

Slide 3

Slide 3 text

Continuous Delivery. The Holy Grail? QAware | 3 Continuous Delivery Low Risk Releases Less Rework Fast Time to Market Better Products Lower Costs Happier Teams Happier Users Loosely Coupled Architectures Maintainable Code Empowered Teams Continuous Security from Day 1 Test Automation Continuous Integration GitOps Deployment Automation Monitoring and Alerting

Slide 4

Slide 4 text

4 QAware

Slide 5

Slide 5 text

The Stuff That's Hard to Change Later! 5 QAware Design Architecture So wenig wie möglich.

Slide 6

Slide 6 text

6 QAware https://arc42.org/download High-Level Structure of the arc42 Documentation Template

Slide 7

Slide 7 text

7 QAware Architecture Diagrams

Slide 8

Slide 8 text

4 Maps of your Code: Context. Container. Component. Code. 8 QAware

Slide 9

Slide 9 text

9 Decisions

Slide 10

Slide 10 text

The Last Possible Moment != The Last Responsible Moment QAware | 10 ■ Welche Fragen sind für verantwortungsvolle Entscheidungen relevant? – Muss ich die Entscheidung jetzt treffen? – Kann ich es noch aufschieben? – Was passiert, wenn ich es nicht mache? – Wann wird die Komplexität zu hoch? – Welche Alternativen gibt es? – Was sind die Trade-Offs der Entscheidung? – Kann die Entscheidung rückgängig gemacht werden? ■ The Last Responsible Moment ist die bessere Wahl! ■ Keine Angst vor suboptimalen Entscheidungen. ■ Iterative Entwicklung, Tests, Refactoring, Continuous Integration und Architecture Fitness Functions helfen das Risiko beherrschbar zu machen

Slide 11

Slide 11 text

QAware | 11 https://cognitect.com/blog/2011/11/15/documenting-architecture-decisions

Slide 12

Slide 12 text

Architecture Decision Records (ADR) QAware | 12 https://www.thoughtworks.com/radar/techniques/lightweight-architecture-decision-records

Slide 13

Slide 13 text

The Anatomy of an Architecture Decision Records (ADR) QAware | 13 # Title ## Context ## Decision ## Status ## Consequences ■ Short text file; 1-2 pages long, one file per decision ■ Simple format like Markdown, Asciidoc, TXT, etc. Short noun phrase and number, e.g. ADR 5: AWS as preferred cloud provider Proposed, Accepted, Deprecated, Superseded Describes the forces at play: technology, political, project local. Value neutral, simple facts. Response to the forces with justification. Stated in full sentences, with active voice. "We will …" Describe context, after applying the decision. All consequences should be listed here, not just the "positive" ones.

Slide 14

Slide 14 text

QAware | 14 Controlling

Slide 15

Slide 15 text

Nicht nur Maintainability ist wichtig. Ganzheitliche Qualität umfasst viele, viele weitere -Illities. QAware | 15 Software Product Quality (ISO 25010) ● Modularity ● Reusability ● Analysability ● Modifiability ● Testability Maintainability ● Confidentiality ● Integrity ● Non-repudiation ● Authenticity ● Accountability Security ● Adaptability ● Installability ● Replaceability ● Evolvability Portability ● Co-existence ● Interoperability Compatibility ● Maturity ● Availability ● Fault Tolerance ● Recoverability Reliability ● Time Behaviour ● Resource Utilization ● Capacity Efficiency ● Completeness ● Correctness ● Appropriateness Functional Suitability ● Operability ● Learnability ● UI Aesthetics ● Accessibility Usability

Slide 16

Slide 16 text

Die geforderten Qualitäts-Attribute sind auf allen Ebenen einer Software-Architektur zu finden. 16

Slide 17

Slide 17 text

17 QAware

Slide 18

Slide 18 text

Architecture Fitness Functions validieren die geforderten (nicht)-funktionalen System-Eigenschaften kontinuierlich. 18 https://www.thoughtworks.com/de/radar/techniques/architectural-fitness-function

Slide 19

Slide 19 text

Fitness-function Driven Development QAware | 19 ■ Architektur ist wie ein Produkt mit User Journeys ■ Anforderungen werden von den Stakeholdern eingesammelt – Business – Compliance – Operations – Security – Infrastructure ■ Das sind häufig unsere „-illities“ und Qualitätsmerkmale ■ Die Akzeptanz-Kriterien werden mit einem BDD Test Framework formuliert. ■ Tests werden als Teil der CI/CD Pipeline ausgeführt, und anschließend verifiziert https://www.thoughtworks.com/de/insights/articles/fitness-function-driven-development

Slide 20

Slide 20 text

Beispiele für Architectural Fitness Functions 20 describe "Performance" do it "completes a transaction in under 2 seconds" do expect(k6.check_transaction_round_trip_time()).to < 2 end it "has less than 10% error rate for 10000 transactions" do expect(k6.check_error_rate_for_transactions(10000)).to < .1 end end describe "Security" do describe “Static Analysis” do it "should not have plaintext secrets in codebase" do expect(code.has_secrets_in_codebase()).to_not be(true) end end describe “Dynamic Analysis” do it "should not have any of the OWASP Top 10" do expect(zap.has_owasp_top_10_vulnerabilities()).to be(false) end end end

Slide 21

Slide 21 text

21 Automation

Slide 22

Slide 22 text

Menschen machen Fehler. Von der Clean Architecture zum Big Ball of Mud geht’s schneller, als man glaubt! QAware | 22

Slide 23

Slide 23 text

ArchUnit ermöglicht die einfache automatisierte Prüfung einer Software-Architektur in Form von Unit Tests. ■ https://www.archunit.org/ ■ Freie (Apache v2), einfache und erweiterbare Bibliothek zur Prüfung der Architektur von Java Code. Gibt es auch für .NET/C#. ■ Alle gängigen Build Tools und Unit Test Frameworks werden unterstützt ■ Das ArchUnit Library API bietet eine Sammlung an vordefinierten Regeln für wiederkehrende Architektur-Prüfungen – Architectures: Regeln zur Überprüfung von Layered und Onion Architectures – Slices: Erkennung von “Cycles” auf unterschiedlichen Ebenen – General: Sammlung von Regeln für Good Coding Practices (z.B: Logging, Exceptions, …) – PlantUML: Regeln zum Abgleich der Codebase mit einem PlantUML Modell – Freezing Arch Rules: Erlaubt die Definition einer Baseline für Violations, besonders nützlich um Technische Schulden in Altprojekten zu managen QAware | 23

Slide 24

Slide 24 text

Nur wenige Zeilen Code validieren unsere Clean Architecture kontinuierlich und wiederholbar bei jedem Build. 24 @AnalyzeClasses(packages = {"de.qaware.archunit.example.onion"}) public class OnionArchitectureFitnessTest { @ArchTest static final ArchRule onion_architecture_is_respected = onionArchitecture() .domainModels("..domain.model..") .domainServices("..domain.service..") .applicationServices("..application..") .adapter("cli", "..adapter.cli..") .adapter("persistence", "..adapter.persistence..") .adapter("rest", "..adapter.rest.."); }

Slide 25

Slide 25 text

25 QAware

Slide 26

Slide 26 text

Beyond "Moderne Software-Architektur". Mein persönliche Leseliste für neue Impulse und Ansätze. 26 QAware

Slide 27

Slide 27 text

qaware.de QAware GmbH Aschauer Straße 32 81549 München Tel. +49 89 232315-0 [email protected] twitter.com/qaware linkedin.com/company/qaware-gmbh xing.com/companies/qawaregmbh slideshare.net/qaware github.com/qaware