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
April 05, 2013
Programming
2
380
Whoops! Where Did My Architecture Go?
Slides of my talk at BEDCon 2013 in Berlin, Germany.
Oliver Drotbohm
April 05, 2013
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
1k
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
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
640
CSC305 Lecture 11
javiergs
PRO
0
320
ボトムアップの生成AI活用を推進する社内AIエージェント開発
aku11i
0
1.4k
Webサーバーサイド言語としてのRustについて
kouyuume
1
5k
Google Opal解体新書
mickey_kubo
3
100
社会人になっても趣味開発を続けたい! / traPavilion
mazrean
1
120
品質ワークショップをやってみた
nealle
0
720
Go言語はstack overflowの夢を見るか?
logica0419
0
660
Amazon ECS Managed Instances が リリースされた!キャッチアップしよう!! / Let's catch up Amazon ECS Managed Instances
cocoeyes02
0
120
CSC305 Lecture 12
javiergs
PRO
0
240
AkarengaLT vol.38
hashimoto_kei
1
130
AIと人間の共創開発!OSSで試行錯誤した開発スタイル
mae616
2
840
Featured
See All Featured
Scaling GitHub
holman
463
140k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.1k
The Language of Interfaces
destraynor
162
25k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.7k
How to Think Like a Performance Engineer
csswizardry
27
2.2k
Building Adaptive Systems
keathley
44
2.8k
The Invisible Side of Design
smashingmag
302
51k
A Modern Web Designer's Workflow
chriscoyier
697
190k
The Pragmatic Product Professional
lauravandoore
36
7k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Fireside Chat
paigeccino
41
3.7k
Transcript
Whoops! Where did my architecture go? Approaches to architecture management
for Java and Spring applications Oliver Gierke
Oliver Gierke SpringSource Engineer Spring Data
[email protected]
olivergierke www.olivergierke.de
Background 5 years of consulting Lots of code reviews Eoin
Woods‘ talk on InfoQ
"If you think architecture is expensive, try no architecture.
Macro VS. Micro Architecture
Macro VS. Micro Architecture
Sample Code http://github.com/olivergierke/ whoops-architecture
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 A
B A
B Cost of separation A
B Definition and maintenance of dependencies A
B Smaller unit to understand A
B Reduced risk of change A
Of layers and slices…
None
None
Presentation Service Data Access
Presentation Service Data Access
Presentation Service Data Access
Presentation Service Data Access Account Customer Core
Presentation Service Data Access Account Customer Core
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 req
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
Demo
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 Blogpost
Thanks & credits Eoin Woods - Talk @ InfoQ Uwe
Friedrichsen - Slides @ Slideshare