rethink your architecture - marten deinum
TRANSCRIPT
Rethink your Architecture
Marten Deinum
–Vaughn Vernon
„I think there has been a general abandonment of good design and development practices in
the Java community.”
–Simon Brown
„If you can't build a structured monolith, what makes you think microservices are the answer?”
Architectural Crisis
CQRS
DDD
(S)EDA
SOAµServices
CBD
Anemic Domain Model
Layers/Tiers/Slices
MVC
DCI
Pipes and FiltersTransaction Script
Software ArchitectureSoftware architecture isn’t about big design up front
Every software team needs to consider software architecture
The software architecture role is about coding, coaching and collaboration
You don’t need to use UML
A good software architecture enables agility
–Simon Brown (Software Architecture for Developers)
Software Architecture
– Oliver Gierke
„Architecture is like weather: you can’t have none”
Domain
Presentation
Service
Data Access
Software Architecture
Presentation
Service
Data AccessDomain
DTO
Software Architecture
Presentation
Service
Data Access
Presentation
Service
Data Access
Software Architecture
Presentation
Service
Data Access
Presentation
Service
Data Access
Presentation
Service
Data Access
Presentation
Service
Data Access
Presentation
Service
Data Access
Software Architecture
Presentation
Service
Data Access
Presentation
Service
Data Access
Presentation
Service
Data Access
Software Architecture
Big Ball of Mud
Layers
biz.deinum.app.web
biz.deinum.app.service
biz.deinum.app.repository
biz.deinum.app.domain
biz.deinum.app.dto
Presentation
Service
Data AccessDomain
DTO
Layers
biz.deinum.app.service.module
biz.deinum.app.module.service
Presentation
Service
Data AccessDomain
DTO
Layers
public interface UserService { … }
public class UserServiceImpl implements UserService { … }
Layers
public interface UserRepository { … }
public class JpaUserRepository implements UserRepository { … }
– Alan Kay (2003)
“OOP to me means only messaging, local retention and protection and hiding of state-
process, and extreme LateBinding of all things”
Layers
Presentation
Service
Data AccessDomain
DTO
public interface UserService {…}
public class UserServiceImpl implements UserService {…}
public interface UserRepository {…}
public class JpaUserRepository implements UserRepository {…}
public class User { public User() {…} }
– Russ Miles (2013)
„We don’t build layered software, we have a couple of domains that interact.”
Life Preserver PatternIntegration
Core
Life Preserver PatternIntegration
Core
User
Event
web
security
ws
Slices
biz.deinum.app.user biz.deinum.app.user.web
biz.deinum.app.order biz.deinum.app.order.web biz.deinum.app.order.ws
Presentation
Service
Data AccessDomain
DTO
Software ArchitectureIntegration
Core
User
Event
web
security
ws
Reading List