SlideShare a Scribd company logo
API/
Hi, I'm Victor Rentea
Java Champion – drinking since 2006
Trainer – 3000+ devs / 80+ companies, since 2013
Speaker – Conferences & Meetups
Hibernate
Spring Java8/FP
Java Performance Secure Coding
Reactive
Architecture Clean Code Unit Testing
$
Hibernate
Spring Java8/FP
Architecture Clean Code Unit Testing
Masterclass
Company
Training
Video
Courses
YouTube
Channel
💗 Join My
Community
Blog
@victorrentea
VictorRentea.ro
victorrentea@gmail.com
Java Performance Secure Coding
Reactive
172 VictorRentea.ro
a training by
Chapter 1. Data Structures
173 VictorRentea.ro
a training by
Can I have a chicken?
The data structure they send you
The data structure you want to use in your core logic
DTO
domain
Object
175 VictorRentea.ro
a training by
DTOs*
are Evil
*Data Transfer Objects – data structures that move across APIs
176 VictorRentea.ro
a training by
☢ Beware of Foreign Data Structures ☢
➢ Bloated (more fields than you need)
➢ Flat
➢ Different perspective 🐔 (bounded context)
➢ Fixed design (often generated or in client-lib)
➢ Mutable (pain from frameworks otherwise)
➢ No constraints (nulls, validation, invariants)
➢ Diverging in time (v2)
We 💗 small, cohesive data structures
We 💗 Logic next to data (OOP)
We 💗 Immutable objects
We 💗 Deep, Rich Domain Model
We 💗 Models to guard their invariants
We want control over our structures
Because DTOs are: In our core logic:
We 💗 Structures tailored to our problem
177 © VictorRentea.ro
a training by
Don't implement complex logic
on foreign data structures
Elders Wisdom
What's complex?
What's foreign?
178 VictorRentea.ro
a training by
Bounded Context A
(TeamA)
The Curious Case of Nanoservices
DTOs can be shared
within the same Bounded Context (team)
=tiny microservice
eg. 5 devs maintaining
20 microservices
1
2
3
Bounded Context B
(TeamB)
X
But not with others
What's foreign?
179 VictorRentea.ro
a training by
⚠ Returning entities as JSON ⚠
➢ Couples your clients to your internal entity structure
➢ Is risky to marshal
and of course...
180 VictorRentea.ro
a training by
Decouple
DTO
Domain
Model
< >
Price: more classes + more mapping
Exception:
Boundary Systems
= Huge Adapters without own Domain
Software Ecosystem
A
- Manually Crafted DTO
- Generated DTOs:
XML: .xsd/.wsdl ➔ xjc
JSON: .yaml ➔ swagger-gen
Auto-Generated
Mappers
181 VictorRentea.ro
a training by
Auto-Generated Mappers
Converting Entity  DTO with
as long as the field names match,
mapping happens automatically
eg MapStruct
Temptation to keep the models in sync
Entities and DTOs must be allowed to diverge
Customer.firstName  CustomerDto.firstName
War Stories: When mapping gets complex, deep knowledge of MapStruct is required
➔ Consider switching to manual mapping (simpler) ?
182 © VictorRentea.ro
a training by
Don't implement complex logic
on foreign data structures
Elders Wisdom
183 VictorRentea.ro
a training by
Chapter 2. Logic
184 VictorRentea.ro
a training by
you
185 VictorRentea.ro
a training by
The Code - anonymous developer
186 VictorRentea.ro
a training by
Layers
SUB-DOMAINS
Controller
Service
Repository
APIs
order Product user
customer
API
infrastructure
too complex ➔
187 VictorRentea.ro
a training by
Layers
Controller
Repository
APIs
Facade / Application Service
Layered Architecture
DOMAIN Service
188 VictorRentea.ro
a training by
Controller
Repository
call
direction
pull orchestration up,
let Repos trivial
Relaxed Layered Architecture
allows skipping layers
Layered Architecture
DOMAIN Service
Facade / Application Service
190 VictorRentea.ro
a training by
by pushing details in lower-level classes
Muscle
Fascicle
Fiber
Myofibril
Myofilaments
Goal = Simplify the top-level view of your flow
Facade = Separation by Layers of Abstraction
191
Code is NOT a Construction
VictorRentea.ro
192
193 VictorRentea.ro
a training by
requirements
Logic
Service
Facade
HOW?
Entities
OOP
1) One class/use-case
GetOrderByIdService - ⚠ tiny class
PlaceOrderService - ⚠ god class
-or-
2) N use-cases in a class
class OrderFacade { ⚠ god class
placeOrder()
getOrderById()
}
5-10%..more?💪
Continuously Extract
ApplicationService DomainService
simplify the most complex flows
194 VictorRentea.ro
a training by
Mapper
DTO
Facade
Facade Domain
Service
Domain
Service Domain Services
Ideas inspired by the book Java EE Patterns - Rethinking Best Practices, by Adam Bien
Push Domain Logic into
Start implementing every use-case in a
Facade
For trivial User Cases
a method is enough
eg. getOrderById
When logic gets complex,
or has to be reused
(evolutionary architecture)
195 VictorRentea.ro
a training by
Mapper
DTO
Facade Domain
Service
Domain
Service
take and return only
Domain Objects or primitives
Don't Depend on DTOs
Domain Boundary
DTOs are Evil
VO
Entity
id
Convert them to your Domain Objects ASAP
Domain Services
196 VictorRentea.ro
a training by
Cohesive Domain Services
OrderService
PlaceOrderService
⚠Bloat Risk, if Order is a large Entity
@VictorRentea
197
Facade Roles - Summary
• Converts DTOs  Entities
• inline, via [Auto-]Mappers, or Dto constructors/methods.
• Validates inputs
• @javax.validation.NotNull, if ...
• Transaction / use-case
• Except in high-TPS systems
• Orchestrates the workflow of a 🧠 use-case
• By delegating to lower-level components
@VictorRentea
198
Dependency Inversion
199 VictorRentea.ro
a training by
Domain
Service
Domain
Service
External
Service
domain
DTO
call
may get in
200 VictorRentea.ro
a training by
External
Service
DTO
Adapter
Domain
Service
Domain
Service
domain
201 VictorRentea.ro
a training by
External
Service
DTO
Adapter
Domain
Service
Domain
Service
<dependency>
domain infrastructure
VictorRentea.ro
202
External
Service
DTO
IAdapter Adapter
implements
class UserApiClient
implements IUserAdapter {
public User getById(id){
<external call>
}
}
interface IUserAdapter {
User getById(id);
}
class OrderService {
@Autowired
IUserAdapter adapter;
...
adapter.getById(id);
}
express your need in
a domain interface…
and implement it in a
lower-level module…
When you need
to call outside…
so nothing foreign
enters your domain.
Domain
Service
Domain
Service
<dependency>
domain infrastructure
203 VictorRentea.ro
a training by
calls
Dependency Inversion Principle
<dependency>
higher-level
module
lower-level
module
"Best of OOP"
- Uncle Bob
Abstractions should not depend on details
Low level classes
are not visible
(SOLID Principles)
Dependency Inversion
204 VictorRentea.ro
a training by
calls
<dependency>
higher-level
module
lower-level
module RMI,
HTTP
gRPC..
FTP
Queue
DB
DTO
Dependency Inversion
206 VictorRentea.ro
a training by
Stop Code Dependencies
from complex logic ➔ externals
Dependency Inversion
Package Dependency Checks - via static code analysis
- by compiler
@Test
public void dependencyInversionTest() {
ArchRuleDefinition
.noClasses().that().resideInAPackage("..domain")
.should().dependOnClassesThat().resideInAPackage("..infra")
.check(new ClassFileImporter().importPackages("my.corp.app"));
}
testImplementation com.tngtech.archunit:archunit-junit4:0.15.0 or NDepend (C#)
https://nx.dev/latest/angular/structure/monorepo-tags
https://github.com/MaibornWolff/ts-arch
207 VictorRentea.ro
a training by
An Agnostic Domain
lets you focus on
YOUR problem
Agnostic Domain
209 VictorRentea.ro
a training by
infrastructure
EXTERNAL
API
Value Object
Entity
id
Domain
Service
IAdapter
Onion Architecture
Behold, the famous
Database
domain
Repo
Dep Inv
Dep Inv
DTO
Agnostic Domain
application
DTO
Your
Client
Validation
Separate
Persistence
Model
if DB == enemy
Façade
Mapper
Controller
Msg Handler
Adapter
Spring Data
IRepo
210 VictorRentea.ro
a training by
DTO
Value Object
Entity
id
Domain
Service
application Database
domain
DTO
Onion Architecture
Pragmatic
Agnostic Domain
EXTERNAL
API
Your
Client
Façade
Mapper
Controller
Adapter
IAdapter
IRepo
Dep Inv
"Light-CQRS"
Selecting DTOs directly from queries
211 VictorRentea.ro
a training by
Independent of Intrusive Frameworks
Testable Standalone
without a DB, UI, Web Server, etc...
https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html
Independent of UI
mobile, web, or desktop
Independent of DB
avoid PL/SQL, no vendor lock-in
Independent of External APIs
= external Bounded Contexts
Is an ORM intrusive?
Keep core logic ...
Agnostic Domain
aka Hexagonal
aka Ports-and-Adapters
aka Clean Architecture
Onion Architecture
Learn Hibernate: https://www.youtube.com/watch?v=iw0tOx7Zbjc
Façade
DTO
Mapper
Value Object
Entity
id
Domain
Service
Domain
Service
IRepo
application
IAdapter
Adapter
External
API
DTO
domain
Controller
DIP
DIP
UI
3rd party
213 VictorRentea.ro
a training by
Anemic Domain Model
("classic" approach)
Rich Domain Model
(Domain-Driven Design)
vs
Getters & Setters for all fields
All logic written in Services
Getters but less setters
Logic using fields of class X stays in X
Self-validating model
eg. Address constructor validates its consistency
Aggregates as consistency boundaries
Invariants enforced by Services
eg. Shipment requires a postal code, unless city=Bucharest
214 VictorRentea.ro
a training by
Chapter 3. Value Objects
215 VictorRentea.ro
a training by
How many fields it has?
Can you make it immutable?
Tell me about that big entity ...
How do you feel about moving logic inside?
216 VictorRentea.ro
a training by
How many fields it has?
Can you make it immutable?
How do you feel about moving logic inside?
Yes!
(use @Embeddable for JPA)
But, How to identify Value Objects?
Extract Value Objects from Entities:
217 VictorRentea.ro
a training by
Conceptual Whole
Money {amount, currency}
FullName {first, last}
Changes Together
LastModified-Time/-ByUser
How to identify Value Objects?
Screens
InvoicingDetails
Moves Together
PriceComputationInput
218 VictorRentea.ro
a training by
Key Points
DTOs are evil
Build a Deep, Rich Domain Model
Protect your Domain with DIP or ArchUnit
Don't let persistence concerns influence your Model design
Continuously Refactor to keep code suple
The entire team should understand the Design Goals
Be Pragmatic. Think Critically! dogmas
@victorrentea
VictorRentea.ro
victorrentea@gmail.com
== What I teach ==
Thank You !
Ad

More Related Content

What's hot (20)

Clean architecture - Protecting the Domain
Clean architecture - Protecting the DomainClean architecture - Protecting the Domain
Clean architecture - Protecting the Domain
Victor Rentea
 
Clean Pragmatic Architecture - Avoiding a Monolith
Clean Pragmatic Architecture - Avoiding a MonolithClean Pragmatic Architecture - Avoiding a Monolith
Clean Pragmatic Architecture - Avoiding a Monolith
Victor Rentea
 
The tests are trying to tell you [email protected]
The tests are trying to tell you something@VoxxedBucharest.pptxThe tests are trying to tell you something@VoxxedBucharest.pptx
The tests are trying to tell you [email protected]
Victor Rentea
 
Evolving a Clean, Pragmatic Architecture - A Craftsman's Guide
Evolving a Clean, Pragmatic Architecture - A Craftsman's GuideEvolving a Clean, Pragmatic Architecture - A Craftsman's Guide
Evolving a Clean, Pragmatic Architecture - A Craftsman's Guide
Victor Rentea
 
Vertical Slicing Architectures
Vertical Slicing ArchitecturesVertical Slicing Architectures
Vertical Slicing Architectures
Victor Rentea
 
Don't Be Mocked by your Mocks - Best Practices using Mocks
Don't Be Mocked by your Mocks - Best Practices using MocksDon't Be Mocked by your Mocks - Best Practices using Mocks
Don't Be Mocked by your Mocks - Best Practices using Mocks
Victor Rentea
 
Clean Code - The Next Chapter
Clean Code - The Next ChapterClean Code - The Next Chapter
Clean Code - The Next Chapter
Victor Rentea
 
Clean Code
Clean CodeClean Code
Clean Code
Victor Rentea
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
Young-Ho Cho
 
Software Craftsmanship @Code Camp Festival 2022.pdf
Software Craftsmanship @Code Camp Festival 2022.pdfSoftware Craftsmanship @Code Camp Festival 2022.pdf
Software Craftsmanship @Code Camp Festival 2022.pdf
Victor Rentea
 
The Art of Clean code
The Art of Clean codeThe Art of Clean code
The Art of Clean code
Victor Rentea
 
Clean architecture
Clean architectureClean architecture
Clean architecture
Lieven Doclo
 
Functional Patterns with Java8 @Bucharest Java User Group
Functional Patterns with Java8 @Bucharest Java User GroupFunctional Patterns with Java8 @Bucharest Java User Group
Functional Patterns with Java8 @Bucharest Java User Group
Victor Rentea
 
Implementing DDD with C#
Implementing DDD with C#Implementing DDD with C#
Implementing DDD with C#
Pascal Laurin
 
The Art of Unit Testing - Towards a Testable Design
The Art of Unit Testing - Towards a Testable DesignThe Art of Unit Testing - Towards a Testable Design
The Art of Unit Testing - Towards a Testable Design
Victor Rentea
 
Unit Testing like a Pro - The Circle of Purity
Unit Testing like a Pro - The Circle of PurityUnit Testing like a Pro - The Circle of Purity
Unit Testing like a Pro - The Circle of Purity
Victor Rentea
 
Introducing Clean Architecture
Introducing Clean ArchitectureIntroducing Clean Architecture
Introducing Clean Architecture
Roc Boronat
 
Evolving a Clean, Pragmatic Architecture at JBCNConf 2019
Evolving a Clean, Pragmatic Architecture at JBCNConf 2019Evolving a Clean, Pragmatic Architecture at JBCNConf 2019
Evolving a Clean, Pragmatic Architecture at JBCNConf 2019
Victor Rentea
 
Clean Lambdas & Streams in Java8
Clean Lambdas & Streams in Java8Clean Lambdas & Streams in Java8
Clean Lambdas & Streams in Java8
Victor Rentea
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Clean architecture - Protecting the Domain
Clean architecture - Protecting the DomainClean architecture - Protecting the Domain
Clean architecture - Protecting the Domain
Victor Rentea
 
Clean Pragmatic Architecture - Avoiding a Monolith
Clean Pragmatic Architecture - Avoiding a MonolithClean Pragmatic Architecture - Avoiding a Monolith
Clean Pragmatic Architecture - Avoiding a Monolith
Victor Rentea
 
Evolving a Clean, Pragmatic Architecture - A Craftsman's Guide
Evolving a Clean, Pragmatic Architecture - A Craftsman's GuideEvolving a Clean, Pragmatic Architecture - A Craftsman's Guide
Evolving a Clean, Pragmatic Architecture - A Craftsman's Guide
Victor Rentea
 
Vertical Slicing Architectures
Vertical Slicing ArchitecturesVertical Slicing Architectures
Vertical Slicing Architectures
Victor Rentea
 
Don't Be Mocked by your Mocks - Best Practices using Mocks
Don't Be Mocked by your Mocks - Best Practices using MocksDon't Be Mocked by your Mocks - Best Practices using Mocks
Don't Be Mocked by your Mocks - Best Practices using Mocks
Victor Rentea
 
Clean Code - The Next Chapter
Clean Code - The Next ChapterClean Code - The Next Chapter
Clean Code - The Next Chapter
Victor Rentea
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
Young-Ho Cho
 
Software Craftsmanship @Code Camp Festival 2022.pdf
Software Craftsmanship @Code Camp Festival 2022.pdfSoftware Craftsmanship @Code Camp Festival 2022.pdf
Software Craftsmanship @Code Camp Festival 2022.pdf
Victor Rentea
 
The Art of Clean code
The Art of Clean codeThe Art of Clean code
The Art of Clean code
Victor Rentea
 
Clean architecture
Clean architectureClean architecture
Clean architecture
Lieven Doclo
 
Functional Patterns with Java8 @Bucharest Java User Group
Functional Patterns with Java8 @Bucharest Java User GroupFunctional Patterns with Java8 @Bucharest Java User Group
Functional Patterns with Java8 @Bucharest Java User Group
Victor Rentea
 
Implementing DDD with C#
Implementing DDD with C#Implementing DDD with C#
Implementing DDD with C#
Pascal Laurin
 
The Art of Unit Testing - Towards a Testable Design
The Art of Unit Testing - Towards a Testable DesignThe Art of Unit Testing - Towards a Testable Design
The Art of Unit Testing - Towards a Testable Design
Victor Rentea
 
Unit Testing like a Pro - The Circle of Purity
Unit Testing like a Pro - The Circle of PurityUnit Testing like a Pro - The Circle of Purity
Unit Testing like a Pro - The Circle of Purity
Victor Rentea
 
Introducing Clean Architecture
Introducing Clean ArchitectureIntroducing Clean Architecture
Introducing Clean Architecture
Roc Boronat
 
Evolving a Clean, Pragmatic Architecture at JBCNConf 2019
Evolving a Clean, Pragmatic Architecture at JBCNConf 2019Evolving a Clean, Pragmatic Architecture at JBCNConf 2019
Evolving a Clean, Pragmatic Architecture at JBCNConf 2019
Victor Rentea
 
Clean Lambdas & Streams in Java8
Clean Lambdas & Streams in Java8Clean Lambdas & Streams in Java8
Clean Lambdas & Streams in Java8
Victor Rentea
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Similar to Clean pragmatic architecture @ devflix (20)

Robotlegs on Top of Gaia
Robotlegs on Top of GaiaRobotlegs on Top of Gaia
Robotlegs on Top of Gaia
Jesse Warden
 
FIWARE Wednesday Webinars - How to Debug IoT Agents
FIWARE Wednesday Webinars - How to Debug IoT AgentsFIWARE Wednesday Webinars - How to Debug IoT Agents
FIWARE Wednesday Webinars - How to Debug IoT Agents
FIWARE
 
Building an Observability Platform in 389 Difficult Steps
Building an Observability Platform in 389 Difficult StepsBuilding an Observability Platform in 389 Difficult Steps
Building an Observability Platform in 389 Difficult Steps
DigitalOcean
 
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...
InfluxData
 
Securité des container
Securité des containerSecurité des container
Securité des container
Rachid Zarouali
 
ITCamp 2013 - Raffaele Rialdi - Windows Runtime (WinRT) deep dive
ITCamp 2013 - Raffaele Rialdi - Windows Runtime (WinRT) deep diveITCamp 2013 - Raffaele Rialdi - Windows Runtime (WinRT) deep dive
ITCamp 2013 - Raffaele Rialdi - Windows Runtime (WinRT) deep dive
ITCamp
 
Get the Exact Identity Solution You Need - In the Cloud - Overview
Get the Exact Identity Solution You Need - In the Cloud - OverviewGet the Exact Identity Solution You Need - In the Cloud - Overview
Get the Exact Identity Solution You Need - In the Cloud - Overview
ForgeRock
 
Optimizing Direct X On Multi Core Architectures
Optimizing Direct X On Multi Core ArchitecturesOptimizing Direct X On Multi Core Architectures
Optimizing Direct X On Multi Core Architectures
psteinb
 
Practical Tools for Enterprise Uses of Hyperledger Fabric (Audit and System ...
 Practical Tools for Enterprise Uses of Hyperledger Fabric (Audit and System ... Practical Tools for Enterprise Uses of Hyperledger Fabric (Audit and System ...
Practical Tools for Enterprise Uses of Hyperledger Fabric (Audit and System ...
LFDT Tokyo Meetup
 
Custom Script Execution Environment on TD Workflow @ TD Tech Talk 2018-10-17
Custom Script Execution Environment on TD Workflow @ TD Tech Talk 2018-10-17Custom Script Execution Environment on TD Workflow @ TD Tech Talk 2018-10-17
Custom Script Execution Environment on TD Workflow @ TD Tech Talk 2018-10-17
Muga Nishizawa
 
Multi-tenancy with Rails
Multi-tenancy with RailsMulti-tenancy with Rails
Multi-tenancy with Rails
Paul Gallagher
 
Integrating DDS into AXCIOMA, the component approach
Integrating DDS into AXCIOMA, the component approachIntegrating DDS into AXCIOMA, the component approach
Integrating DDS into AXCIOMA, the component approach
Remedy IT
 
Banner XE CAUSE 2013 Part 2
Banner XE CAUSE 2013 Part 2Banner XE CAUSE 2013 Part 2
Banner XE CAUSE 2013 Part 2
Jim Kane
 
Aop, Metaprogramming and codegeneration with PHP
Aop, Metaprogramming and codegeneration with PHPAop, Metaprogramming and codegeneration with PHP
Aop, Metaprogramming and codegeneration with PHP
Serge Smertin
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP Workshop
Linaro
 
Using Algorithms to Brute Force Algorithms...A Journey Through Time and Names...
Using Algorithms to Brute Force Algorithms...A Journey Through Time and Names...Using Algorithms to Brute Force Algorithms...A Journey Through Time and Names...
Using Algorithms to Brute Force Algorithms...A Journey Through Time and Names...
OpenDNS
 
Old code doesn't stink - Detroit
Old code doesn't stink - DetroitOld code doesn't stink - Detroit
Old code doesn't stink - Detroit
Martin Gutenbrunner
 
Undefined Behavior and Compiler Optimizations (NDC Oslo 2018)
Undefined Behavior and Compiler Optimizations (NDC Oslo 2018)Undefined Behavior and Compiler Optimizations (NDC Oslo 2018)
Undefined Behavior and Compiler Optimizations (NDC Oslo 2018)
Patricia Aas
 
drupal ci cd concept cornel univercity.pptx
drupal ci cd concept cornel univercity.pptxdrupal ci cd concept cornel univercity.pptx
drupal ci cd concept cornel univercity.pptx
rukuntravel
 
Android Industrial Mobility - Droidcon Italy - Turin 9-10 April 2015
Android Industrial Mobility - Droidcon Italy - Turin 9-10 April 2015Android Industrial Mobility - Droidcon Italy - Turin 9-10 April 2015
Android Industrial Mobility - Droidcon Italy - Turin 9-10 April 2015
Pietro F. Maggi
 
Robotlegs on Top of Gaia
Robotlegs on Top of GaiaRobotlegs on Top of Gaia
Robotlegs on Top of Gaia
Jesse Warden
 
FIWARE Wednesday Webinars - How to Debug IoT Agents
FIWARE Wednesday Webinars - How to Debug IoT AgentsFIWARE Wednesday Webinars - How to Debug IoT Agents
FIWARE Wednesday Webinars - How to Debug IoT Agents
FIWARE
 
Building an Observability Platform in 389 Difficult Steps
Building an Observability Platform in 389 Difficult StepsBuilding an Observability Platform in 389 Difficult Steps
Building an Observability Platform in 389 Difficult Steps
DigitalOcean
 
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...
InfluxData
 
ITCamp 2013 - Raffaele Rialdi - Windows Runtime (WinRT) deep dive
ITCamp 2013 - Raffaele Rialdi - Windows Runtime (WinRT) deep diveITCamp 2013 - Raffaele Rialdi - Windows Runtime (WinRT) deep dive
ITCamp 2013 - Raffaele Rialdi - Windows Runtime (WinRT) deep dive
ITCamp
 
Get the Exact Identity Solution You Need - In the Cloud - Overview
Get the Exact Identity Solution You Need - In the Cloud - OverviewGet the Exact Identity Solution You Need - In the Cloud - Overview
Get the Exact Identity Solution You Need - In the Cloud - Overview
ForgeRock
 
Optimizing Direct X On Multi Core Architectures
Optimizing Direct X On Multi Core ArchitecturesOptimizing Direct X On Multi Core Architectures
Optimizing Direct X On Multi Core Architectures
psteinb
 
Practical Tools for Enterprise Uses of Hyperledger Fabric (Audit and System ...
 Practical Tools for Enterprise Uses of Hyperledger Fabric (Audit and System ... Practical Tools for Enterprise Uses of Hyperledger Fabric (Audit and System ...
Practical Tools for Enterprise Uses of Hyperledger Fabric (Audit and System ...
LFDT Tokyo Meetup
 
Custom Script Execution Environment on TD Workflow @ TD Tech Talk 2018-10-17
Custom Script Execution Environment on TD Workflow @ TD Tech Talk 2018-10-17Custom Script Execution Environment on TD Workflow @ TD Tech Talk 2018-10-17
Custom Script Execution Environment on TD Workflow @ TD Tech Talk 2018-10-17
Muga Nishizawa
 
Multi-tenancy with Rails
Multi-tenancy with RailsMulti-tenancy with Rails
Multi-tenancy with Rails
Paul Gallagher
 
Integrating DDS into AXCIOMA, the component approach
Integrating DDS into AXCIOMA, the component approachIntegrating DDS into AXCIOMA, the component approach
Integrating DDS into AXCIOMA, the component approach
Remedy IT
 
Banner XE CAUSE 2013 Part 2
Banner XE CAUSE 2013 Part 2Banner XE CAUSE 2013 Part 2
Banner XE CAUSE 2013 Part 2
Jim Kane
 
Aop, Metaprogramming and codegeneration with PHP
Aop, Metaprogramming and codegeneration with PHPAop, Metaprogramming and codegeneration with PHP
Aop, Metaprogramming and codegeneration with PHP
Serge Smertin
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP Workshop
Linaro
 
Using Algorithms to Brute Force Algorithms...A Journey Through Time and Names...
Using Algorithms to Brute Force Algorithms...A Journey Through Time and Names...Using Algorithms to Brute Force Algorithms...A Journey Through Time and Names...
Using Algorithms to Brute Force Algorithms...A Journey Through Time and Names...
OpenDNS
 
Old code doesn't stink - Detroit
Old code doesn't stink - DetroitOld code doesn't stink - Detroit
Old code doesn't stink - Detroit
Martin Gutenbrunner
 
Undefined Behavior and Compiler Optimizations (NDC Oslo 2018)
Undefined Behavior and Compiler Optimizations (NDC Oslo 2018)Undefined Behavior and Compiler Optimizations (NDC Oslo 2018)
Undefined Behavior and Compiler Optimizations (NDC Oslo 2018)
Patricia Aas
 
drupal ci cd concept cornel univercity.pptx
drupal ci cd concept cornel univercity.pptxdrupal ci cd concept cornel univercity.pptx
drupal ci cd concept cornel univercity.pptx
rukuntravel
 
Android Industrial Mobility - Droidcon Italy - Turin 9-10 April 2015
Android Industrial Mobility - Droidcon Italy - Turin 9-10 April 2015Android Industrial Mobility - Droidcon Italy - Turin 9-10 April 2015
Android Industrial Mobility - Droidcon Italy - Turin 9-10 April 2015
Pietro F. Maggi
 
Ad

More from Victor Rentea (20)

Top REST API Desgin Pitfalls @ Devoxx 2024
Top REST API Desgin Pitfalls @ Devoxx 2024Top REST API Desgin Pitfalls @ Devoxx 2024
Top REST API Desgin Pitfalls @ Devoxx 2024
Victor Rentea
 
The Joy of Testing - Deep Dive @ Devoxx Belgium 2024
The Joy of Testing - Deep Dive @ Devoxx Belgium 2024The Joy of Testing - Deep Dive @ Devoxx Belgium 2024
The Joy of Testing - Deep Dive @ Devoxx Belgium 2024
Victor Rentea
 
Distributed Consistency.pdf
Distributed Consistency.pdfDistributed Consistency.pdf
Distributed Consistency.pdf
Victor Rentea
 
Clean Code @Voxxed Days Cluj 2023 - opening Keynote
Clean Code @Voxxed Days Cluj 2023 - opening KeynoteClean Code @Voxxed Days Cluj 2023 - opening Keynote
Clean Code @Voxxed Days Cluj 2023 - opening Keynote
Victor Rentea
 
Testing Microservices @DevoxxBE 23.pdf
Testing Microservices @DevoxxBE 23.pdfTesting Microservices @DevoxxBE 23.pdf
Testing Microservices @DevoxxBE 23.pdf
Victor Rentea
 
From Web to Flux @DevoxxBE 2023.pptx
From Web to Flux @DevoxxBE 2023.pptxFrom Web to Flux @DevoxxBE 2023.pptx
From Web to Flux @DevoxxBE 2023.pptx
Victor Rentea
 
Test-Driven Design Insights@DevoxxBE 2023.pptx
Test-Driven Design Insights@DevoxxBE 2023.pptxTest-Driven Design Insights@DevoxxBE 2023.pptx
Test-Driven Design Insights@DevoxxBE 2023.pptx
Victor Rentea
 
Profiling your Java Application
Profiling your Java ApplicationProfiling your Java Application
Profiling your Java Application
Victor Rentea
 
OAuth in the Wild
OAuth in the WildOAuth in the Wild
OAuth in the Wild
Victor Rentea
 
Unit testing - 9 design hints
Unit testing - 9 design hintsUnit testing - 9 design hints
Unit testing - 9 design hints
Victor Rentea
 
Extreme Professionalism - Software Craftsmanship
Extreme Professionalism - Software CraftsmanshipExtreme Professionalism - Software Craftsmanship
Extreme Professionalism - Software Craftsmanship
Victor Rentea
 
Refactoring blockers and code smells @jNation 2021
Refactoring   blockers and code smells @jNation 2021Refactoring   blockers and code smells @jNation 2021
Refactoring blockers and code smells @jNation 2021
Victor Rentea
 
Hibernate and Spring - Unleash the Magic
Hibernate and Spring - Unleash the MagicHibernate and Spring - Unleash the Magic
Hibernate and Spring - Unleash the Magic
Victor Rentea
 
Integration testing with spring @JAX Mainz
Integration testing with spring @JAX MainzIntegration testing with spring @JAX Mainz
Integration testing with spring @JAX Mainz
Victor Rentea
 
The Proxy Fairy and the Magic of Spring @JAX Mainz 2021
The Proxy Fairy and the Magic of Spring @JAX Mainz 2021The Proxy Fairy and the Magic of Spring @JAX Mainz 2021
The Proxy Fairy and the Magic of Spring @JAX Mainz 2021
Victor Rentea
 
Integration testing with spring @snow one
Integration testing with spring @snow oneIntegration testing with spring @snow one
Integration testing with spring @snow one
Victor Rentea
 
Pure functions and immutable objects @dev nexus 2021
Pure functions and immutable objects @dev nexus 2021Pure functions and immutable objects @dev nexus 2021
Pure functions and immutable objects @dev nexus 2021
Victor Rentea
 
TDD Mantra
TDD MantraTDD Mantra
TDD Mantra
Victor Rentea
 
Definitive Guide to Working With Exceptions in Java - takj at Java Champions ...
Definitive Guide to Working With Exceptions in Java - takj at Java Champions ...Definitive Guide to Working With Exceptions in Java - takj at Java Champions ...
Definitive Guide to Working With Exceptions in Java - takj at Java Champions ...
Victor Rentea
 
Pure Functions and Immutable Objects
Pure Functions and Immutable ObjectsPure Functions and Immutable Objects
Pure Functions and Immutable Objects
Victor Rentea
 
Top REST API Desgin Pitfalls @ Devoxx 2024
Top REST API Desgin Pitfalls @ Devoxx 2024Top REST API Desgin Pitfalls @ Devoxx 2024
Top REST API Desgin Pitfalls @ Devoxx 2024
Victor Rentea
 
The Joy of Testing - Deep Dive @ Devoxx Belgium 2024
The Joy of Testing - Deep Dive @ Devoxx Belgium 2024The Joy of Testing - Deep Dive @ Devoxx Belgium 2024
The Joy of Testing - Deep Dive @ Devoxx Belgium 2024
Victor Rentea
 
Distributed Consistency.pdf
Distributed Consistency.pdfDistributed Consistency.pdf
Distributed Consistency.pdf
Victor Rentea
 
Clean Code @Voxxed Days Cluj 2023 - opening Keynote
Clean Code @Voxxed Days Cluj 2023 - opening KeynoteClean Code @Voxxed Days Cluj 2023 - opening Keynote
Clean Code @Voxxed Days Cluj 2023 - opening Keynote
Victor Rentea
 
Testing Microservices @DevoxxBE 23.pdf
Testing Microservices @DevoxxBE 23.pdfTesting Microservices @DevoxxBE 23.pdf
Testing Microservices @DevoxxBE 23.pdf
Victor Rentea
 
From Web to Flux @DevoxxBE 2023.pptx
From Web to Flux @DevoxxBE 2023.pptxFrom Web to Flux @DevoxxBE 2023.pptx
From Web to Flux @DevoxxBE 2023.pptx
Victor Rentea
 
Test-Driven Design Insights@DevoxxBE 2023.pptx
Test-Driven Design Insights@DevoxxBE 2023.pptxTest-Driven Design Insights@DevoxxBE 2023.pptx
Test-Driven Design Insights@DevoxxBE 2023.pptx
Victor Rentea
 
Profiling your Java Application
Profiling your Java ApplicationProfiling your Java Application
Profiling your Java Application
Victor Rentea
 
Unit testing - 9 design hints
Unit testing - 9 design hintsUnit testing - 9 design hints
Unit testing - 9 design hints
Victor Rentea
 
Extreme Professionalism - Software Craftsmanship
Extreme Professionalism - Software CraftsmanshipExtreme Professionalism - Software Craftsmanship
Extreme Professionalism - Software Craftsmanship
Victor Rentea
 
Refactoring blockers and code smells @jNation 2021
Refactoring   blockers and code smells @jNation 2021Refactoring   blockers and code smells @jNation 2021
Refactoring blockers and code smells @jNation 2021
Victor Rentea
 
Hibernate and Spring - Unleash the Magic
Hibernate and Spring - Unleash the MagicHibernate and Spring - Unleash the Magic
Hibernate and Spring - Unleash the Magic
Victor Rentea
 
Integration testing with spring @JAX Mainz
Integration testing with spring @JAX MainzIntegration testing with spring @JAX Mainz
Integration testing with spring @JAX Mainz
Victor Rentea
 
The Proxy Fairy and the Magic of Spring @JAX Mainz 2021
The Proxy Fairy and the Magic of Spring @JAX Mainz 2021The Proxy Fairy and the Magic of Spring @JAX Mainz 2021
The Proxy Fairy and the Magic of Spring @JAX Mainz 2021
Victor Rentea
 
Integration testing with spring @snow one
Integration testing with spring @snow oneIntegration testing with spring @snow one
Integration testing with spring @snow one
Victor Rentea
 
Pure functions and immutable objects @dev nexus 2021
Pure functions and immutable objects @dev nexus 2021Pure functions and immutable objects @dev nexus 2021
Pure functions and immutable objects @dev nexus 2021
Victor Rentea
 
Definitive Guide to Working With Exceptions in Java - takj at Java Champions ...
Definitive Guide to Working With Exceptions in Java - takj at Java Champions ...Definitive Guide to Working With Exceptions in Java - takj at Java Champions ...
Definitive Guide to Working With Exceptions in Java - takj at Java Champions ...
Victor Rentea
 
Pure Functions and Immutable Objects
Pure Functions and Immutable ObjectsPure Functions and Immutable Objects
Pure Functions and Immutable Objects
Victor Rentea
 
Ad

Recently uploaded (20)

2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 

Clean pragmatic architecture @ devflix

  • 2. Hi, I'm Victor Rentea Java Champion – drinking since 2006 Trainer – 3000+ devs / 80+ companies, since 2013 Speaker – Conferences & Meetups Hibernate Spring Java8/FP Java Performance Secure Coding Reactive Architecture Clean Code Unit Testing
  • 3. $ Hibernate Spring Java8/FP Architecture Clean Code Unit Testing Masterclass Company Training Video Courses YouTube Channel 💗 Join My Community Blog @victorrentea VictorRentea.ro [email protected] Java Performance Secure Coding Reactive
  • 4. 172 VictorRentea.ro a training by Chapter 1. Data Structures
  • 5. 173 VictorRentea.ro a training by Can I have a chicken?
  • 6. The data structure they send you The data structure you want to use in your core logic DTO domain Object
  • 7. 175 VictorRentea.ro a training by DTOs* are Evil *Data Transfer Objects – data structures that move across APIs
  • 8. 176 VictorRentea.ro a training by ☢ Beware of Foreign Data Structures ☢ ➢ Bloated (more fields than you need) ➢ Flat ➢ Different perspective 🐔 (bounded context) ➢ Fixed design (often generated or in client-lib) ➢ Mutable (pain from frameworks otherwise) ➢ No constraints (nulls, validation, invariants) ➢ Diverging in time (v2) We 💗 small, cohesive data structures We 💗 Logic next to data (OOP) We 💗 Immutable objects We 💗 Deep, Rich Domain Model We 💗 Models to guard their invariants We want control over our structures Because DTOs are: In our core logic: We 💗 Structures tailored to our problem
  • 9. 177 © VictorRentea.ro a training by Don't implement complex logic on foreign data structures Elders Wisdom What's complex? What's foreign?
  • 10. 178 VictorRentea.ro a training by Bounded Context A (TeamA) The Curious Case of Nanoservices DTOs can be shared within the same Bounded Context (team) =tiny microservice eg. 5 devs maintaining 20 microservices 1 2 3 Bounded Context B (TeamB) X But not with others What's foreign?
  • 11. 179 VictorRentea.ro a training by ⚠ Returning entities as JSON ⚠ ➢ Couples your clients to your internal entity structure ➢ Is risky to marshal and of course...
  • 12. 180 VictorRentea.ro a training by Decouple DTO Domain Model < > Price: more classes + more mapping Exception: Boundary Systems = Huge Adapters without own Domain Software Ecosystem A - Manually Crafted DTO - Generated DTOs: XML: .xsd/.wsdl ➔ xjc JSON: .yaml ➔ swagger-gen Auto-Generated Mappers
  • 13. 181 VictorRentea.ro a training by Auto-Generated Mappers Converting Entity  DTO with as long as the field names match, mapping happens automatically eg MapStruct Temptation to keep the models in sync Entities and DTOs must be allowed to diverge Customer.firstName  CustomerDto.firstName War Stories: When mapping gets complex, deep knowledge of MapStruct is required ➔ Consider switching to manual mapping (simpler) ?
  • 14. 182 © VictorRentea.ro a training by Don't implement complex logic on foreign data structures Elders Wisdom
  • 15. 183 VictorRentea.ro a training by Chapter 2. Logic
  • 17. 185 VictorRentea.ro a training by The Code - anonymous developer
  • 18. 186 VictorRentea.ro a training by Layers SUB-DOMAINS Controller Service Repository APIs order Product user customer API infrastructure too complex ➔
  • 19. 187 VictorRentea.ro a training by Layers Controller Repository APIs Facade / Application Service Layered Architecture DOMAIN Service
  • 20. 188 VictorRentea.ro a training by Controller Repository call direction pull orchestration up, let Repos trivial Relaxed Layered Architecture allows skipping layers Layered Architecture DOMAIN Service Facade / Application Service
  • 21. 190 VictorRentea.ro a training by by pushing details in lower-level classes Muscle Fascicle Fiber Myofibril Myofilaments Goal = Simplify the top-level view of your flow Facade = Separation by Layers of Abstraction
  • 22. 191 Code is NOT a Construction
  • 24. 193 VictorRentea.ro a training by requirements Logic Service Facade HOW? Entities OOP 1) One class/use-case GetOrderByIdService - ⚠ tiny class PlaceOrderService - ⚠ god class -or- 2) N use-cases in a class class OrderFacade { ⚠ god class placeOrder() getOrderById() } 5-10%..more?💪 Continuously Extract ApplicationService DomainService simplify the most complex flows
  • 25. 194 VictorRentea.ro a training by Mapper DTO Facade Facade Domain Service Domain Service Domain Services Ideas inspired by the book Java EE Patterns - Rethinking Best Practices, by Adam Bien Push Domain Logic into Start implementing every use-case in a Facade For trivial User Cases a method is enough eg. getOrderById When logic gets complex, or has to be reused (evolutionary architecture)
  • 26. 195 VictorRentea.ro a training by Mapper DTO Facade Domain Service Domain Service take and return only Domain Objects or primitives Don't Depend on DTOs Domain Boundary DTOs are Evil VO Entity id Convert them to your Domain Objects ASAP Domain Services
  • 27. 196 VictorRentea.ro a training by Cohesive Domain Services OrderService PlaceOrderService ⚠Bloat Risk, if Order is a large Entity
  • 28. @VictorRentea 197 Facade Roles - Summary • Converts DTOs  Entities • inline, via [Auto-]Mappers, or Dto constructors/methods. • Validates inputs • @javax.validation.NotNull, if ... • Transaction / use-case • Except in high-TPS systems • Orchestrates the workflow of a 🧠 use-case • By delegating to lower-level components
  • 30. 199 VictorRentea.ro a training by Domain Service Domain Service External Service domain DTO call may get in
  • 31. 200 VictorRentea.ro a training by External Service DTO Adapter Domain Service Domain Service domain
  • 32. 201 VictorRentea.ro a training by External Service DTO Adapter Domain Service Domain Service <dependency> domain infrastructure
  • 33. VictorRentea.ro 202 External Service DTO IAdapter Adapter implements class UserApiClient implements IUserAdapter { public User getById(id){ <external call> } } interface IUserAdapter { User getById(id); } class OrderService { @Autowired IUserAdapter adapter; ... adapter.getById(id); } express your need in a domain interface… and implement it in a lower-level module… When you need to call outside… so nothing foreign enters your domain. Domain Service Domain Service <dependency> domain infrastructure
  • 34. 203 VictorRentea.ro a training by calls Dependency Inversion Principle <dependency> higher-level module lower-level module "Best of OOP" - Uncle Bob Abstractions should not depend on details Low level classes are not visible (SOLID Principles) Dependency Inversion
  • 35. 204 VictorRentea.ro a training by calls <dependency> higher-level module lower-level module RMI, HTTP gRPC.. FTP Queue DB DTO Dependency Inversion
  • 36. 206 VictorRentea.ro a training by Stop Code Dependencies from complex logic ➔ externals Dependency Inversion Package Dependency Checks - via static code analysis - by compiler @Test public void dependencyInversionTest() { ArchRuleDefinition .noClasses().that().resideInAPackage("..domain") .should().dependOnClassesThat().resideInAPackage("..infra") .check(new ClassFileImporter().importPackages("my.corp.app")); } testImplementation com.tngtech.archunit:archunit-junit4:0.15.0 or NDepend (C#) https://nx.dev/latest/angular/structure/monorepo-tags https://github.com/MaibornWolff/ts-arch
  • 37. 207 VictorRentea.ro a training by An Agnostic Domain lets you focus on YOUR problem Agnostic Domain
  • 38. 209 VictorRentea.ro a training by infrastructure EXTERNAL API Value Object Entity id Domain Service IAdapter Onion Architecture Behold, the famous Database domain Repo Dep Inv Dep Inv DTO Agnostic Domain application DTO Your Client Validation Separate Persistence Model if DB == enemy Façade Mapper Controller Msg Handler Adapter Spring Data IRepo
  • 39. 210 VictorRentea.ro a training by DTO Value Object Entity id Domain Service application Database domain DTO Onion Architecture Pragmatic Agnostic Domain EXTERNAL API Your Client Façade Mapper Controller Adapter IAdapter IRepo Dep Inv "Light-CQRS" Selecting DTOs directly from queries
  • 40. 211 VictorRentea.ro a training by Independent of Intrusive Frameworks Testable Standalone without a DB, UI, Web Server, etc... https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html Independent of UI mobile, web, or desktop Independent of DB avoid PL/SQL, no vendor lock-in Independent of External APIs = external Bounded Contexts Is an ORM intrusive? Keep core logic ... Agnostic Domain aka Hexagonal aka Ports-and-Adapters aka Clean Architecture Onion Architecture Learn Hibernate: https://www.youtube.com/watch?v=iw0tOx7Zbjc
  • 42. 213 VictorRentea.ro a training by Anemic Domain Model ("classic" approach) Rich Domain Model (Domain-Driven Design) vs Getters & Setters for all fields All logic written in Services Getters but less setters Logic using fields of class X stays in X Self-validating model eg. Address constructor validates its consistency Aggregates as consistency boundaries Invariants enforced by Services eg. Shipment requires a postal code, unless city=Bucharest
  • 43. 214 VictorRentea.ro a training by Chapter 3. Value Objects
  • 44. 215 VictorRentea.ro a training by How many fields it has? Can you make it immutable? Tell me about that big entity ... How do you feel about moving logic inside?
  • 45. 216 VictorRentea.ro a training by How many fields it has? Can you make it immutable? How do you feel about moving logic inside? Yes! (use @Embeddable for JPA) But, How to identify Value Objects? Extract Value Objects from Entities:
  • 46. 217 VictorRentea.ro a training by Conceptual Whole Money {amount, currency} FullName {first, last} Changes Together LastModified-Time/-ByUser How to identify Value Objects? Screens InvoicingDetails Moves Together PriceComputationInput
  • 47. 218 VictorRentea.ro a training by Key Points DTOs are evil Build a Deep, Rich Domain Model Protect your Domain with DIP or ArchUnit Don't let persistence concerns influence your Model design Continuously Refactor to keep code suple The entire team should understand the Design Goals Be Pragmatic. Think Critically! dogmas