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
It Takes Two to Tango – Designing Module Interactions in Modulithic Spring Applications
olivergierke
5
670
Bottom-Up Architecture – Bridging the Achitecture Code Gap
olivergierke
4
910
Spring Modulith – A Deep Dive
olivergierke
8
4.3k
Spring for the Architecturally Curious Developer
olivergierke
5
1.8k
Spring Boot 3 & Spring Framework 6
olivergierke
4
2k
Architecturally-evident Java Applications with jMolecules
olivergierke
9
2.9k
A Deep Dive into Spring Application Events
olivergierke
12
3.3k
Building Better Monoliths – Modulithic Applications with Spring Boot
olivergierke
4
950
Spring HATEOAS – Hypermedia APIs with Spring
olivergierke
1
740
Other Decks in Programming
See All in Programming
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
41
27k
赤裸々に公開。 TSKaigiのオフシーズン
takezoux2
0
140
F#で自在につくる静的ブログサイト - 関数型まつり2025
pizzacat83
0
310
Gleamという選択肢
comamoca
6
740
iOSアプリ開発で 関数型プログラミングを実現する The Composable Architectureの紹介
yimajo
2
210
Benchmark
sysong
0
220
GoのWebAssembly活用パターン紹介
syumai
3
10k
プロダクト開発でも使おう 関数のオーバーロード
yoiwamoto
0
160
カクヨムAndroidアプリのリブート
numeroanddev
0
430
deno-redisの紹介とJSRパッケージの運用について (toranoana.deno #21)
uki00a
0
120
Is Xcode slowly dying out in 2025?
uetyo
0
110
GraphRAGの仕組みまるわかり
tosuri13
7
440
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
Bash Introduction
62gerente
614
210k
4 Signs Your Business is Dying
shpigford
184
22k
Building a Modern Day E-commerce SEO Strategy
aleyda
41
7.3k
The Straight Up "How To Draw Better" Workshop
denniskardys
233
140k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Writing Fast Ruby
sferik
628
61k
Documentation Writing (for coders)
carmenintech
71
4.9k
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.7k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
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