Software-Hygiene

Jens Himmelreich
Jens HimmelreichSoftwareentwickler at neuland - Büro für Informatik
S O F T W A R E 

H Y G I E N E
X P D A Y S S T U T T G A R T 2 0 1 7
oder was man von Blutgruppen
über die Strukturierung von Software
lernen kann
sven bange
jens himmelreich
N E U L A N D - B Ü R O F Ü R I N F O R M A T I K


ARCHITEKTUR
AGILE

ARCHITEKTDER EINSAME
Plan
ARCHITEKT
ARCHITEKT
ARCHITEKTUR
evolvierend, inkrementell
Werte
Muster
Werte und Muster werden global kommuniziert
und machen lokal handlungsfähig.
Big Ball of Mud
sauber
einfach
strukturiert
aufgeräumt
willkürlich
chaotisch
wuchernd
schmutzig
1 8 4 8
Ignaz Semmelweis
„Erkennung, Behandlung und Prävention

von Infektionskrankheiten“
H Y G I E N E
„Erkennung, Behandlung und Prävention

von Infektionskrankheiten“
E R K E N N U N G
Bedside-Test
A B 0
A B AB0
A B AB0
0
A
B
AB
Spender
Empfänger
x
xx
xx
x x xx
Serafol® ABO
Anti-A Anti-B
Serafol® AB0
Anti-A Anti-B
Serafol® AB0
Anti-A Anti-B
Serafol® AB0
Anti-BAnti-A
Big Ball of Mud
Johannes Siedersleben
sd&m
Q U A S A R
„Software, die sich unterschiedlich schnell ändert,
wird in unterschiedliche Module aufgeteilt.“
David Parnas
A B AB0
A T AT0
universell verfügbare Software
A T AT0
Anwendungs-Software
A T AT0
Technische Software
A T AT0
Big Ball of Mud
A T AT0
Repräsentation
A T AT/R0
A T R0
A T R0
0
A
T
R
Aufgerufener
Aufrufer
x
xx
xx
x x xx
Quasar
Quasar® AT0
Anti-TAnti-A
„Erkennung, Behandlung und Prävention

von Infektionskrankheiten“
H Y G I E N E
„Erkennung, Behandlung und Prävention

