14
Browser
Ȑ Application
Database
{…}
JS
Mobile
{…}
CRUD
CRUD +
Validation
Business logic
Validation
Slide 12
Slide 12 text
?
15
!
Slide 13
Slide 13 text
?
16
!
Slide 14
Slide 14 text
?
17
!
Slide 15
Slide 15 text
18
Slide 16
Slide 16 text
20
Slide 17
Slide 17 text
21
From: Stefan Tilkov – Microservices: Patterns and Antipatterns
Data CRUD via HTTP / JDBC in disguise
Slide 18
Slide 18 text
22
From: Geek And Poke – Future-proof Your Data Model
Slide 19
Slide 19 text
23
Slide 20
Slide 20 text
24
From: Stefan Tilkov – Microservices: Patterns and Antipatterns
Data
Domain Logic
CRUD via HTTP / JDBC in disguise
Spring Data REST / Re-usable, but low-level
Slide 21
Slide 21 text
24
From: Stefan Tilkov – Microservices: Patterns and Antipatterns
Data
Domain Logic
Process Flow
CRUD via HTTP / JDBC in disguise
Spring Data REST / Re-usable, but low-level
Useful and specific
Slide 22
Slide 22 text
25
Data
Domain Logic
Process Flow
Presentation
From: Stefan Tilkov – Microservices: Patterns and Antipatterns
CRUD via HTTP / JDBC in disguise
Spring Data REST / Re-usable, but low-level
Useful and specific
Slide 23
Slide 23 text
26
Data
Domain Logic
Process Flow
Presentation
Clients
Server
&
Slide 24
Slide 24 text
27
Data
Domain Logic
Process Flow
Presentation
Clients
Server
Clients
Server
?
39
Jim Weirich, 2009 – Video @ YouTube
The Grand Unified Theory
Meilir Page-Jones, 2000 – Book @ Amazon
Fundamentals of Object-oriented Design in UML
Slide 35
Slide 35 text
40
From: Connascence – Wikipedia
Slide 36
Slide 36 text
41
From: Connascence – Wikipedia
Slide 37
Slide 37 text
…
…
…
…
…
42
Slide 38
Slide 38 text
VERSIONING
43
Slide 39
Slide 39 text
„ ’ !“
1 0
2 0 2 1…
44
"
Slide 40
Slide 40 text
The Cost of Versioning an API
45
From: Jacques Dubray - Understanding the cost of versioning an API
Slide 41
Slide 41 text
HYPERMEDIA
46
Slide 42
Slide 42 text
47
Slide 43
Slide 43 text
48
Slide 44
Slide 44 text
’
49
Slide 45
Slide 45 text
50
payment
expected
preparing
cancelled
ready completed
1
2
3
4
5 6
From: REST In Practice – O'Reilly
Sample code @ GitHub: Spring RESTBucks
Slide 46
Slide 46 text
51
Method URI Action Step
POST /orders Create new order 1
POST/PATCH /orders/{id}
Update the order
(only if "payment expected")
2
DELETE /orders/{id}
Cancel order
(only if "payment expected")
3
PUT /orders/{id}/payment
Pay order
(only if "payment expected")
4
Barista preparing the order
GET /orders/{id} Poll order state 5
GET /orders/{id}/receipt Access receipt
DELETE /orders/{id}/receipt Conclude the order process 6
Method URI Action Step
POST /orders Create new order 1
POST/PATCH /orders/{id}
Update the order
(only if "payment expected")
2
DELETE /orders/{id}
Cancel order
(only if "payment expected")
3
PUT /orders/{id}/payment
Pay order
(only if "payment expected")
4
Barista preparing the order
GET /orders/{id} Poll order state 5
GET /orders/{id}/receipt Access receipt
DELETE /orders/{id}/receipt Conclude the order process 6
59
Slide 55
Slide 55 text
60
Method Resource type Action Step
POST orders Create new order 1
POST/PATCH update Update the order 2
DELETE cancel Cancel order 3
PUT payment Pay order 4
Barista preparing the order
GET order Poll order state 5
GET receipt Access receipt
DELETE receipt Conclude the order process 6
64
Amount of domain knowledge in the client
Amount of protocol knowledge in the client
Coupling to the server
Non-hypermedia
based systems
Hypermedia
based systems
66
Architectural Styles and the Design of Network-based Software Architectures
Fielding – Dissertation PDF
Evolving Distributed Systems
Gierke – Blog
Microservices: Patterns and Antipatterns
Tilkov – Slide deck @ Speakerdeck
Fundamentals of Object-oriented Design in UML
Meilir Page-Jones, 2000 – Book @ Amazon
The Grand Unified Theory
Jim Weirich, 2009 – Video @ YouTube
Slide 62
Slide 62 text
REST In Practice
Parastatidis, Webber, Robinson – Book @ O'Reilly
Spring RESTBucks
Drotbohm – Code @ GitHub
Spring HATEOAS
Project website
Spring REST Docs
Project website
Spring Cloud Contract
Project website
67