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
October 06, 2015
Programming
4
860
Whoops! Where did my architecture go?
Slides of the talk I gave at Java Forum Nord, 2015.
@springcentral
Oliver Drotbohm
October 06, 2015
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
都市をデータで見るってこういうこと PLATEAU属性情報入門
nokonoko1203
1
530
CursorはMCPを使った方が良いぞ
taigakono
0
110
エラーって何種類あるの?
kajitack
5
240
AWS CDKの推しポイント 〜CloudFormationと比較してみた〜
akihisaikeda
3
280
「ElixirでIoT!!」のこれまでとこれから
takasehideki
0
370
カクヨムAndroidアプリのリブート
numeroanddev
0
430
Rails産でないDBを Railsに引っ越すHACK - Omotesando.rb #110
lnit
1
160
関数型まつり2025登壇資料「関数プログラミングと再帰」
taisontsukada
2
830
Team topologies and the microservice architecture: a synergistic relationship
cer
PRO
0
880
レガシーシステムの機能調査・開発におけるAI利活用
takuya_ohtonari
0
610
Go Modules: From Basics to Beyond / Go Modulesの基本とその先へ
kuro_kurorrr
0
120
Javaに鉄道指向プログラミング (Railway Oriented Pro gramming) のエッセンスを取り入れる/Bringing the Essence of Railway-Oriented Programming to Java
cocet33000
2
580
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
43
2.4k
Fireside Chat
paigeccino
37
3.5k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
20
1.3k
Site-Speed That Sticks
csswizardry
10
650
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
790
Gamification - CAS2011
davidbonilla
81
5.3k
Code Review Best Practice
trishagee
68
18k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
60k
How to Ace a Technical Interview
jacobian
277
23k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.1k
Designing for humans not robots
tammielis
253
25k
Transcript
Whoops! Where did my architecture go? Architecture management for Java
applications / olivergierke
None
None
Background Consulting years for SpringSource Lots of code reviews Eoin
Woods‘ talk on InfoQ Lot of input from fellows
"If you think architecture is expensive, try no architecture.
"Architecture is like weather: you can’t have none.
Macro VS. Micro Architecture
Macro VS. Micro Architecture
Orders Inventory Billing Macro-Architecture Micro-Architecture JMS REST AMQP
JRuby Java Scala Macro-Architecture Micro-Architecture AMQP JMS REST
Neo4j RDBMS MongoDB Macro-Architecture Micro-Architecture from Stefan Tilkov - Breaking
the Monolith JMS REST AMQP
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 Single unit to understand
Component Single unit to change
Component Scope of risk of change
B Smaller unit to understand A
B Reduced risk of change A
B Cost of separation A
B Definition and maintenance of dependencies A
"Meanwhile, in my friend’s project…
How do I add a feature?
How do I add a feature? New Feature © Eberhard
Wolff
Of layers and slices…
Presentation Service Data Access
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 requirements
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 Sonarcube
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 jQAssistant Blogpost
Sample Code http://github.com/olivergierke/ whoops-architecture
Oliver Gierke Spring Data Project Lead
[email protected]
olivergierke www.olivergierke.de
Thanks & Credits Eoin Woods - Talk @ InfoQ Stefan
Tilkov - Talk @ InfoQ Eberhard Wolff - Slides @ Slideshare