Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Whoops! Where Did My Architecture Go?
Search
Oliver Drotbohm
April 05, 2013
Programming
2
360
Whoops! Where Did My Architecture Go?
Slides of my talk at BEDCon 2013 in Berlin, Germany.
Oliver Drotbohm
April 05, 2013
Tweet
Share
More Decks by Oliver Drotbohm
See All by Oliver Drotbohm
Spring Modulith – A Deep Dive
olivergierke
7
1.9k
Spring for the Architecturally Curious Developer
olivergierke
5
1.6k
Spring Boot 3 & Spring Framework 6
olivergierke
4
1.8k
Architecturally-evident Java Applications with jMolecules
olivergierke
8
2.4k
A Deep Dive into Spring Application Events
olivergierke
12
2.9k
Building Better Monoliths – Modulithic Applications with Spring Boot
olivergierke
4
830
Spring HATEOAS – Hypermedia APIs with Spring
olivergierke
1
570
Building Better Monoliths – Modulithic Applications with Spring Boot
olivergierke
6
3.9k
REST Beyond the Obvious – API Design for Ever Evolving Systems
olivergierke
5
1.1k
Other Decks in Programming
See All in Programming
Exploring the Implementation of “t.Run”, “t.Parallel”, and “t.Cleanup”
akarin
1
150
Next.js App Router
quramy
13
2.2k
Build Apps for iOS, Android & Desktop in 100% Kotlin With Compose Multiplatform (mDevCamp 2024)
zsmb
0
480
大規模Reactアプリのリアーキテクチャ~8万行のTanStack Query移行の軌跡~
kj455
4
1k
SIMD Parallel Programming with the Vector API
josepaumard
0
240
パフォーマンスを求めてDBに機能を寄せる戦略
aoyagikouhei
0
110
Elm 0.19.0 Changes
bkuhlmann
0
510
Docker_OSS_ホスティング入門
satokoki645
0
110
Balkan Ruby 2024 — How and why to run SQLite on Rails in production
fractaledmind
0
110
Ruby Pattern Matching
bkuhlmann
0
940
Folding Cheat Sheet #4
philipschwarz
PRO
0
110
仕様と実装で学ぶOpenTelemetry
drumato
1
130
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
121
16k
Designing for humans not robots
tammielis
247
25k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
80
44k
Reflections from 52 weeks, 52 projects
jeffersonlam
345
19k
The Invisible Customer
myddelton
114
12k
Fantastic passwords and where to find them - at NoRuKo
philnash
39
2.5k
Debugging Ruby Performance
tmm1
70
11k
YesSQL, Process and Tooling at Scale
rocio
165
13k
Stop Working from a Prison Cell
hatefulcrawdad
267
19k
Imperfection Machines: The Place of Print at Facebook
scottboms
261
12k
jQuery: Nuts, Bolts and Bling
dougneiner
60
7.2k
A designer walks into a library…
pauljervisheath
201
23k
Transcript
Whoops! Where did my architecture go? Approaches to architecture management
for Java and Spring applications Oliver Gierke
Oliver Gierke SpringSource Engineer Spring Data
[email protected]
olivergierke www.olivergierke.de
Background 5 years of consulting Lots of code reviews Eoin
Woods‘ talk on InfoQ
"If you think architecture is expensive, try no architecture.
Macro VS. Micro Architecture
Macro VS. Micro Architecture
Sample Code http://github.com/olivergierke/ whoops-architecture
Roadmap Divide and conquer Of layers and slices A plain
Java based approach
Architecture 101
Know your dependencies
Explicit / Visible dependencies
Granularity Modules Layers Vertical slices Subsystems
Granularity Java ARchive Package Class
Divide and conquer
Component
Component Single unit to understand
Component Single unit to change
Component Scope of risk of change
B A
B A
B Cost of separation A
B Definition and maintenance of dependencies A
B Smaller unit to understand A
B Reduced risk of change A
Of layers and slices…
None
None
Presentation Service Data Access
Presentation Service Data Access
Presentation Service Data Access
Presentation Service Data Access Account Customer Core
Presentation Service Data Access Account Customer Core
Presentation Service Data Access Account Customer Core
Layers Well understood Known to developers Less important to business
Slices Hardly understood New to developers Key for business req
Presentation Service Data Access Account Customer Core
"How to implement an architecture inside a codebase?
Architecture VS. Codebase
"How to implement an architecture inside a codebase?
"How to implement an architecture inside a codebase?
"How to maintain an architecture inside a codebase?
Code analysis JDepend Sonar
Demo
Sonargraph Formerly known as SonarJ
Demo
A plain Java based approach
"How far can we get with plain Java means only?
Presentation Service Data Access Account Customer Core
Packages
….layer.slice ….slice.layer ….slice
….web.core ….service.core ….repository.core
….core.web ….core.service ….core.repository
….core ….customer ….account
"Why the f#$k should I even care?
"Does it make a difference?
Dependency management
"You only need to manage, what you can refer to…
Layers first Leaks slice internals Lower layers visible to everyone
Slices first/only Start with package per slice Expose interfaces and
domain types Keep implementations private
Slices first/only Encapsulates business module Internals understood anyway
"Start with less packages and the least visibility possible…
Presentation Service Data Access Account Customer Core
Presentation Service Data Access Account Customer Core
Demo
Take-aways Know your dependencies On every granularity Start as strict
as possible Get lenient where necessary
Resources Spring Data JPA @ GitHub Sonargraph Blogpost
Thanks & credits Eoin Woods - Talk @ InfoQ Uwe
Friedrichsen - Slides @ Slideshare