Slide 1

Slide 1 text

Architecture decisions and their impact

Slide 2

Slide 2 text

Architecture decisions and their impact Denis Brumann @dbrumann 3 Denis Brumann @dbrumann Solutions Architect Maintainer of Deptrac

Slide 3

Slide 3 text

Architecture decisions and their impact Denis Brumann @dbrumann 4

Slide 4

Slide 4 text

Architecture decisions and their impact Denis Brumann @dbrumann 4

Slide 5

Slide 5 text

Architecture decisions and their impact Denis Brumann @dbrumann 5 Code Project Structure Service Landscape Interactive Runtimes

Slide 6

Slide 6 text

Architecture decisions and their impact Denis Brumann @dbrumann 7

Slide 7

Slide 7 text

Architecture decisions and their impact Denis Brumann @dbrumann 8 Application Analyse Command Analyser

Slide 8

Slide 8 text

Architecture decisions and their impact Denis Brumann @dbrumann 9 Application Ana Com Service Container Service Service Service Service Service Service Service

Slide 9

Slide 9 text

Architecture decisions and their impact Denis Brumann @dbrumann 10 Analyse Command Ana Read arguments/options

Slide 10

Slide 10 text

Architecture decisions and their impact Denis Brumann @dbrumann 11 Analyser

Slide 11

Slide 11 text

Architecture decisions and their impact Denis Brumann @dbrumann 13 Application Analyse Command Analyser Service Container Service Service Service Service Service Service Service Read arguments/ options

Slide 12

Slide 12 text

Architecture decisions and their impact Denis Brumann @dbrumann 14 Application Analyse Command Analyser Service Container Service Service Service Service Service Service Service Read arguments/ options Service

Slide 13

Slide 13 text

Architecture decisions and their impact Denis Brumann @dbrumann 15 https://my-app.com/ MyApp DB MyApp https://foo.my-app.com/ https://bar.my-app.com/

Slide 14

Slide 14 text

Architecture decisions and their impact Denis Brumann @dbrumann 16 https://foo.my-app.com/ Bar DB MyApp Foo DB https://bar.my-app.com/

Slide 15

Slide 15 text

Architecture decisions and their impact Denis Brumann @dbrumann 17 https://foo.my-app.com/ Bar DB MyApp Foo DB https://bar.my-app.com/ Tenant-Aware Multi-Portal

Slide 16

Slide 16 text

Architecture decisions and their impact Denis Brumann @dbrumann 18 Possible Problems Runtime errors (invalid context, misconfigured services) Debugging is more difficult (which service/config was used?) Tighter coupling & more complexity !

Slide 17

Slide 17 text

Architecture decisions and their impact Denis Brumann @dbrumann 19

Slide 18

Slide 18 text

Architecture decisions and their impact Denis Brumann @dbrumann 20

Slide 19

Slide 19 text

Architecture decisions and their impact Denis Brumann @dbrumann 20

Slide 20

Slide 20 text

Architecture decisions and their impact Denis Brumann @dbrumann 21 Warning Signs Services creating other services (usage of new in code) Service Locator or factory-usage Config-objects (or arrays) being passed through "

Slide 21

Slide 21 text

Architecture decisions and their impact Denis Brumann @dbrumann 22

Slide 22

Slide 22 text

Architecture decisions and their impact Denis Brumann @dbrumann 23 Lesson Avoid creating/configuring services at runtime * consider pushing the runtime context into the infrastructure layer #

Slide 23

Slide 23 text

Architecture decisions and their impact Denis Brumann @dbrumann 24 Code Project Structure Service Landscape Interactive Runtimes Isolate Layers

Slide 24

Slide 24 text

Architecture decisions and their impact Denis Brumann @dbrumann 26 Persistence Layer Domain Layer Application Layer Presentation Layer

Slide 25

Slide 25 text

Architecture decisions and their impact Denis Brumann @dbrumann 28 Persistence Layer Domain Layer Application Layer Presentation Layer Request

Slide 26

Slide 26 text

Architecture decisions and their impact Denis Brumann @dbrumann 29 Persistence Layer Domain Layer Application Layer Presentation Layer Entity

Slide 27