von Infektionskrankheiten“
B E H A N D L U N G
TREN ∙ NUNG
Domain Driven Design
Eric Evans, Vaughn Vernon
I. Bounded Context
A B C
II. A-Software ∙ T-Software
III. Domain Model
Trennwand
R-Software
Hexagon
Hexagon
Port and Adapter
Application
Domain
Hexagon
WebController
AppService
Aggregate Repository
EntityValueObject
DomainServiceDomainEvent
RepositoryImpl
WebRequest
Port and Adapter
Application
Domain
JDBCObject
A-Software
WebController
AppService
Aggregate Repository
EntityValueObject
DomainServiceDomainEvent
RepositoryImpl
WebRequest
Port and Adapter
Application
Domain
JDBCObject
Aggregate Repository
EntityValueObject
DomainServiceDomainEvent
T-Software
WebController
AppService
Aggregate Repository
EntityValueObject
DomainServiceDomainEvent
RepositoryImpl
WebRequest
Port and Adapter
Application
Domain
JDBCObject
WebRequest
JDBCObject
R-Software
WebController
AppService
Aggregate Repository
EntityValueObject
DomainServiceDomainEvent
RepositoryImpl
WebRequest
Port and Adapter
Application
Domain
JDBCObject
WebController
AppService
RepositoryImpl
B E I S P I E L
├── java
│   └── de.neuland.xpdemo
│   ├── XpdemoApplication.java
│   ├── application
│   │   ├── GreetingApplicationService.java
│   │   └── GreetingData.java
│   ├── domain.model
│   │  ├── Greeting.java
│   │ ├── GreetingInterest.java
│   │ ├── GreetingRepository.java
│   │ ├── Name.java
│   │ └── Salutation.java
│   └── port.adapter
│   ├── persistence
│   │   ├── GreetingTable.java
│   │   ├── HibernateGreetingRepository.java
│   │   └── JpaGreetingRepository.java
│   └── web
│   └── WebController.java
└── resources
├── application.properties
├── static
└── templates
└── home.html
├── java
│   └── de.neuland.xpdemo
│   ├── XpdemoApplication.java
│   ├── application
│   │   ├── GreetingApplicationService.java
│   │   └── GreetingData.java
│   ├── domain.model
│   │  ├── Greeting.java
│   │ ├── GreetingInterest.java
│   │ ├── GreetingRepository.java
│   │ ├── Name.java
│   │ └── Salutation.java
│   └── port.adapter
│   ├── persistence
│   │   ├── GreetingTable.java
│   │   ├── HibernateGreetingRepository.java
│   │   └── JpaGreetingRepository.java
│   └── web
│   └── WebController.java
└── resources
├── application.properties
├── static
└── templates
└── home.html
├── java
│   └── de.neuland.xpdemo
│   ├── XpdemoApplication.java
│   ├── application
│   │   ├── GreetingApplicationService.java
│   │   └── GreetingData.java
│   ├── domain.model
│   │  ├── Greeting.java
│   │ ├── GreetingInterest.java
│   │ ├── GreetingRepository.java
│   │ ├── Name.java
│   │ └── Salutation.java
│   └── port.adapter
│   ├── persistence
│   │   ├── GreetingTable.java
│   │   ├── HibernateGreetingRepository.java
│   │   └── JpaGreetingRepository.java
│   └── web
│   └── WebController.java
└── resources
├── application.properties
├── static
└── templates
└── home.html
├── java
│   └── de.neuland.xpdemo
│   ├── XpdemoApplication.java
│   ├── application
│   │   ├── GreetingApplicationService.java
│   │   └── GreetingData.java
│   ├── domain.model
│   │  ├── Greeting.java
│   │ ├── GreetingInterest.java
│   │ ├── GreetingRepository.java
│   │ ├── Name.java
│   │ └── Salutation.java
│   └── port.adapter
│   ├── persistence
│   │   ├── GreetingTable.java
│   │   ├── HibernateGreetingRepository.java
│   │   └── JpaGreetingRepository.java
│   └── web
│   └── WebController.java
└── resources
├── application.properties
├── static
└── templates
└── home.html
@Controller
public class WebController {
@Autowired
private GreetingApplicationService greetingApplicationService;
@RequestMapping("/")
public String home(Model model) {
GreetingData greeting = greetingApplicationService.welcomePeople();
model.addAttribute("salutation", greeting.getSalutation());
model.addAttribute("name", greeting.getName());
return "home";
}
}
@Controller
public class WebController {
@Autowired
private GreetingApplicationService greetingApplicationService;
@RequestMapping("/")
public String home(Model model) {
GreetingData greeting = greetingApplicationService.welcomePeople();
model.addAttribute("salutation", greeting.getSalutation());
model.addAttribute("name", greeting.getName());
return "home";
}
}
@Controller
public class WebController {
@Autowired
private GreetingApplicationService greetingApplicationService;
@RequestMapping("/")
public String home(Model model) {
GreetingData greeting = greetingApplicationService.welcomePeople();
model.addAttribute("salutation", greeting.getSalutation());
model.addAttribute("name", greeting.getName());
return "home";
}
}
@Controller
public class WebController {
@Autowired
private GreetingApplicationService greetingApplicationService;
@RequestMapping("/")
public String home(Model model) {
GreetingData greeting = greetingApplicationService.welcomePeople();
model.addAttribute("salutation", greeting.getSalutation());
model.addAttribute("name", greeting.getName());
return "home";
}
}
├── java
│   └── de.neuland.xpdemo
│   ├── XpdemoApplication.java
│   ├── application
│   │   ├── GreetingApplicationService.java
│   │   └── GreetingData.java
│   ├── domain.model
│   │  ├── Greeting.java
│   │ ├── GreetingInterest.java
│   │ ├── GreetingRepository.java
│   │ ├── Name.java
│   │ └── Salutation.java
│   └── port.adapter
│   ├── persistence
│   │   ├── GreetingTable.java
│   │   ├── HibernateGreetingRepository.java
│   │   └── JpaGreetingRepository.java
│   └── web
│   └── WebController.java
└── resources
├── application.properties
├── static
└── templates
└── home.html
├── java
│   └── de.neuland.xpdemo
│   ├── XpdemoApplication.java
│   ├── application
│   │   ├── GreetingApplicationService.java
│   │   └── GreetingData.java
│   ├── domain.model
│   │  ├── Greeting.java
│   │ ├── GreetingInterest.java
│   │ ├── GreetingRepository.java
│   │ ├── Name.java
│   │ └── Salutation.java
│   └── port.adapter
│   ├── persistence
│   │   ├── GreetingTable.java
│   │   ├── HibernateGreetingRepository.java
│   │   └── JpaGreetingRepository.java
│   └── web
│   └── WebController.java
└── resources
├── application.properties
├── static
└── templates
└── home.html
@Service
public class GreetingApplicationService {
@Autowired
private GreetingRepository repository;
public GreetingData welcomePeople() {
Greeting greeting = repository.firstGreeting();
GreetingData greetingData = new GreetingData(greeting);
return greetingData;
}
}
@Service
public class GreetingApplicationService {
@Autowired
private GreetingRepository repository;
public GreetingData welcomePeople() {
Greeting greeting = repository.firstGreeting();
GreetingData greetingData = new GreetingData(greeting);
return greetingData;
}
}
@Service
public class GreetingApplicationService {
@Autowired
private GreetingRepository repository;
public GreetingData welcomePeople() {
Greeting greeting = repository.firstGreeting();
GreetingData greetingData = new GreetingData(greeting);
return greetingData;
}
}
├── java
│   └── de.neuland.xpdemo
│   ├── XpdemoApplication.java
│   ├── application
│   │   ├── GreetingApplicationService.java
│   │   └── GreetingData.java
│   ├── domain.model
│   │  ├── Greeting.java
│   │ ├── GreetingInterest.java
│   │ ├── GreetingRepository.java
│   │ ├── Name.java
│   │ └── Salutation.java
│   └── port.adapter
│   ├── persistence
│   │   ├── GreetingTable.java
│   │   ├── HibernateGreetingRepository.java
│   │   └── JpaGreetingRepository.java
│   └── web
│   └── WebController.java
└── resources
├── application.properties
├── static
└── templates
└── home.html
├── java
│   └── de.neuland.xpdemo
│   ├── XpdemoApplication.java
│   ├── application
│   │   ├── GreetingApplicationService.java
│   │   └── GreetingData.java
│   ├── domain.model
│   │  ├── Greeting.java
│   │ ├── GreetingInterest.java
│   │ ├── GreetingRepository.java
│   │ ├── Name.java
│   │ └── Salutation.java
│   └── port.adapter
│   ├── persistence
│   │   ├── GreetingTable.java
│   │   ├── HibernateGreetingRepository.java
│   │   └── JpaGreetingRepository.java
│   └── web
│   └── WebController.java
└── resources
├── application.properties
├── static
└── templates
└── home.html
@Repository
public class JpaGreetingRepository implements GreetingRepository {
@Autowired
private HibernateGreetingRepository hibernateGreetingRepository;
@Override
public Greeting firstGreeting() {
Iterable<GreetingTable> rows = hibernateGreetingRepository.findAll();
GreetingTable r = rows.iterator().next();
Greeting greeting = new Greeting(
new Salutation(r.getSalutation()),
new Name(r.getName()));
return greeting;
}
}
@Repository
public class JpaGreetingRepository implements GreetingRepository {
@Autowired
private HibernateGreetingRepository hibernateGreetingRepository;
@Override
public Greeting firstGreeting() {
Iterable<GreetingTable> rows = hibernateGreetingRepository.findAll();
GreetingTable r = rows.iterator().next();
Greeting greeting = new Greeting(
new Salutation(r.getSalutation()),
new Name(r.getName()));
return greeting;
}
}
@Repository
public class JpaGreetingRepository implements GreetingRepository {
@Autowired
private HibernateGreetingRepository hibernateGreetingRepository;
@Override
public Greeting firstGreeting() {
Iterable<GreetingTable> rows = hibernateGreetingRepository.findAll();
GreetingTable r = rows.iterator().next();
Greeting greeting = new Greeting(
new Salutation(r.getSalutation()),
new Name(r.getName()));
return greeting;
}
}
├── java
│   └── de.neuland.xpdemo
│   ├── XpdemoApplication.java
│   ├── application
│   │   ├── GreetingApplicationService.java
│   │   └── GreetingData.java
│   ├── domain.model
│   │  ├── Greeting.java
│   │ ├── GreetingInterest.java
│   │ ├── GreetingRepository.java
│   │ ├── Name.java
│   │ └── Salutation.java
│   └── port.adapter
│   ├── persistence
│   │   ├── GreetingTable.java
│   │   ├── HibernateGreetingRepository.java
│   │   └── JpaGreetingRepository.java
│   └── web
│   └── WebController.java
└── resources
├── application.properties
├── static
└── templates
└── home.html
├── java
│   └── de.neuland.xpdemo
│   ├── XpdemoApplication.java
│   ├── application
│   │   ├── GreetingApplicationService.java
│   │   └── GreetingData.java
│   ├── domain.model
│   │  ├── Greeting.java
│   │ ├── GreetingInterest.java
│   │ ├── GreetingRepository.java
│   │ ├── Name.java
│   │ └── Salutation.java
│   └── port.adapter
│   ├── persistence
│   │   ├── GreetingTable.java
│   │   ├── HibernateGreetingRepository.java
│   │   └── JpaGreetingRepository.java
│   └── web
│   └── WebController.java
└── resources
├── application.properties
├── static
└── templates
└── home.html
├── java
│   └── de.neuland.xpdemo
│   ├── XpdemoApplication.java
│   ├── application
│   │   ├── GreetingApplicationService.java
│   │   └── GreetingData.java
│   ├── domain.model
│   │  ├── Greeting.java
│   │ ├── GreetingInterest.java
│   │ ├── GreetingRepository.java
│   │ ├── Name.java
│   │ └── Salutation.java
│   └── port.adapter
│   ├── persistence
│   │   ├── GreetingTable.java
│   │   ├── HibernateGreetingRepository.java
│   │   └── JpaGreetingRepository.java
│   └── web
│   └── WebController.java
└── resources
├── application.properties
├── static
└── templates
└── home.html
├── java
│   └── de.neuland.xpdemo
│   ├── XpdemoApplication.java
│   ├── application
│   │   ├── GreetingApplicationService.java
│   │   └── GreetingData.java
│   ├── domain.model
│   │  ├── Greeting.java
│   │ ├── GreetingInterest.java
│   │ ├── GreetingRepository.java
│   │ ├── Name.java
│   │ └── Salutation.java
│   └── port.adapter
│   ├── persistence
│   │   ├── GreetingTable.java
│   │   ├── HibernateGreetingRepository.java
│   │   └── JpaGreetingRepository.java
│   └── web
│   └── WebController.java
└── resources
├── application.properties
├── static
└── templates
└── home.html
@SpringBootApplication
@EnableAutoConfiguration
public class XpdemoApplication {
	 public static void main(String[] args) {
	 	 SpringApplication.run(XpdemoApplication.class, args);
	 }
}
@SpringBootApplication
@EnableAutoConfiguration
public class XpdemoApplication {
	 public static void main(String[] args) {
	 	 SpringApplication.run(XpdemoApplication.class, args);
	 }
}
├── java
│   └── de.neuland.xpdemo
│   ├── XpdemoApplication.java
│   ├── application
│   │   ├── GreetingApplicationService.java
│   │   └── GreetingData.java
│   ├── domain.model
│   │  ├── Greeting.java
│   │ ├── GreetingInterest.java
│   │ ├── GreetingRepository.java
│   │ ├── Name.java
│   │ └── Salutation.java
│   └── port.adapter
│   ├── persistence
│   │   ├── GreetingTable.java
│   │   ├── HibernateGreetingRepository.java
│   │   └── JpaGreetingRepository.java
│   └── web
│   └── WebController.java
└── resources
├── application.properties
├── static
└── templates
└── home.html
„Erkennung, Behandlung und Prävention

