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
September 04, 2014
Programming
0
340
Whoops! Where did my architecture go?
Slides of the talk I held at 50th meeting of Java User Group Saxony. @springcentral
Oliver Drotbohm
September 04, 2014
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
590
Bottom-Up Architecture – Bridging the Achitecture Code Gap
olivergierke
4
840
Spring Modulith – A Deep Dive
olivergierke
7
4.1k
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
8
2.8k
A Deep Dive into Spring Application Events
olivergierke
12
3.2k
Building Better Monoliths – Modulithic Applications with Spring Boot
olivergierke
4
920
Spring HATEOAS – Hypermedia APIs with Spring
olivergierke
1
700
Other Decks in Programming
See All in Programming
『テスト書いた方が開発が早いじゃん』を解き明かす #phpcon_nagoya
o0h
PRO
9
2.5k
生成AIで加速するテスト実装 - ロリポップ for Gamersの事例と 生成AIエディタの活用
kinosuke01
0
130
良いコードレビューとは
danimal141
6
1.4k
責務と認知負荷を整える! 抽象レベルを意識した関心の分離
yahiru
8
1.5k
AIプログラミング雑キャッチアップ
yuheinakasaka
19
4.9k
Serverless Rust: Your Low-Risk Entry Point to Rust in Production (and the benefits are huge)
lmammino
1
160
Formの複雑さに立ち向かう
bmthd
1
940
CDKを使ったPagerDuty連携インフラのテンプレート化
shibuya_shogo
0
110
メンテが命: PHPフレームワークのコンテナ化とアップグレード戦略
shunta27
0
310
Honoとフロントエンドの 型安全性について
yodaka
7
1.5k
Amazon Bedrockマルチエージェントコラボレーションを諦めてLangGraphに入門してみた
akihisaikeda
1
150
Honoのおもしろいミドルウェアをみてみよう
yusukebe
1
240
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
650
Java REST API Framework Comparison - PWX 2021
mraible
29
8.4k
4 Signs Your Business is Dying
shpigford
183
22k
Product Roadmaps are Hard
iamctodd
PRO
51
11k
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
Rebuilding a faster, lazier Slack
samanthasiow
80
8.9k
Fontdeck: Realign not Redesign
paulrobertlloyd
83
5.4k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.2k
BBQ
matthewcrist
87
9.5k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.3k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.3k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
Transcript
Whoops! Where did my architecture go? Architecture management for Java
applications ! Oliver Gierke
None
None
None
Background 5 years of consulting Lots of code reviews Eoin
Woods‘ talk on InfoQ Lot of input from fellows
"If you think architecture is expensive, try no architecture.
Macro VS. Micro Architecture
Macro VS. Micro Architecture
None
Orders Inventory Billing
Orders Inventory Billing
Orders Inventory Billing Macro-Architecture JMS REST AMQP
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
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 Sonar
Sonargraph Formerly known as SonarJ
Demo
jQAssistant http://github.com/buschmais/jqassistant
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