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
What's new in Spring Modulith?
olivergierke
1
180
Domain-centric? Why Hexagonal, Onion, and Clean Architecture Are Answers to the Wrong Question
olivergierke
3
990
It Takes Two to Tango – Designing Module Interactions in Modulithic Spring Applications
olivergierke
5
750
Bottom-Up Architecture – Bridging the Achitecture Code Gap
olivergierke
4
980
Spring Modulith – A Deep Dive
olivergierke
8
4.6k
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
Developer Joy - The New Paradigm
hollycummins
1
380
EMこそClaude Codeでコード調査しよう
shibayu36
0
490
Designing Repeatable Edits: The Architecture of . in Vim
satorunooshie
0
140
TransformerからMCPまで(現代AIを理解するための羅針盤)
mickey_kubo
7
5.7k
iOSでSVG画像を扱う
kishikawakatsumi
0
170
ネストしたdata classの面倒な更新にさようなら!Lensを作って理解するArrowのOpticsの世界
shiita0903
1
170
釣り地図SNSにおける有料機能の実装
nokonoko1203
0
200
理論と実務のギャップを超える
eycjur
0
200
フロントエンド開発のためのブラウザ組み込みAI入門
masashi
7
3.6k
Devoxx BE - Local Development in the AI Era
kdubois
0
150
マンガアプリViewerの大画面対応を考える
kk__777
0
420
Introduce Hono CLI
yusukebe
6
3.2k
Featured
See All Featured
The Power of CSS Pseudo Elements
geoffreycrofte
80
6k
Building an army of robots
kneath
306
46k
RailsConf 2023
tenderlove
30
1.3k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
Unsuck your backbone
ammeep
671
58k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.2k
Product Roadmaps are Hard
iamctodd
PRO
55
11k
Leading Effective Engineering Teams in the AI Era
addyosmani
7
670
For a Future-Friendly Web
brad_frost
180
10k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.5k
Optimizing for Happiness
mojombo
379
70k
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