mind the gap architecture versus code
play

Mind the Gap Architecture versus Code Berlin Expert Days September - PowerPoint PPT Presentation

by Mind the Gap Architecture versus Code Berlin Expert Days September 2016 Oliver B. Fischer - E-Post Development GmbH 2 Was ist Software Architektur? Eine strukturierte oder hierarchische Anordnung der Systemkomponenten sowie die


  1. by Mind the Gap Architecture versus Code Berlin Expert Days September 2016 Oliver B. Fischer - E-Post Development GmbH

  2. 2

  3. Was ist Software Architektur? Eine strukturierte oder hierarchische Anordnung der Systemkomponenten sowie die Beschreibung Ihrer Beziehungen. Helmut Balzert 3

  4. Was ist Software Architektur? The fundamental organisaBon of a system embodied in its components, their relaBonships to each other, and the environment, and the principles guiding its design and evoluBon. IEEE 1471-2000 4

  5. Was ist Software Architektur? SEI @ CMI: John Carter ...from the plethora of definiBons the vary concept of SoGware Architecture is fuzzy to the point of uHer uselessness... A lot of folks mean: That peculiar consistency and homogenity of Design that would give arise to the ease of use and reuse, which is wished for by the developer who calls himself „The SoGware Architect“. ...[which] implodes immediatly on the appointment of a second SoGware Architect... 5

  6. Ziele von Software Architektur SoGware-Qualität Prozess Qualität Produkt-Qualität Wartbarkeit Brauchbarkeit PrüVarkeit Änderbarkeit Portabilität Lesbarkeit Strukturiertheit Einfachheit 6

  7. Ziele von Software Architektur Durch SoGware Architektur wollen wir erhalten: § Wartbare SoGware § Verständliche SoGware § Anpassbare bzw. Erweiterbare SoGware § Effiziente SoGware 7

  8. Wann Software Architektur entsteht SoGware Architektur entsteht sobald sich zwei Personen über einen Aspekt eines Dings oder das Zusammenspiel zweier Dinge absBmmen. 8

  9. Wann Software Architektur entsteht SoBware Architektur entsteht sobald sich zwei Personen [über einen Aspekt eines Dings oder das Zusammenspiel zweier Dinge] absImmen . 9

  10. Software Architektur ist Kommunikation SoGware Architektur ist [auch] KommunikaBon über Strukturen, Beziehungen und Prinzipien... ...um besser und leichter arbeiten zu können. 10

  11. Software Architektur ist Kommunikation SoGware Architektur muß Verständnis schaffen, nicht nur für das Wie , sondern auch für das Warum ! 11

  12. Software Architektur ist Kommunikation Drei Rollen-Model Domainexperte Entwickler User 12

  13. Software Architektur ist Kommunikation Einfachster Fall § Domainexperte § Entwickler § User 13

  14. Software Architektur ist Kommunikation Es wird schwieriger... § Domainexperte § Entwickler § User 14

  15. Software Architektur ist Kommunikation Es wird schwieriger... § Domainexperte § Entwickler § User 15

  16. Software Architektur ist Kommunikation Das Team wird größer § Domainexperte § Entwickler § User 16

  17. Software Architektur ist Kommunikation Es verteilt sich... Team in Berlin Team in München 17

  18. Software Architektur ist Kommunikation Es verteilt sich geographisch und kulturell I speak Englisch Ich spreche Я говорю Deutsch... по-русский 18

  19. Software Architektur ist Kommunikation Und dann auch zeitlich... 19

  20. Software Architektur ist Kommunikation Ach ja: Microservices... 20

  21. Altlasten & Technische Schulden Veraltete Libraries.... Neue Lösungsansätze Divergierende Makroarchitektur 21

  22. Wir brauchen Regeln §1. Jedes System... §2. Jede Methode... §3. Auf jedem Server... §4. ... Hast Du mal Zeit? Ja, was willst Du denn? Ich habe da eine Idee. Laß mal hören... ... ... Ja, so machen wir das! 22

  23. Wir brauchen Regeln Regeln entstehen meist informell §1. Jedes System... §2. Jede Methode... §3. Auf jedem Server... §4. ... 23

  24. Wir brauchen Regeln Informelle Regeln haben Grenzen... § Größe des Teams erschwert KommunikaBon § Entstehung von Inselwissen § FluktuaBon § Charaktertypen 24

  25. Lösungsansatz Überführung von informellen Regeln in formale Regeln. 25

  26. Lösungsansatz „Wir schreiben das auf!“ „Wo?“ „Im Wiki!“ Zitat „Wiki, der Ort wo InformaBonen zum Sterben hingehen.“ 26

  27. Lösungsansatz „Wir schreiben das auf!“ „Wo?“ „Im Wiki!“ W here I informaBon K ills I tself 27

  28. Lösungsansatz DokumentaIon != KommunikaIon 28

  29. Lösungsansatz Helfen Reviews? 29

  30. Lösungsansatz Helfen Tools? 30

  31. Mind The Gap! Architecture vs. Code jQAssistant 31

  32. hHp://jQAssistant.org § Open Source - GPL v3 § Current release: 1.1.3 - iniBated: 03/2013 - first stable release: 04/2015 § Neo4j Community EdiBon embedded - no installaBon necessary 32

  33. § The Idea - Scan soGware structures - Store in a database - Execute queries Find § Add higher level concepts all… § Find constraint violaBons Database - Create Reports à Provide feedback to developers within build process 33

  34. Scan Plugins Command Line/ Analyze Plugins Maven Report Plugins 34

  35. § Available scanner plugins ZIP JAR, WAR, EAR GZ Liquibase *.properBes *.class *.yaml CheckStyle FindBugs MANIFEST.MF /META-INF/services/* JaCoCo Git web.xml applicaBon.xml beans.xml pom.xml surefire-reports.xml *.xsd § Plugin API is public M2 Repository RDBMS Schema 35

  36. Mind The Gap! Architecture vs. Code Software As A Graph 36

  37. § All we need is… - Nodes Type - Labels EXTENDS fqn:org.springframework.samples. - ProperBes petclinic.model.Owner - RelaBonships § Modeling is just… - Taking a pen - Drawing the structures on a whiteboard (i.e. the database) § We don‘t need… - Foreign keys - Tables and schemas - Deep knowledge in graph theory 37

  38. Project Maven name:petclinic CREATES ArBfact Package Package Package CONTAINS CONTAINS CONTAINS name:samples name:org name:springframework CONTAINS name:petclinic Package CONTAINS name:model Package

  39. Type AnnotaBon fqn:javax.persistence.MappedSuperclass name:model OF_TYPE Package ANNOTATED_BY CONTAINS AnnotaBon Type fqn:org.springframework. samples.petclinic. fqn:javax.persistence.EnBty OF_TYPE model.Person name:Person Type Method Class name:getAddress() ANNOTATED_BY EXTENDS RETURNS DECLARES Type Type fqn:java.lang.String READS Class fqn:org.springframework. samples.petclinic. OF_TYPE DECLARES model.Owner name:Owner name:address Field

  40. § Explore an applicaBon using queries - Which class extends from another class? EXTENDS Type Type Class § Let‘s convert this to ASCII art… - () as nodes - -[]-> as directed relaBonships 40

  41. § Explore an applicaBon using queries - Which class extends from another class? EXTENDS Type Type Class § Let‘s convert this to ASCII art… - () as nodes - -[]-> as directed relaBonships ()-[]->() 41

  42. § Explore an applicaBon using queries - Which class extends from another class? C1 C2 EXTENDS Type Type Class § Let‘s convert this to ASCII art… - () as nodes - -[]-> as directed relaBonships (c1)-[]->(c2) 42

  43. § Explore an applicaBon using queries - Which class extends from another class? C1 C2 EXTENDS Type Type Class § Let‘s convert this to ASCII art… - () as nodes - -[]-> as directed relaBonships (c1)-[:EXTENDS]->(c2) 43

  44. § Explore an applicaBon using queries - Which class extends from another class? C1 C2 EXTENDS Type Type Class § Let‘s convert this to ASCII art… - () as nodes - -[]-> as directed relaBonships (c1:Class)-[:EXTENDS]->(c2:Type) 44

  45. § Explore an applicaBon using queries - Which class extends from another class? C1 C2 EXTENDS Type Type Class § PaHern matching is the core principle of Cypher MATCH (c1:Class)-[:EXTENDS]->(c2:Type) RETURN c1.fqn, c2.fqn 45

  46. Mind The Gap! Architecture vs. Code Demo #1 hHp://jqassistant.org/get-started/ 46

  47. Mind The Gap! Architecture vs. Code Building The Bridge 47

  48. § Analyze - ExecuBon of rules § Defined in AsciiDoc or XML documents - Concepts § Enrich data model - Constraints § Detect violaBons - Group § Allow different execuBon profiles 48

  49. Group Constraint Includes Requires Requires Requires Concept Concept Concept 49

  50. § Concept == JPA Entities [[jpa2:Entity]] .Labels all types annotated with @javax.persistence.Entity with Jpa and Entity. [source,cypher,role=concept] ---- MATCH (t:Type)-[:ANNOTATED_BY]->()-[:OF_TYPE]->(a:Type) WHERE a.fqn ="javax.persistence.Entity" SET t:Jpa:Entity RETURN t AS Entity ---- 50

  51. § Concept AnnotaBon Type fqn:javax.persistence.EnBty OF_TYPE ANNOTATED_BY Type Jpa EnBty Class fqn:org.springframework. samples.petclinic. model.Owner name:Owner 51

  52. § Constraint [[model:JpaEntityInModelPackage]] .All JPA entities must be located in packages named "model". [source,cypher,role=constraint,requiresConcepts="jpa2:Entity"] ---- MATCH (package:Package)-[:CONTAINS]->(entity:Jpa:Entity) WHERE package.name <> "model" RETURN entity AS EntityInWrongPackage ---- 52

  53. § Group [[default]] [role=group,includesConstraints="model:JpaEntityInModelPackage"] == Naming Rules The following naming rules apply: - <<model:JpaEntityInModelPackage>> 53

  54. § AsciiDoc § Wiki syntax § Rendering to - DocBook - HTML - PDF § Executable specificaBon - Coding rules - Design & Architecture 54

  55. Mind The Gap! Architecture vs. Code Demo #2 hHp://github.com/buschmais/spring-petclinic 55

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend