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
850
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
4
450
Bottom-Up Architecture – Bridging the Achitecture Code Gap
olivergierke
4
730
Spring Modulith – A Deep Dive
olivergierke
7
3.8k
Spring for the Architecturally Curious Developer
olivergierke
5
1.7k
Spring Boot 3 & Spring Framework 6
olivergierke
4
1.9k
Architecturally-evident Java Applications with jMolecules
olivergierke
8
2.7k
A Deep Dive into Spring Application Events
olivergierke
12
3.1k
Building Better Monoliths – Modulithic Applications with Spring Boot
olivergierke
4
870
Spring HATEOAS – Hypermedia APIs with Spring
olivergierke
1
650
Other Decks in Programming
See All in Programming
受け取る人から提供する人になるということ
little_rubyist
0
230
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
220
watsonx.ai Dojo #4 生成AIを使ったアプリ開発、応用編
oniak3ibm
PRO
1
100
subpath importsで始めるモック生活
10tera
0
300
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
900
macOS でできる リアルタイム動画像処理
biacco42
9
2.4k
Creating a Free Video Ad Network on the Edge
mizoguchicoji
0
120
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
7
7.7k
イベント駆動で成長して委員会
happymana
1
320
광고 소재 심사 과정에 AI를 도입하여 광고 서비스 생산성 향상시키기
kakao
PRO
0
170
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
100
Featured
See All Featured
Building Your Own Lightsaber
phodgson
103
6.1k
We Have a Design System, Now What?
morganepeng
50
7.2k
Site-Speed That Sticks
csswizardry
0
24
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
Faster Mobile Websites
deanohume
305
30k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
RailsConf 2023
tenderlove
29
900
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
The Cost Of JavaScript in 2023
addyosmani
45
6.7k
Into the Great Unknown - MozCon
thekraken
32
1.5k
Code Review Best Practice
trishagee
64
17k
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
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