von Infektionskrankheiten“
P R Ä V E N T I O N
Bedside-Test your Code!
Quasar® AT0
Anti-TAnti-A
F R A G E N ?
Q U E L L E N
https://www.flickr.com/photos/23967095@N00/
Vaughn Vernon, Implementing Domain Driven Design
Johannes Siedersleben, Moderne Softwarearchitektur
http://www.laputan.org/mud/
1 of 82

Recommended

Auto, Maschine, Buch by
Auto, Maschine, BuchAuto, Maschine, Buch
Auto, Maschine, BuchJens Himmelreich
298 views70 slides
kundenorientierte vertikalisierung by
kundenorientierte vertikalisierungkundenorientierte vertikalisierung
kundenorientierte vertikalisierungJens Himmelreich
736 views63 slides
ConwaysLawRevisited by
ConwaysLawRevisitedConwaysLawRevisited
ConwaysLawRevisitedJens Himmelreich
1.2K views105 slides
Schnittmuster by
SchnittmusterSchnittmuster
SchnittmusterJens Himmelreich
1.1K views84 slides
Der pathologische Programmierer (revised edition) by
Der pathologische Programmierer (revised edition)Der pathologische Programmierer (revised edition)
Der pathologische Programmierer (revised edition)Jens Himmelreich
1.9K views66 slides
Der pathologische Programmierer by
Der pathologische ProgrammiererDer pathologische Programmierer
Der pathologische ProgrammiererJens Himmelreich
601 views55 slides

