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
390
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
What's new in Spring Modulith?
olivergierke
1
210
Domain-centric? Why Hexagonal, Onion, and Clean Architecture Are Answers to the Wrong Question
olivergierke
4
1.3k
It Takes Two to Tango – Designing Module Interactions in Modulithic Spring Applications
olivergierke
5
760
Bottom-Up Architecture – Bridging the Achitecture Code Gap
olivergierke
4
1k
Spring Modulith – A Deep Dive
olivergierke
9
4.8k
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
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
430
Context is King? 〜Verifiability時代とコンテキスト設計 / Beyond "Context is King"
rkaga
10
1.5k
perlをWebAssembly上で動かすと何が嬉しいの??? / Where does Perl-on-Wasm actually make sense?
mackee
0
230
ローカルLLMを⽤いてコード補完を⾏う VSCode拡張機能を作ってみた
nearme_tech
PRO
0
200
ゲームの物理 剛体編
fadis
0
380
ThorVG Viewer In VS Code
nors
0
300
チームをチームにするEM
hitode909
0
410
AIの誤りが許されない業務システムにおいて“信頼されるAI” を目指す / building-trusted-ai-systems
yuya4
6
4k
Navigation 3: 적응형 UI를 위한 앱 탐색
fornewid
1
500
Patterns of Patterns
denyspoltorak
0
380
GISエンジニアから見たLINKSデータ
nokonoko1203
0
190
Deno Tunnel を使ってみた話
kamekyame
0
270
Featured
See All Featured
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
150
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
110
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
100
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.4k
The SEO identity crisis: Don't let AI make you average
varn
0
39
Fireside Chat
paigeccino
41
3.8k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
0
320
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
Darren the Foodie - Storyboard
khoart
PRO
0
2k
The Limits of Empathy - UXLibs8
cassininazir
1
190
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
30
The agentic SEO stack - context over prompts
schlessera
0
570
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