Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

Architektur und Code im Einklang [JUG Nürnberg]

517 vues

Publié le

28.06.2017, Java User Group Nürnberg

Umsetzung von Architekturkonzepten und Designvorgaben mit jQAssistant direkt im Quellcode überprüfen

jQAssistant ist ein Werkzeug zur statischen Analyse von Softwareartefakten. Mit jQAssistant ist es möglich, Architektur- und Designkonzepte als einen Satz von Regeln zu definieren. Die Einhaltung dieser Regeln kann anschließend bei jedem Bau einer Software automatisiert überprüft werden. Dadurch kann sichergestellt werden, dass eine vorgegebene Architektur sowie Designvorgaben auch wirklich im Quellcode umgesetzt wurden.

In meinem Vortrag stelle ich die Grundlagen von jQAssistant vor und zeige an einem Beispiel, wie sich mit dem Werkzeug eine sich selbst prüfende Architekturdokumentation erstellen lässt.

Publié dans : Logiciels
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Répondre 
    Voulez-vous vraiment ?  Oui  Non
    Votre message apparaîtra ici
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Répondre 
    Voulez-vous vraiment ?  Oui  Non
    Votre message apparaîtra ici
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://urlzs.com/UABbn } ......................................................................................................................... Download Full EPUB Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download Full doc Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download PDF EBOOK here { https://urlzs.com/UABbn } ......................................................................................................................... Download EPUB Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download doc Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Répondre 
    Voulez-vous vraiment ?  Oui  Non
    Votre message apparaîtra ici
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Répondre 
    Voulez-vous vraiment ?  Oui  Non
    Votre message apparaîtra ici
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Répondre 
    Voulez-vous vraiment ?  Oui  Non
    Votre message apparaîtra ici

