Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Architecture decisions and their impact

Architecture decisions and their impact

Architectural decisions, whether made intentionally or incidental, can have a huge impact on your day to day work. They can make changes more difficult, slow things down or make it harder to onboard new people. While there are quite a few talks on architecture patterns you rarely see real life examples. Luckily, open source projects are great for this. You can see the history and both the changes and discussions around them. So, let's do just that.

Denis Brumann

May 27, 2023
Tweet

More Decks by Denis Brumann

Other Decks in Programming

Transcript

  1. Architecture decisions and their impact Denis Brumann @dbrumann 3 Denis

    Brumann @dbrumann Solutions Architect Maintainer of Deptrac
  2. Architecture decisions and their impact Denis Brumann @dbrumann 5 Code

    Project Structure Service Landscape Interactive Runtimes
  3. Architecture decisions and their impact Denis Brumann @dbrumann 9 Application

    Ana Com Service Container Service Service Service Service Service Service Service
  4. 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
  5. 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
  6. 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/
  7. 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
  8. 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 !
  9. 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 "
  10. 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 #
  11. Architecture decisions and their impact Denis Brumann @dbrumann 24 Code

    Project Structure Service Landscape Interactive Runtimes Isolate Layers
  12. Architecture decisions and their impact Denis Brumann @dbrumann 26 Persistence

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

    Layer Domain Layer Application Layer Presentation Layer Request
  14. Architecture decisions and their impact Denis Brumann @dbrumann 29 Persistence

    Layer Domain Layer Application Layer Presentation Layer Entity
  15. Architecture decisions and their impact Denis Brumann @dbrumann 31 Persistence

    Layer Domain Layer Application Layer Presentation Layer Response
  16. Architecture decisions and their impact Denis Brumann @dbrumann 33 Persistence

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

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

    Layer Domain Layer Application Layer Presentation Layer Entity
  19. Architecture decisions and their impact Denis Brumann @dbrumann 34 Persistence

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

    Layer Domain Layer Application Layer Presentation Layer Response
  21. Architecture decisions and their impact Denis Brumann @dbrumann 36 Persistence

    Layer Domain Layer Application Layer Presentation Layer Entity Model Request / Response (Input / Output) DTO
  22. Architecture decisions and their impact Denis Brumann @dbrumann 37 Possible

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

    Benefits $ Easier extraction of components Switching dependencies is easier Refactoring is more contained
  24. Architecture decisions and their impact Denis Brumann @dbrumann 40 Output

    Formatting (Dependency) Analysis Layer Resolving Dependency Resolving AST Parsing Input Collection
  25. Architecture decisions and their impact Denis Brumann @dbrumann 50 Lesson

    Isolating layers (and their data!) helps contain changes and makes switching out parts easier #