More Related Content

More from Jens Himmelreich

Das agile Ich (extended version) by
Das agile Ich (extended version)Das agile Ich (extended version)
Das agile Ich (extended version)Jens Himmelreich
1.5K views70 slides
Agile Softwareentwicklung nach Winston Royce by
Agile Softwareentwicklung nach Winston RoyceAgile Softwareentwicklung nach Winston Royce
Agile Softwareentwicklung nach Winston RoyceJens Himmelreich
1.2K views148 slides
Das Leben als Projekt by
Das Leben als ProjektDas Leben als Projekt
Das Leben als ProjektJens Himmelreich
1.1K views46 slides
Agilität und Mikropolitik by
Agilität und MikropolitikAgilität und Mikropolitik
Agilität und MikropolitikJens Himmelreich
628 views69 slides
Muster in Webcontrollern by
Muster in WebcontrollernMuster in Webcontrollern
Muster in WebcontrollernJens Himmelreich
533 views78 slides
Fremde Domänen verstehen - eine philosophische Randnotiz by
Fremde Domänen verstehen - eine philosophische RandnotizFremde Domänen verstehen - eine philosophische Randnotiz
Fremde Domänen verstehen - eine philosophische RandnotizJens Himmelreich
559 views75 slides

More from Jens Himmelreich(8)

