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
330
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
Bottom-Up Architecture – Bridging the Achitecture Code Gap
olivergierke
3
160
Spring Modulith – A Deep Dive
olivergierke
7
2.2k
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.5k
A Deep Dive into Spring Application Events
olivergierke
12
3k
Building Better Monoliths – Modulithic Applications with Spring Boot
olivergierke
4
850
Spring HATEOAS – Hypermedia APIs with Spring
olivergierke
1
600
Building Better Monoliths – Modulithic Applications with Spring Boot
olivergierke
6
4k
Other Decks in Programming
See All in Programming
DDDを志して3年経ったら「DDDの皮を被ったクリーンアーキテクチャ」になった話【デブサミ2024夏】
texmeijin
1
620
企業向け生成AIアプリの 開発から得られた知見
takaakikakei
0
310
DynamoDB コスト最適化っぽいことの基本 with Terraform
kuro_kurorrr
2
250
Temporalを取り巻く仕様を整理する
sajikix
0
120
さきがけから振り返るアーキテクチャ刷新 / Reflecting on the Architectural Renewal from the Vanguard
nrslib
2
780
最古の関数型言語「Lisp」ことはじめ / lisp_in_kamiyama
uhooi
1
190
OpenAI/Gemini APIを使って EPUBを翻訳するCLIツールをつくってみた
tomiyan
0
790
はしめてのプログラミングとロボット制御
watawatavoltage
0
290
Product Management LT会_クアンド新家
shinshin
0
260
I/O Extended Android in Korea 2024 ~ Whats new in Android development tools
pluu
0
250
CSC307 Lecture 11
javiergs
PRO
0
240
CSC307 Lecture 13
javiergs
PRO
0
150
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
262
13k
RailsConf 2023
tenderlove
16
720
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
325
21k
The Pragmatic Product Professional
lauravandoore
29
6.1k
The Power of CSS Pseudo Elements
geoffreycrofte
64
5.2k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
226
52k
Robots, Beer and Maslow
schacon
PRO
157
8.1k
Building Better People: How to give real-time feedback that sticks.
wjessup
357
18k
Designing for Performance
lara
604
67k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Building Applications with DynamoDB
mza
89
5.8k
Creatively Recalculating Your Daily Design Routine
revolveconf
214
11k
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