whoops where did my architecture go
play

Whoops! Where did my architecture go? Approaches to architecture - PowerPoint PPT Presentation

Whoops! Where did my architecture go? Approaches to architecture management for Java and Spring applications Oliver Gierke Oliver Gierke SpringSource Engineer Spring Data ogierke@vmware.com olivergierke www.olivergierke.de Background 5


  1. Whoops! Where did my architecture go? Approaches to architecture management for Java and Spring applications Oliver Gierke

  2. Oliver Gierke SpringSource Engineer Spring Data ogierke@vmware.com olivergierke www.olivergierke.de

  3. Background 5 years of consulting Lots of code reviews Eoin Woods‘ talk on InfoQ

  4. " If you think architecture is expensive, try no architecture.

  5. Macro VS. Micro Architecture

  6. Macro VS. Micro Architecture

  7. Sample Code http:/ /github.com/olivergierke/ whoops-architecture

  8. Roadmap Divide and conquer Of layers and slices A plain Java based approach

  9. Architecture 101

  10. Know your dependencies

  11. Explicit / Visible dependencies

  12. Granularity Modules Layers Vertical slices Subsystems

  13. Granularity Java ARchive Package Class

  14. Divide and conquer

  15. Component

  16. Component Single unit to understand

  17. Component Single unit to change

  18. Component Scope of risk of change

  19. A B

  20. A B

  21. A B Cost of separation

  22. A B Definition and maintenance of dependencies

  23. A B Smaller unit to understand

  24. A B Reduced risk of change

  25. Of layers and slices…

  26. Presentation Service Data Access

  27. Presentation Service Data Access

  28. Presentation Service Data Access

  29. Account Customer Core Presentation Service Data Access

  30. Account Customer Core Presentation Service Data Access

  31. Account Customer Core Presentation Service Data Access

  32. Layers Well understood Known to developers Less important to business

  33. Slices Hardly understood New to developers Key for business req

  34. Account Customer Core Presentation Service Data Access

  35. " How to implement an architecture inside a codebase?

  36. Architecture VS. Codebase

  37. " How to implement an architecture inside a codebase?

  38. " How to implement an architecture inside a codebase?

  39. " How to maintain an architecture inside a codebase?

  40. Code analysis JDepend Sonar

  41. Demo

  42. Sonargraph Formerly known as SonarJ

  43. Demo

  44. A plain Java based approach

  45. " How far can we get with plain Java means only?

  46. Account Customer Core Presentation Service Data Access

  47. Packages

  48. ….layer.slice ….slice.layer ….slice

  49. ….web.core ….service.core ….repository.core

  50. ….core.web ….core.service ….core.repository

  51. ….core ….customer ….account

  52. " Why the f#$k should I even care?

  53. " Does it make a di ff erence?

  54. Dependency management

  55. " You only need to manage, what you can refer to…

  56. Layers first Leaks slice internals Lower layers visible to everyone

  57. Slices first/only Start with package per slice Expose interfaces and domain types Keep implementations private

  58. Slices first/only Encapsulates business module Internals understood anyway

  59. " Start with less packages and the least visibility possible…

  60. Account Customer Core Presentation Service Data Access

  61. Account Customer Core Presentation Service Data Access

  62. Demo

  63. Take-aways Know your dependencies On every granularity Start as strict as possible Get lenient where necessary

  64. Resources Spring Data JPA @ GitHub Sonargraph Blogpost

  65. Thanks & credits Eoin Woods - Talk @ InfoQ Uwe Friedrichsen - Slides @ Slideshare

Recommend


More recommend