Software-Hygiene

  • 1. S O F T W A R E 
 H Y G I E N E X P D A Y S S T U T T G A R T 2 0 1 7
  • 2. oder was man von Blutgruppen über die Strukturierung von Software lernen kann
  • 3. sven bange jens himmelreich N E U L A N D - B Ü R O F Ü R I N F O R M A T I K
  • 10. Werte
  • 12. Werte und Muster werden global kommuniziert und machen lokal handlungsfähig.
  • 13. Big Ball of Mud
  • 15. 1 8 4 8 Ignaz Semmelweis
  • 16. „Erkennung, Behandlung und Prävention
 von Infektionskrankheiten“ H Y G I E N E
  • 17. „Erkennung, Behandlung und Prävention
 von Infektionskrankheiten“ E R K E N N U N G
  • 25. Big Ball of Mud
  • 27. „Software, die sich unterschiedlich schnell ändert, wird in unterschiedliche Module aufgeteilt.“ David Parnas
  • 33. Big Ball of Mud A T AT0
  • 38. „Erkennung, Behandlung und Prävention
 von Infektionskrankheiten“ H Y G I E N E
  • 39. „Erkennung, Behandlung und Prävention
 von Infektionskrankheiten“ B E H A N D L U N G
  • 41. Domain Driven Design Eric Evans, Vaughn Vernon
  • 43. II. A-Software ∙ T-Software
  • 50. A-Software WebController AppService Aggregate Repository EntityValueObject DomainServiceDomainEvent RepositoryImpl WebRequest Port and Adapter Application Domain JDBCObject Aggregate Repository EntityValueObject DomainServiceDomainEvent
  • 53. B E I S P I E L
  • 54. ├── java │   └── de.neuland.xpdemo │   ├── XpdemoApplication.java │   ├── application │   │   ├── GreetingApplicationService.java │   │   └── GreetingData.java │   ├── domain.model │   │  ├── Greeting.java │   │ ├── GreetingInterest.java │   │ ├── GreetingRepository.java │   │ ├── Name.java │   │ └── Salutation.java │   └── port.adapter │   ├── persistence │   │   ├── GreetingTable.java │   │   ├── HibernateGreetingRepository.java │   │   └── JpaGreetingRepository.java │   └── web │   └── WebController.java └── resources ├── application.properties ├── static └── templates └── home.html
  • 55. ├── java │   └── de.neuland.xpdemo │   ├── XpdemoApplication.java │   ├── application │   │   ├── GreetingApplicationService.java │   │   └── GreetingData.java │   ├── domain.model │   │  ├── Greeting.java │   │ ├── GreetingInterest.java │   │ ├── GreetingRepository.java │   │ ├── Name.java │   │ └── Salutation.java │   └── port.adapter │   ├── persistence │   │   ├── GreetingTable.java │   │   ├── HibernateGreetingRepository.java │   │   └── JpaGreetingRepository.java │   └── web │   └── WebController.java └── resources ├── application.properties ├── static └── templates └── home.html
  • 56. ├── java │   └── de.neuland.xpdemo │   ├── XpdemoApplication.java │   ├── application │   │   ├── GreetingApplicationService.java │   │   └── GreetingData.java │   ├── domain.model │   │  ├── Greeting.java │   │ ├── GreetingInterest.java │   │ ├── GreetingRepository.java │   │ ├── Name.java │   │ └── Salutation.java │   └── port.adapter │   ├── persistence │   │   ├── GreetingTable.java │   │   ├── HibernateGreetingRepository.java │   │   └── JpaGreetingRepository.java │   └── web │   └── WebController.java └── resources ├── application.properties ├── static └── templates └── home.html
  • 57. ├── java │   └── de.neuland.xpdemo │   ├── XpdemoApplication.java │   ├── application │   │   ├── GreetingApplicationService.java │   │   └── GreetingData.java │   ├── domain.model │   │  ├── Greeting.java │   │ ├── GreetingInterest.java │   │ ├── GreetingRepository.java │   │ ├── Name.java │   │ └── Salutation.java │   └── port.adapter │   ├── persistence │   │   ├── GreetingTable.java │   │   ├── HibernateGreetingRepository.java │   │   └── JpaGreetingRepository.java │   └── web │   └── WebController.java └── resources ├── application.properties ├── static └── templates └── home.html
  • 58. @Controller public class WebController { @Autowired private GreetingApplicationService greetingApplicationService; @RequestMapping("/") public String home(Model model) { GreetingData greeting = greetingApplicationService.welcomePeople(); model.addAttribute("salutation", greeting.getSalutation()); model.addAttribute("name", greeting.getName()); return "home"; } }
  • 59. @Controller public class WebController { @Autowired private GreetingApplicationService greetingApplicationService; @RequestMapping("/") public String home(Model model) { GreetingData greeting = greetingApplicationService.welcomePeople(); model.addAttribute("salutation", greeting.getSalutation()); model.addAttribute("name", greeting.getName()); return "home"; } }
  • 60. @Controller public class WebController { @Autowired private GreetingApplicationService greetingApplicationService; @RequestMapping("/") public String home(Model model) { GreetingData greeting = greetingApplicationService.welcomePeople(); model.addAttribute("salutation", greeting.getSalutation()); model.addAttribute("name", greeting.getName()); return "home"; } }
  • 61. @Controller public class WebController { @Autowired private GreetingApplicationService greetingApplicationService; @RequestMapping("/") public String home(Model model) { GreetingData greeting = greetingApplicationService.welcomePeople(); model.addAttribute("salutation", greeting.getSalutation()); model.addAttribute("name", greeting.getName()); return "home"; } }
  • 62. ├── java │   └── de.neuland.xpdemo │   ├── XpdemoApplication.java │   ├── application │   │   ├── GreetingApplicationService.java │   │   └── GreetingData.java │   ├── domain.model │   │  ├── Greeting.java │   │ ├── GreetingInterest.java │   │ ├── GreetingRepository.java │   │ ├── Name.java │   │ └── Salutation.java │   └── port.adapter │   ├── persistence │   │   ├── GreetingTable.java │   │   ├── HibernateGreetingRepository.java │   │   └── JpaGreetingRepository.java │   └── web │   └── WebController.java └── resources ├── application.properties ├── static └── templates └── home.html
  • 63. ├── java │   └── de.neuland.xpdemo │   ├── XpdemoApplication.java │   ├── application │   │   ├── GreetingApplicationService.java │   │   └── GreetingData.java │   ├── domain.model │   │  ├── Greeting.java │   │ ├── GreetingInterest.java │   │ ├── GreetingRepository.java │   │ ├── Name.java │   │ └── Salutation.java │   └── port.adapter │   ├── persistence │   │   ├── GreetingTable.java │   │   ├── HibernateGreetingRepository.java │   │   └── JpaGreetingRepository.java │   └── web │   └── WebController.java └── resources ├── application.properties ├── static └── templates └── home.html
  • 64. @Service public class GreetingApplicationService { @Autowired private GreetingRepository repository; public GreetingData welcomePeople() { Greeting greeting = repository.firstGreeting(); GreetingData greetingData = new GreetingData(greeting); return greetingData; } }
  • 65. @Service public class GreetingApplicationService { @Autowired private GreetingRepository repository; public GreetingData welcomePeople() { Greeting greeting = repository.firstGreeting(); GreetingData greetingData = new GreetingData(greeting); return greetingData; } }
  • 66. @Service public class GreetingApplicationService { @Autowired private GreetingRepository repository; public GreetingData welcomePeople() { Greeting greeting = repository.firstGreeting(); GreetingData greetingData = new GreetingData(greeting); return greetingData; } }
  • 67. ├── java │   └── de.neuland.xpdemo │   ├── XpdemoApplication.java │   ├── application │   │   ├── GreetingApplicationService.java │   │   └── GreetingData.java │   ├── domain.model │   │  ├── Greeting.java │   │ ├── GreetingInterest.java │   │ ├── GreetingRepository.java │   │ ├── Name.java │   │ └── Salutation.java │   └── port.adapter │   ├── persistence │   │   ├── GreetingTable.java │   │   ├── HibernateGreetingRepository.java │   │   └── JpaGreetingRepository.java │   └── web │   └── WebController.java └── resources ├── application.properties ├── static └── templates └── home.html
  • 68. ├── java │   └── de.neuland.xpdemo │   ├── XpdemoApplication.java │   ├── application │   │   ├── GreetingApplicationService.java │   │   └── GreetingData.java │   ├── domain.model │   │  ├── Greeting.java │   │ ├── GreetingInterest.java │   │ ├── GreetingRepository.java │   │ ├── Name.java │   │ └── Salutation.java │   └── port.adapter │   ├── persistence │   │   ├── GreetingTable.java │   │   ├── HibernateGreetingRepository.java │   │   └── JpaGreetingRepository.java │   └── web │   └── WebController.java └── resources ├── application.properties ├── static └── templates └── home.html
  • 69. @Repository public class JpaGreetingRepository implements GreetingRepository { @Autowired private HibernateGreetingRepository hibernateGreetingRepository; @Override public Greeting firstGreeting() { Iterable<GreetingTable> rows = hibernateGreetingRepository.findAll(); GreetingTable r = rows.iterator().next(); Greeting greeting = new Greeting( new Salutation(r.getSalutation()), new Name(r.getName())); return greeting; } }
  • 70. @Repository public class JpaGreetingRepository implements GreetingRepository { @Autowired private HibernateGreetingRepository hibernateGreetingRepository; @Override public Greeting firstGreeting() { Iterable<GreetingTable> rows = hibernateGreetingRepository.findAll(); GreetingTable r = rows.iterator().next(); Greeting greeting = new Greeting( new Salutation(r.getSalutation()), new Name(r.getName())); return greeting; } }
  • 71. @Repository public class JpaGreetingRepository implements GreetingRepository { @Autowired private HibernateGreetingRepository hibernateGreetingRepository; @Override public Greeting firstGreeting() { Iterable<GreetingTable> rows = hibernateGreetingRepository.findAll(); GreetingTable r = rows.iterator().next(); Greeting greeting = new Greeting( new Salutation(r.getSalutation()), new Name(r.getName())); return greeting; } }
  • 72. ├── java │   └── de.neuland.xpdemo │   ├── XpdemoApplication.java │   ├── application │   │   ├── GreetingApplicationService.java │   │   └── GreetingData.java │   ├── domain.model │   │  ├── Greeting.java │   │ ├── GreetingInterest.java │   │ ├── GreetingRepository.java │   │ ├── Name.java │   │ └── Salutation.java │   └── port.adapter │   ├── persistence │   │   ├── GreetingTable.java │   │   ├── HibernateGreetingRepository.java │   │   └── JpaGreetingRepository.java │   └── web │   └── WebController.java └── resources ├── application.properties ├── static └── templates └── home.html
  • 73. ├── java │   └── de.neuland.xpdemo │   ├── XpdemoApplication.java │   ├── application │   │   ├── GreetingApplicationService.java │   │   └── GreetingData.java │   ├── domain.model │   │  ├── Greeting.java │   │ ├── GreetingInterest.java │   │ ├── GreetingRepository.java │   │ ├── Name.java │   │ └── Salutation.java │   └── port.adapter │   ├── persistence │   │   ├── GreetingTable.java │   │   ├── HibernateGreetingRepository.java │   │   └── JpaGreetingRepository.java │   └── web │   └── WebController.java └── resources ├── application.properties ├── static └── templates └── home.html
  • 74. ├── java │   └── de.neuland.xpdemo │   ├── XpdemoApplication.java │   ├── application │   │   ├── GreetingApplicationService.java │   │   └── GreetingData.java │   ├── domain.model │   │  ├── Greeting.java │   │ ├── GreetingInterest.java │   │ ├── GreetingRepository.java │   │ ├── Name.java │   │ └── Salutation.java │   └── port.adapter │   ├── persistence │   │   ├── GreetingTable.java │   │   ├── HibernateGreetingRepository.java │   │   └── JpaGreetingRepository.java │   └── web │   └── WebController.java └── resources ├── application.properties ├── static └── templates └── home.html
  • 75. ├── java │   └── de.neuland.xpdemo │   ├── XpdemoApplication.java │   ├── application │   │   ├── GreetingApplicationService.java │   │   └── GreetingData.java │   ├── domain.model │   │  ├── Greeting.java │   │ ├── GreetingInterest.java │   │ ├── GreetingRepository.java │   │ ├── Name.java │   │ └── Salutation.java │   └── port.adapter │   ├── persistence │   │   ├── GreetingTable.java │   │   ├── HibernateGreetingRepository.java │   │   └── JpaGreetingRepository.java │   └── web │   └── WebController.java └── resources ├── application.properties ├── static └── templates └── home.html
  • 76. @SpringBootApplication @EnableAutoConfiguration public class XpdemoApplication { public static void main(String[] args) { SpringApplication.run(XpdemoApplication.class, args); } }
  • 77. @SpringBootApplication @EnableAutoConfiguration public class XpdemoApplication { public static void main(String[] args) { SpringApplication.run(XpdemoApplication.class, args); } }
  • 78. ├── java │   └── de.neuland.xpdemo │   ├── XpdemoApplication.java │   ├── application │   │   ├── GreetingApplicationService.java │   │   └── GreetingData.java │   ├── domain.model │   │  ├── Greeting.java │   │ ├── GreetingInterest.java │   │ ├── GreetingRepository.java │   │ ├── Name.java │   │ └── Salutation.java │   └── port.adapter │   ├── persistence │   │   ├── GreetingTable.java │   │   ├── HibernateGreetingRepository.java │   │   └── JpaGreetingRepository.java │   └── web │   └── WebController.java └── resources ├── application.properties ├── static └── templates └── home.html
  • 79. „Erkennung, Behandlung und Prävention
 von Infektionskrankheiten“ P R Ä V E N T I O N
  • 81. F R A G E N ?
  • 82. Q U E L L E N https://www.flickr.com/photos/23967095@N00/ Vaughn Vernon, Implementing Domain Driven Design Johannes Siedersleben, Moderne Softwarearchitektur http://www.laputan.org/mud/