Architektur und Code im Einklang [JUG Nürnberg]

  1. 1. Architektur und Code im Einklang Umsetzung von Architekturkonzepten und Designvorgaben mit jQAssistant und AsciiDoc direkt im Quellcode automatisiert überprüfen @feststelltaste feststelltaste.de talk@markusharrer.de Markus Harrer Sparda Datenverarbeitung e. G. Java User Group Nürnberg (28.06.2017)
  2. 2. “If you think good architecture is expensive, try bad architecture.” Brian Foote
  3. 3. “If you think bad architecture is expensive, try undocumented and non-validated architecture.” Markus Harrer
  4. 4. Plan Reality
  5. 5. + = scan document validate
  6. 6. Grundlegendes zu jQAssistant
  7. 7. jQAssistant Funktionsweise • Scanne Softwarestrukturen • Speichere diese in eine Datenbank • Führe Abfragen aus • Untersuche Zusammenhänge • Ergänze Konzepte • Validiere Regelverletzungen • Generiere Berichte
  8. 8. jQAssistant Kernideen: Concepts • Gescannte Elemente werden Konzepten („concepts“) zugeordnet, z. B. • Maven Project = Modul • Java Package = Schicht • Mit @Entity annotierte Klasse = JPA-Entity
  9. 9. jQAssistant Kernideen: Constraints • Regeln werden auf Basis der Konzepte textuell formuliert, z. B. „Alle JPA-Entitäten müssen sich in der Persistenz-Schicht befinden“ • Abweichungen von den Regeln („constraints“) werden geprüft, z. B. „Gib mir alle JPA-Entities, die sich nicht in der Persistenzschicht befinden.“
  10. 10. jQAssistant Kernideen: Constraints • Regeln werden auf Basis der Konzepte textuell formuliert, z. B. „Alle JPA-Entitäten müssen sich in der Persistenz-Schicht befinden“ • Abweichungen von den Regeln („constraints“) werden geprüft, z. B. „Gib mir alle JPA-Entities, die sich nicht in der Persistenzschicht befinden.“
  11. 11. jQAssistant Kernideen: Groups • Alles wird in einer gemeinsamen Dokumentation festgehalten, über Gruppen („groups“) strukturiert und beim Build ausgeführt. Ausschnitt:
  12. 12. Graphentheorie mit Neo4j und Cypher
  13. 13. Ein Graph Knoten Kante
  14. 14. Graph im Detail Knoten Mögliche Arten Java-Klasse Messpunkt Datei Repository URL ...
  15. 15. Graph im Detail Kanten Typ einer Beziehung DECLARES EXTENDS IMPLEMENTS ANNOTATED_BY DEPENDS_ON ...
  16. 16. Ein Graph – sogar mit Daten! File Class TypeFile key value name “entity“ file “Entity.java” fqn “jpa.thing.Entity” key value weight 3key value name “Pet” file “Pet.java” fqn “foo.bar.Pet” Labels Properties
  17. 17. Beispiel Spring PetClinic
  18. 18. Sprint PetClinic: Verwaltung für Tierpraxis
  19. 19. Beispiel-Graph: Sprint PetClinic visibility: public name: Pet fqn: org.springframework.samples.petclinic.model.Pet … Class:Type:Java:File
  20. 20. Beispiel-Graph: Sprint PetClinic
  21. 21. Beispiel-Graph: Sprint PetClinic
  22. 22. Beispiel-Graph: Sprint PetClinic Kann ich abfragen!
  23. 23. Cypher Syntax
  24. 24. Cypher Abfrage von Knoten MATCH (p:Class)-[]->(e:Type) WHERE p.name = "Pet" AND e.name = "Entity" RETURN p, e
  25. 25. Explorative Analysen in Neo4j Demo 1 MATCH (p:Class)-[]->(e:Type) WHERE p.name = "Pet" AND e.name = "Entity" RETURN p, e
  26. 26. Dokumentieren mit AsciiDoc und Cypher
  27. 27. AsciiDoc Markup Language • Rendert zu • DocBook • HTML • PDF mit Cypher: ausführbare Spezifikation! • Programmiervorgaben • Design und Architektur
  28. 28. Definition eines Concepts == 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 ----
  29. 29. Definition eines Constraints [[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 ----
  30. 30. Definition einer Group [[default]] [role=group,includesConstraints= "model:JpaEntityInModelPackage"]
  31. 31. Ergebnisbericht Z. B. als Maven Site Report
  32. 32. Selbstvalidierende Architekturdokumentation Demo 2 Spring PetClinic
  33. 33. Plan Reality
  34. 34. • jQAssistant bietet schnelle und flexible Sichten auf eine Vielzahl von Softwarestrukturen • Zusammenhänge können explorativ über die Graphdatenbank Neo4j erkundet werden • Definition von Spielregeln über Concepts und Constraints in Cypher / AsciiDoc Automatisierte Überprüfung von • Architekturkonzepten und • Designvorgaben • direkt im Code Zusammenfassung
  35. 35. Links • jQAssistant • http://jqassistant.org • Ausführliches Video • https://www.youtube.com/watch?v=kQr2c7yWbEA • Spring PetClinic Beispielprojekt • Repo: http://github.com/buschmais/spring-petclinic • Output: https://buschmais.github.io/spring-petclinic/ • Meine Erfahrungen soweit • https://www.feststelltaste.de/my-experiences-with- jqassistant-so-far/
  36. 36. Credits Einige Beispiele wurden aus Dirk Mahlers Vortrag “jQAssistant - Verify Your Design And Architecture” übernommen • https://jqassistant.org/wp-content/uploads/2016/06/ jQAssistant-Verify-Your-Design-And-Architecture.pdf Bilder • https://de.wikipedia.org/wiki/Datei:Yin_yang.svg • https://commons.wikimedia.org/wiki/File:Achitecture_time.jpg • https://commons.wikimedia.org/wiki/File:Adelaide_Street_aba ndoned_house.jpg
  37. 37. Fragerunde Eure Fragen

×