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
250
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
Spring Modulith – A Deep Dive
olivergierke
7
1.8k
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
820
Spring HATEOAS – Hypermedia APIs with Spring
olivergierke
1
560
Building Better Monoliths – Modulithic Applications with Spring Boot
olivergierke
6
3.8k
REST Beyond the Obvious – API Design for Ever Evolving Systems
olivergierke
5
1.1k
Other Decks in Programming
See All in Programming
スクラムガイドのスプリントレトロスペクティブを改めて読みかえしてみた / Re-reading the Sprint Retrospective Section in the Scrum Guide
mackey0225
3
430
Azure OpenAI Serviceのプロンプトエンジニアリング入門
tomokusaba
3
710
Build Apps for iOS, Android & Desktop in 100% Kotlin With Compose Multiplatform (mDevCamp 2024)
zsmb
0
340
Site Reliability Engineering for GMO
pyama86
8
1k
ONE WEDGE_company_guide
1wedge_one
0
490
大規模UIKitベースアプリへのTCAの段階的導入/gradual-adoption-of-tca-in-a-large-scale-uikit-based-app
takehilo
1
180
単体テストを書かない技術 #phpcon_odawara
o0h
PRO
27
8.3k
Ruby Pattern Matching
bkuhlmann
0
930
Tailwind CSSを本気でカスタマイズする方法
fsubal
13
5.3k
What We Can Learn From OSS
inouehi
0
420
『Railsオワコン』と言われる時代に、なぜブルーモ証券はRailsを選ぶのか
free_world21
0
250
Random\Randomizer クラスで日常のあれこれを解決しよう! / Random\Randomizer class solves familiar trouble
cocoeyes02
0
250
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
244
20k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
21
1.6k
What the flash - Photography Introduction
edds
64
11k
The Straight Up "How To Draw Better" Workshop
denniskardys
227
130k
Statistics for Hackers
jakevdp
789
220k
Robots, Beer and Maslow
schacon
PRO
155
7.9k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
34
8.9k
Web Components: a chance to create the future
zenorocha
305
41k
How to train your dragon (web standard)
notwaldorf
73
5.2k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
25
2.3k
Fontdeck: Realign not Redesign
paulrobertlloyd
76
4.9k
Agile that works and the tools we love
rasmusluckow
325
20k
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