|
| 1 | +<!DOCTYPE html> |
| 2 | +<html> |
| 3 | + <head> |
| 4 | + <title>Title</title> |
| 5 | + <meta charset="utf-8"> |
| 6 | + <style> |
| 7 | + @import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz); |
| 8 | + @import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic); |
| 9 | + @import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic); |
| 10 | + |
| 11 | + body { font-family: 'Droid Serif'; } |
| 12 | + h1, h2, h3 { |
| 13 | + font-family: 'Yanone Kaffeesatz'; |
| 14 | + font-weight: normal; |
| 15 | + } |
| 16 | + .remark-code, .remark-inline-code { font-family: 'Ubuntu Mono'; } |
| 17 | + </style> |
| 18 | + </head> |
| 19 | + <body> |
| 20 | + <textarea id="source"> |
| 21 | + |
| 22 | +class: center, middle |
| 23 | + |
| 24 | +# Hexagonal Architecture |
| 25 | + |
| 26 | +--- |
| 27 | + |
| 28 | +# Also known as |
| 29 | + |
| 30 | +* Ports and Adapters |
| 31 | +* Clean Architecture |
| 32 | +* Onion Architecture |
| 33 | + |
| 34 | +--- |
| 35 | + |
| 36 | +# Layered architecture problems |
| 37 | + |
| 38 | +* No clear application core |
| 39 | +* Business logic leaks to the presentation layer |
| 40 | +<br /> |
| 41 | +<br /> |
| 42 | + |
| 43 | +.center[] |
| 44 | + |
| 45 | +--- |
| 46 | + |
| 47 | +# Intent |
| 48 | + |
| 49 | +* Application can be driven by users, programs, automated test or batch scripts |
| 50 | +* Application can be developed and tested in isolation from its eventual run-time devices and databases |
| 51 | + |
| 52 | +--- |
| 53 | + |
| 54 | +# Applicability |
| 55 | + |
| 56 | +Use Hexagonal Architecture pattern |
| 57 | + |
| 58 | +* When the application needs to be independent of any frameworks |
| 59 | +* When it is important that the application highly maintainable and fully testable |
| 60 | + |
| 61 | +--- |
| 62 | + |
| 63 | +# Concepts |
| 64 | + |
| 65 | +* Ports are interfaces |
| 66 | +* The ports that drive the application are called primary ports |
| 67 | +* The ports that are driven by the application are called secondary ports |
| 68 | + |
| 69 | +--- |
| 70 | + |
| 71 | +# Concepts |
| 72 | + |
| 73 | +* Adapters are interface implementations |
| 74 | +* Typically different adapters for testing and production are provided |
| 75 | + |
| 76 | +--- |
| 77 | + |
| 78 | +# Diagram |
| 79 | + |
| 80 | +.center[] |
| 81 | + |
| 82 | +--- |
| 83 | + |
| 84 | +# Real world examples |
| 85 | + |
| 86 | +* [Apache Isis](https://isis.apache.org/) builds generic UI and REST API directly from the underlying domain objects |
| 87 | + |
| 88 | +--- |
| 89 | + |
| 90 | +# Tutorials |
| 91 | + |
| 92 | +* Blog http://java-design-patterns.com/blog/build-maintainable-systems-with-hexagonal-architecture/ |
| 93 | +* Source code http://java-design-patterns.com/patterns/hexagonal/ |
| 94 | + |
| 95 | + </textarea> |
| 96 | + <script src="https://gnab.github.io/remark/downloads/remark-latest.min.js"> |
| 97 | + </script> |
| 98 | + <script> |
| 99 | + var slideshow = remark.create(); |
| 100 | + </script> |
| 101 | + </body> |
| 102 | +</html> |
| 103 | + |
0 commit comments