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
May 17, 2013
Programming
2
260
Whoops! Where did my architecture go?
Slides of my talk about Java application architecture at GeeCon 2013, Krakow.
Oliver Drotbohm
May 17, 2013
Tweet
Share
More Decks by Oliver Drotbohm
See All by Oliver Drotbohm
What's new in Spring Modulith?
olivergierke
1
180
Domain-centric? Why Hexagonal, Onion, and Clean Architecture Are Answers to the Wrong Question
olivergierke
3
990
It Takes Two to Tango – Designing Module Interactions in Modulithic Spring Applications
olivergierke
5
750
Bottom-Up Architecture – Bridging the Achitecture Code Gap
olivergierke
4
980
Spring Modulith – A Deep Dive
olivergierke
8
4.6k
Spring for the Architecturally Curious Developer
olivergierke
5
1.9k
Spring Boot 3 & Spring Framework 6
olivergierke
4
2.1k
Architecturally-evident Java Applications with jMolecules
olivergierke
9
3k
A Deep Dive into Spring Application Events
olivergierke
12
3.4k
Other Decks in Programming
See All in Programming
NixOS + Kubernetesで構築する自宅サーバーのすべて
ichi_h3
0
1.3k
開発組織の戦略的な役割と 設計スキル向上の効果
masuda220
PRO
10
1.9k
O Que É e Como Funciona o PHP-FPM?
marcelgsantos
0
240
エンジニアインターン「Treasure」とHonoの2年、そして未来へ / Our Journey with Hono Two Years at Treasure and Beyond
carta_engineering
0
460
AIと人間の共創開発!OSSで試行錯誤した開発スタイル
mae616
2
830
マンガアプリViewerの大画面対応を考える
kk__777
0
420
Blazing Fast UI Development with Compose Hot Reload (Bangladesh KUG, October 2025)
zsmb
2
430
Using Types to Save Your Code's Future
rollbear
0
100
登壇は dynamic! な営みである / speech is dynamic
da1chi
0
390
TFLintカスタムプラグインで始める Terraformコード品質管理
bells17
2
490
Go言語はstack overflowの夢を見るか?
logica0419
0
660
CSC305 Lecture 12
javiergs
PRO
0
240
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
340
57k
How GitHub (no longer) Works
holman
315
140k
GraphQLとの向き合い方2022年版
quramy
49
14k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Docker and Python
trallard
46
3.6k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Testing 201, or: Great Expectations
jmmastey
45
7.7k
Large-scale JavaScript Application Architecture
addyosmani
514
110k
A designer walks into a library…
pauljervisheath
209
24k
Designing for Performance
lara
610
69k
Code Review Best Practice
trishagee
72
19k
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