Slide 27 text

Architecture decisions and their impact Denis Brumann @dbrumann 31 Persistence Layer Domain Layer Application Layer Presentation Layer Response

Slide 28

Slide 28 text

Architecture decisions and their impact Denis Brumann @dbrumann 32 What if Entity or API changes?

Slide 29

Slide 29 text

Architecture decisions and their impact Denis Brumann @dbrumann 33 Persistence Layer Domain Layer Application Layer Presentation Layer Request

Slide 30

Slide 30 text

Architecture decisions and their impact Denis Brumann @dbrumann 33 Persistence Layer Domain Layer Application Layer Presentation Layer DTO

Slide 31

Slide 31 text

Architecture decisions and their impact Denis Brumann @dbrumann 33 Persistence Layer Domain Layer Application Layer Presentation Layer Entity

Slide 32

Slide 32 text

Architecture decisions and their impact Denis Brumann @dbrumann 34 Persistence Layer Domain Layer Application Layer Presentation Layer DTO

Slide 33

Slide 33 text

Architecture decisions and their impact Denis Brumann @dbrumann 34 Persistence Layer Domain Layer Application Layer Presentation Layer Response

Slide 34

Slide 34 text

Architecture decisions and their impact Denis Brumann @dbrumann 35 Domain Model is tied to DTO

Slide 35

Slide 35 text

Architecture decisions and their impact Denis Brumann @dbrumann 36 Persistence Layer Domain Layer Application Layer Presentation Layer Entity Model Request / Response (Input / Output) DTO

Slide 36

Slide 36 text

Architecture decisions and their impact Denis Brumann @dbrumann 37 Possible Problems ! Mapping between objects can become annoying More code/duplication “Wrong” layers add complexity

Slide 37

Slide 37 text

Architecture decisions and their impact Denis Brumann @dbrumann 38 Possible Benefits $ Easier extraction of components Switching dependencies is easier Refactoring is more contained

Slide 38

Slide 38 text

Architecture decisions and their impact Denis Brumann @dbrumann 39

Slide 39

Slide 39 text

Architecture decisions and their impact Denis Brumann @dbrumann 40 Output Formatting (Dependency) Analysis Layer Resolving Dependency Resolving AST Parsing Input Collection

Slide 40

Slide 40 text

Architecture decisions and their impact Denis Brumann @dbrumann 41

Slide 41

Slide 41 text

Architecture decisions and their impact Denis Brumann @dbrumann 41

Slide 42

Slide 42 text

Architecture decisions and their impact Denis Brumann @dbrumann 41

Slide 43

Slide 43 text

Architecture decisions and their impact Denis Brumann @dbrumann 42 nikic/php-parser is only used here

Slide 44

Slide 44 text

Architecture decisions and their impact Denis Brumann @dbrumann 42 nikic/php-parser is only used here Deptrac’s own data structure

Slide 45

Slide 45 text

Architecture decisions and their impact Denis Brumann @dbrumann 43

Slide 46

Slide 46 text

Architecture decisions and their impact Denis Brumann @dbrumann 44

Slide 47

Slide 47 text

Architecture decisions and their impact Denis Brumann @dbrumann 45 No longer contains dependency-references

Slide 48

Slide 48 text

Architecture decisions and their impact Denis Brumann @dbrumann 46

Slide 49

Slide 49 text

Architecture decisions and their impact Denis Brumann @dbrumann 47

Slide 50

Slide 50 text

Architecture decisions and their impact Denis Brumann @dbrumann 48

Slide 51

Slide 51 text

Architecture decisions and their impact Denis Brumann @dbrumann 49

Slide 52

Slide 52 text

Architecture decisions and their impact Denis Brumann @dbrumann 50 Lesson Isolating layers (and their data!) helps contain changes and makes switching out parts easier #

Slide 53

Slide 53 text

Architecture decisions and their impact Denis Brumann @dbrumann 51

Slide 54

Slide 54 text

Architecture decisions and their impact Denis Brumann @dbrumann 52 Questions ❔

Slide 55

Slide 55 text

Architecture decisions and their impact Denis Brumann @dbrumann 53 Thank You Have a great conference