rest in practice
TRANSCRIPT
![Page 1: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/1.jpg)
REST In Practice
Gaacutebor Toumlroumlk EPAMSzeged
GET
Introduction overview
Best practices
Java support
Agenda
Introduction
Roy T Fielding PhD dissertation 2000
Main characteristics Client-server Stateless Caching Layered architecture Code on demand URIs
REpresentational State Transfer
Levels of REST
Image c
ourt
esy
of
Mart
in F
ow
ler
Richardsonrsquos Maturity Model
Plain Old XML (over HTTP)
One URI one method
Level 0 Swamp of POX
POST appointmentService HTTP11
ltopenSlotRequest date=2010-01-04 doctor=mjonesgt
Level 0 POX request
HTTP11 200 OK
ltopenSlotListgt ltslot start=1400 end=1450gt ltdoctor id=mjonesgt ltslotgt ltslot start=1600 end=1650gt ltdoctor id=mjonesgt ltslotgtltopenSlotListgt
Level 0 POX response
POST appointmentService HTTP11
ltappointmentRequestgt ltslot doctor=mjones start=1400
end=1450gt ltpatient id=jsmithgtltappointmentRequestgt
Level 0 POX request
HTTP11 200 OK
ltappointmentgt ltslot doctor=mjones start=1400 end=1450gt ltpatient id=jsmithgtltappointmentgt
Level 0 POX response
Many URIs one method
Level 1 Resources
POST doctorsmjones HTTP11
ltopenSlotRequest date=2010-01-04gt
Level 1 Resources request
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjones
start=1400 end=1450gt ltslot id=5678 doctor=mjones
start=1600 end=1650gtltopenSlotListgt
Level 1 Resources response
POST slots1234 HTTP11
ltappointmentRequestgt ltpatient id=jsmithgtltappointmentRequestgt
Level 1 Resources request
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 1 Resources response
Many URIs many (HTTP) methods
This is what most call REST
Best practices follow
Level 2 Verbs
GET doctorsmjonesslotsdate=20100104ampstatus=open HTTP11
Level 2 Verbs request
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjones
start=1400 end=1450gt ltslot id=5678 doctor=mjones
start=1600 end=1650gtltopenSlotListgt
Level 2 Verbs response
POST slots1234 HTTP11
ltappointmentRequestgt ltpatient id=jsmithgtltappointmentRequestgt
Level 2 Verbs request
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 2 Verbs response
W3 bdquoCool URIs donrsquot changerdquovs
Roy Fielding bdquoA REST API must not define fixed resource names or hierarchiesrdquo
HATEOAS amp self-descriptive messages
Problems peoplersquos awareness tools
Level 3 HyperMedia
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjonesrdquo start=1400 end=1450gt ltlink rel=linkrelsslotbook
uri=slots1234gt ltslotgt
hellipltopenSlotListgt
Level 3 Hypermedia response
HTTP11 201 CreatedLocation httpslots1234appointment
ltappointmentgt ltslot id=1234 hellipgt ltpatient id=jsmithgt ltlink rel=linkrelsappointmentcancel uri=slots1234appointmentgt ltlink rel=self uri=slots1234appointmentgtltappointmentgt
Level 3 Hypermedia response
Solves interop problems WSDL contractStrong typingClient- and server bindingsOperations (ie verbs)
WS- support (Security AtomicTransaction etc)
GETingPOSTing an XML
Many proxies block PUT Non-intuitive
SOAP
Level 0
Best practices
Resources vs actions
getTickets vs ticketsgetMusemTickets vs ticketstype=museum
Nouns vs verbs
Resource GET POST PUT DELETE
tickets List tickets Create a new ticket
Bulk update Delete all tickets
tickets123 Get the details of one ticket
Error Update a given ticket
Delete a given ticket
Base URL structure
Plural + IDCRUD-style operationsConcrete not abstract names
httpapicompanycomcafev1
Major rev only
Numbers not nicknames dates etc
Versioning
HTTP status codes
Short description Pointer to more information
Error handling
201
200
400204
401
403
404
503
405
500200 400
500
HTTP Status Code 401
status 401 messageAuthenticate code 12345 more infohttpdeveloperscompanycomdocserrors12345
Error handling
Ways to differentiate
tickets123jsontickets123format=jsonAccept applicationjson
Bonus applicationcompanyv1+json
Format handling
Paginationticketsoffset=50amplimit=25
Partial responseticketsfields=datelocation
Use defaults (documentation)
Pagination partial response defaults
Session management ndash REST is stateless
Caching ndash itrsquos very much encouraged
What if nouns are not appropriate ndash use verbs
The rest of REST ndash 21
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 2: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/2.jpg)
Introduction overview
Best practices
Java support
Agenda
Introduction
Roy T Fielding PhD dissertation 2000
Main characteristics Client-server Stateless Caching Layered architecture Code on demand URIs
REpresentational State Transfer
Levels of REST
Image c
ourt
esy
of
Mart
in F
ow
ler
Richardsonrsquos Maturity Model
Plain Old XML (over HTTP)
One URI one method
Level 0 Swamp of POX
POST appointmentService HTTP11
ltopenSlotRequest date=2010-01-04 doctor=mjonesgt
Level 0 POX request
HTTP11 200 OK
ltopenSlotListgt ltslot start=1400 end=1450gt ltdoctor id=mjonesgt ltslotgt ltslot start=1600 end=1650gt ltdoctor id=mjonesgt ltslotgtltopenSlotListgt
Level 0 POX response
POST appointmentService HTTP11
ltappointmentRequestgt ltslot doctor=mjones start=1400
end=1450gt ltpatient id=jsmithgtltappointmentRequestgt
Level 0 POX request
HTTP11 200 OK
ltappointmentgt ltslot doctor=mjones start=1400 end=1450gt ltpatient id=jsmithgtltappointmentgt
Level 0 POX response
Many URIs one method
Level 1 Resources
POST doctorsmjones HTTP11
ltopenSlotRequest date=2010-01-04gt
Level 1 Resources request
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjones
start=1400 end=1450gt ltslot id=5678 doctor=mjones
start=1600 end=1650gtltopenSlotListgt
Level 1 Resources response
POST slots1234 HTTP11
ltappointmentRequestgt ltpatient id=jsmithgtltappointmentRequestgt
Level 1 Resources request
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 1 Resources response
Many URIs many (HTTP) methods
This is what most call REST
Best practices follow
Level 2 Verbs
GET doctorsmjonesslotsdate=20100104ampstatus=open HTTP11
Level 2 Verbs request
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjones
start=1400 end=1450gt ltslot id=5678 doctor=mjones
start=1600 end=1650gtltopenSlotListgt
Level 2 Verbs response
POST slots1234 HTTP11
ltappointmentRequestgt ltpatient id=jsmithgtltappointmentRequestgt
Level 2 Verbs request
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 2 Verbs response
W3 bdquoCool URIs donrsquot changerdquovs
Roy Fielding bdquoA REST API must not define fixed resource names or hierarchiesrdquo
HATEOAS amp self-descriptive messages
Problems peoplersquos awareness tools
Level 3 HyperMedia
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjonesrdquo start=1400 end=1450gt ltlink rel=linkrelsslotbook
uri=slots1234gt ltslotgt
hellipltopenSlotListgt
Level 3 Hypermedia response
HTTP11 201 CreatedLocation httpslots1234appointment
ltappointmentgt ltslot id=1234 hellipgt ltpatient id=jsmithgt ltlink rel=linkrelsappointmentcancel uri=slots1234appointmentgt ltlink rel=self uri=slots1234appointmentgtltappointmentgt
Level 3 Hypermedia response
Solves interop problems WSDL contractStrong typingClient- and server bindingsOperations (ie verbs)
WS- support (Security AtomicTransaction etc)
GETingPOSTing an XML
Many proxies block PUT Non-intuitive
SOAP
Level 0
Best practices
Resources vs actions
getTickets vs ticketsgetMusemTickets vs ticketstype=museum
Nouns vs verbs
Resource GET POST PUT DELETE
tickets List tickets Create a new ticket
Bulk update Delete all tickets
tickets123 Get the details of one ticket
Error Update a given ticket
Delete a given ticket
Base URL structure
Plural + IDCRUD-style operationsConcrete not abstract names
httpapicompanycomcafev1
Major rev only
Numbers not nicknames dates etc
Versioning
HTTP status codes
Short description Pointer to more information
Error handling
201
200
400204
401
403
404
503
405
500200 400
500
HTTP Status Code 401
status 401 messageAuthenticate code 12345 more infohttpdeveloperscompanycomdocserrors12345
Error handling
Ways to differentiate
tickets123jsontickets123format=jsonAccept applicationjson
Bonus applicationcompanyv1+json
Format handling
Paginationticketsoffset=50amplimit=25
Partial responseticketsfields=datelocation
Use defaults (documentation)
Pagination partial response defaults
Session management ndash REST is stateless
Caching ndash itrsquos very much encouraged
What if nouns are not appropriate ndash use verbs
The rest of REST ndash 21
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 3: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/3.jpg)
Introduction
Roy T Fielding PhD dissertation 2000
Main characteristics Client-server Stateless Caching Layered architecture Code on demand URIs
REpresentational State Transfer
Levels of REST
Image c
ourt
esy
of
Mart
in F
ow
ler
Richardsonrsquos Maturity Model
Plain Old XML (over HTTP)
One URI one method
Level 0 Swamp of POX
POST appointmentService HTTP11
ltopenSlotRequest date=2010-01-04 doctor=mjonesgt
Level 0 POX request
HTTP11 200 OK
ltopenSlotListgt ltslot start=1400 end=1450gt ltdoctor id=mjonesgt ltslotgt ltslot start=1600 end=1650gt ltdoctor id=mjonesgt ltslotgtltopenSlotListgt
Level 0 POX response
POST appointmentService HTTP11
ltappointmentRequestgt ltslot doctor=mjones start=1400
end=1450gt ltpatient id=jsmithgtltappointmentRequestgt
Level 0 POX request
HTTP11 200 OK
ltappointmentgt ltslot doctor=mjones start=1400 end=1450gt ltpatient id=jsmithgtltappointmentgt
Level 0 POX response
Many URIs one method
Level 1 Resources
POST doctorsmjones HTTP11
ltopenSlotRequest date=2010-01-04gt
Level 1 Resources request
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjones
start=1400 end=1450gt ltslot id=5678 doctor=mjones
start=1600 end=1650gtltopenSlotListgt
Level 1 Resources response
POST slots1234 HTTP11
ltappointmentRequestgt ltpatient id=jsmithgtltappointmentRequestgt
Level 1 Resources request
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 1 Resources response
Many URIs many (HTTP) methods
This is what most call REST
Best practices follow
Level 2 Verbs
GET doctorsmjonesslotsdate=20100104ampstatus=open HTTP11
Level 2 Verbs request
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjones
start=1400 end=1450gt ltslot id=5678 doctor=mjones
start=1600 end=1650gtltopenSlotListgt
Level 2 Verbs response
POST slots1234 HTTP11
ltappointmentRequestgt ltpatient id=jsmithgtltappointmentRequestgt
Level 2 Verbs request
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 2 Verbs response
W3 bdquoCool URIs donrsquot changerdquovs
Roy Fielding bdquoA REST API must not define fixed resource names or hierarchiesrdquo
HATEOAS amp self-descriptive messages
Problems peoplersquos awareness tools
Level 3 HyperMedia
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjonesrdquo start=1400 end=1450gt ltlink rel=linkrelsslotbook
uri=slots1234gt ltslotgt
hellipltopenSlotListgt
Level 3 Hypermedia response
HTTP11 201 CreatedLocation httpslots1234appointment
ltappointmentgt ltslot id=1234 hellipgt ltpatient id=jsmithgt ltlink rel=linkrelsappointmentcancel uri=slots1234appointmentgt ltlink rel=self uri=slots1234appointmentgtltappointmentgt
Level 3 Hypermedia response
Solves interop problems WSDL contractStrong typingClient- and server bindingsOperations (ie verbs)
WS- support (Security AtomicTransaction etc)
GETingPOSTing an XML
Many proxies block PUT Non-intuitive
SOAP
Level 0
Best practices
Resources vs actions
getTickets vs ticketsgetMusemTickets vs ticketstype=museum
Nouns vs verbs
Resource GET POST PUT DELETE
tickets List tickets Create a new ticket
Bulk update Delete all tickets
tickets123 Get the details of one ticket
Error Update a given ticket
Delete a given ticket
Base URL structure
Plural + IDCRUD-style operationsConcrete not abstract names
httpapicompanycomcafev1
Major rev only
Numbers not nicknames dates etc
Versioning
HTTP status codes
Short description Pointer to more information
Error handling
201
200
400204
401
403
404
503
405
500200 400
500
HTTP Status Code 401
status 401 messageAuthenticate code 12345 more infohttpdeveloperscompanycomdocserrors12345
Error handling
Ways to differentiate
tickets123jsontickets123format=jsonAccept applicationjson
Bonus applicationcompanyv1+json
Format handling
Paginationticketsoffset=50amplimit=25
Partial responseticketsfields=datelocation
Use defaults (documentation)
Pagination partial response defaults
Session management ndash REST is stateless
Caching ndash itrsquos very much encouraged
What if nouns are not appropriate ndash use verbs
The rest of REST ndash 21
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 4: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/4.jpg)
Roy T Fielding PhD dissertation 2000
Main characteristics Client-server Stateless Caching Layered architecture Code on demand URIs
REpresentational State Transfer
Levels of REST
Image c
ourt
esy
of
Mart
in F
ow
ler
Richardsonrsquos Maturity Model
Plain Old XML (over HTTP)
One URI one method
Level 0 Swamp of POX
POST appointmentService HTTP11
ltopenSlotRequest date=2010-01-04 doctor=mjonesgt
Level 0 POX request
HTTP11 200 OK
ltopenSlotListgt ltslot start=1400 end=1450gt ltdoctor id=mjonesgt ltslotgt ltslot start=1600 end=1650gt ltdoctor id=mjonesgt ltslotgtltopenSlotListgt
Level 0 POX response
POST appointmentService HTTP11
ltappointmentRequestgt ltslot doctor=mjones start=1400
end=1450gt ltpatient id=jsmithgtltappointmentRequestgt
Level 0 POX request
HTTP11 200 OK
ltappointmentgt ltslot doctor=mjones start=1400 end=1450gt ltpatient id=jsmithgtltappointmentgt
Level 0 POX response
Many URIs one method
Level 1 Resources
POST doctorsmjones HTTP11
ltopenSlotRequest date=2010-01-04gt
Level 1 Resources request
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjones
start=1400 end=1450gt ltslot id=5678 doctor=mjones
start=1600 end=1650gtltopenSlotListgt
Level 1 Resources response
POST slots1234 HTTP11
ltappointmentRequestgt ltpatient id=jsmithgtltappointmentRequestgt
Level 1 Resources request
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 1 Resources response
Many URIs many (HTTP) methods
This is what most call REST
Best practices follow
Level 2 Verbs
GET doctorsmjonesslotsdate=20100104ampstatus=open HTTP11
Level 2 Verbs request
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjones
start=1400 end=1450gt ltslot id=5678 doctor=mjones
start=1600 end=1650gtltopenSlotListgt
Level 2 Verbs response
POST slots1234 HTTP11
ltappointmentRequestgt ltpatient id=jsmithgtltappointmentRequestgt
Level 2 Verbs request
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 2 Verbs response
W3 bdquoCool URIs donrsquot changerdquovs
Roy Fielding bdquoA REST API must not define fixed resource names or hierarchiesrdquo
HATEOAS amp self-descriptive messages
Problems peoplersquos awareness tools
Level 3 HyperMedia
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjonesrdquo start=1400 end=1450gt ltlink rel=linkrelsslotbook
uri=slots1234gt ltslotgt
hellipltopenSlotListgt
Level 3 Hypermedia response
HTTP11 201 CreatedLocation httpslots1234appointment
ltappointmentgt ltslot id=1234 hellipgt ltpatient id=jsmithgt ltlink rel=linkrelsappointmentcancel uri=slots1234appointmentgt ltlink rel=self uri=slots1234appointmentgtltappointmentgt
Level 3 Hypermedia response
Solves interop problems WSDL contractStrong typingClient- and server bindingsOperations (ie verbs)
WS- support (Security AtomicTransaction etc)
GETingPOSTing an XML
Many proxies block PUT Non-intuitive
SOAP
Level 0
Best practices
Resources vs actions
getTickets vs ticketsgetMusemTickets vs ticketstype=museum
Nouns vs verbs
Resource GET POST PUT DELETE
tickets List tickets Create a new ticket
Bulk update Delete all tickets
tickets123 Get the details of one ticket
Error Update a given ticket
Delete a given ticket
Base URL structure
Plural + IDCRUD-style operationsConcrete not abstract names
httpapicompanycomcafev1
Major rev only
Numbers not nicknames dates etc
Versioning
HTTP status codes
Short description Pointer to more information
Error handling
201
200
400204
401
403
404
503
405
500200 400
500
HTTP Status Code 401
status 401 messageAuthenticate code 12345 more infohttpdeveloperscompanycomdocserrors12345
Error handling
Ways to differentiate
tickets123jsontickets123format=jsonAccept applicationjson
Bonus applicationcompanyv1+json
Format handling
Paginationticketsoffset=50amplimit=25
Partial responseticketsfields=datelocation
Use defaults (documentation)
Pagination partial response defaults
Session management ndash REST is stateless
Caching ndash itrsquos very much encouraged
What if nouns are not appropriate ndash use verbs
The rest of REST ndash 21
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 5: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/5.jpg)
Levels of REST
Image c
ourt
esy
of
Mart
in F
ow
ler
Richardsonrsquos Maturity Model
Plain Old XML (over HTTP)
One URI one method
Level 0 Swamp of POX
POST appointmentService HTTP11
ltopenSlotRequest date=2010-01-04 doctor=mjonesgt
Level 0 POX request
HTTP11 200 OK
ltopenSlotListgt ltslot start=1400 end=1450gt ltdoctor id=mjonesgt ltslotgt ltslot start=1600 end=1650gt ltdoctor id=mjonesgt ltslotgtltopenSlotListgt
Level 0 POX response
POST appointmentService HTTP11
ltappointmentRequestgt ltslot doctor=mjones start=1400
end=1450gt ltpatient id=jsmithgtltappointmentRequestgt
Level 0 POX request
HTTP11 200 OK
ltappointmentgt ltslot doctor=mjones start=1400 end=1450gt ltpatient id=jsmithgtltappointmentgt
Level 0 POX response
Many URIs one method
Level 1 Resources
POST doctorsmjones HTTP11
ltopenSlotRequest date=2010-01-04gt
Level 1 Resources request
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjones
start=1400 end=1450gt ltslot id=5678 doctor=mjones
start=1600 end=1650gtltopenSlotListgt
Level 1 Resources response
POST slots1234 HTTP11
ltappointmentRequestgt ltpatient id=jsmithgtltappointmentRequestgt
Level 1 Resources request
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 1 Resources response
Many URIs many (HTTP) methods
This is what most call REST
Best practices follow
Level 2 Verbs
GET doctorsmjonesslotsdate=20100104ampstatus=open HTTP11
Level 2 Verbs request
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjones
start=1400 end=1450gt ltslot id=5678 doctor=mjones
start=1600 end=1650gtltopenSlotListgt
Level 2 Verbs response
POST slots1234 HTTP11
ltappointmentRequestgt ltpatient id=jsmithgtltappointmentRequestgt
Level 2 Verbs request
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 2 Verbs response
W3 bdquoCool URIs donrsquot changerdquovs
Roy Fielding bdquoA REST API must not define fixed resource names or hierarchiesrdquo
HATEOAS amp self-descriptive messages
Problems peoplersquos awareness tools
Level 3 HyperMedia
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjonesrdquo start=1400 end=1450gt ltlink rel=linkrelsslotbook
uri=slots1234gt ltslotgt
hellipltopenSlotListgt
Level 3 Hypermedia response
HTTP11 201 CreatedLocation httpslots1234appointment
ltappointmentgt ltslot id=1234 hellipgt ltpatient id=jsmithgt ltlink rel=linkrelsappointmentcancel uri=slots1234appointmentgt ltlink rel=self uri=slots1234appointmentgtltappointmentgt
Level 3 Hypermedia response
Solves interop problems WSDL contractStrong typingClient- and server bindingsOperations (ie verbs)
WS- support (Security AtomicTransaction etc)
GETingPOSTing an XML
Many proxies block PUT Non-intuitive
SOAP
Level 0
Best practices
Resources vs actions
getTickets vs ticketsgetMusemTickets vs ticketstype=museum
Nouns vs verbs
Resource GET POST PUT DELETE
tickets List tickets Create a new ticket
Bulk update Delete all tickets
tickets123 Get the details of one ticket
Error Update a given ticket
Delete a given ticket
Base URL structure
Plural + IDCRUD-style operationsConcrete not abstract names
httpapicompanycomcafev1
Major rev only
Numbers not nicknames dates etc
Versioning
HTTP status codes
Short description Pointer to more information
Error handling
201
200
400204
401
403
404
503
405
500200 400
500
HTTP Status Code 401
status 401 messageAuthenticate code 12345 more infohttpdeveloperscompanycomdocserrors12345
Error handling
Ways to differentiate
tickets123jsontickets123format=jsonAccept applicationjson
Bonus applicationcompanyv1+json
Format handling
Paginationticketsoffset=50amplimit=25
Partial responseticketsfields=datelocation
Use defaults (documentation)
Pagination partial response defaults
Session management ndash REST is stateless
Caching ndash itrsquos very much encouraged
What if nouns are not appropriate ndash use verbs
The rest of REST ndash 21
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 6: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/6.jpg)
Plain Old XML (over HTTP)
One URI one method
Level 0 Swamp of POX
POST appointmentService HTTP11
ltopenSlotRequest date=2010-01-04 doctor=mjonesgt
Level 0 POX request
HTTP11 200 OK
ltopenSlotListgt ltslot start=1400 end=1450gt ltdoctor id=mjonesgt ltslotgt ltslot start=1600 end=1650gt ltdoctor id=mjonesgt ltslotgtltopenSlotListgt
Level 0 POX response
POST appointmentService HTTP11
ltappointmentRequestgt ltslot doctor=mjones start=1400
end=1450gt ltpatient id=jsmithgtltappointmentRequestgt
Level 0 POX request
HTTP11 200 OK
ltappointmentgt ltslot doctor=mjones start=1400 end=1450gt ltpatient id=jsmithgtltappointmentgt
Level 0 POX response
Many URIs one method
Level 1 Resources
POST doctorsmjones HTTP11
ltopenSlotRequest date=2010-01-04gt
Level 1 Resources request
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjones
start=1400 end=1450gt ltslot id=5678 doctor=mjones
start=1600 end=1650gtltopenSlotListgt
Level 1 Resources response
POST slots1234 HTTP11
ltappointmentRequestgt ltpatient id=jsmithgtltappointmentRequestgt
Level 1 Resources request
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 1 Resources response
Many URIs many (HTTP) methods
This is what most call REST
Best practices follow
Level 2 Verbs
GET doctorsmjonesslotsdate=20100104ampstatus=open HTTP11
Level 2 Verbs request
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjones
start=1400 end=1450gt ltslot id=5678 doctor=mjones
start=1600 end=1650gtltopenSlotListgt
Level 2 Verbs response
POST slots1234 HTTP11
ltappointmentRequestgt ltpatient id=jsmithgtltappointmentRequestgt
Level 2 Verbs request
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 2 Verbs response
W3 bdquoCool URIs donrsquot changerdquovs
Roy Fielding bdquoA REST API must not define fixed resource names or hierarchiesrdquo
HATEOAS amp self-descriptive messages
Problems peoplersquos awareness tools
Level 3 HyperMedia
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjonesrdquo start=1400 end=1450gt ltlink rel=linkrelsslotbook
uri=slots1234gt ltslotgt
hellipltopenSlotListgt
Level 3 Hypermedia response
HTTP11 201 CreatedLocation httpslots1234appointment
ltappointmentgt ltslot id=1234 hellipgt ltpatient id=jsmithgt ltlink rel=linkrelsappointmentcancel uri=slots1234appointmentgt ltlink rel=self uri=slots1234appointmentgtltappointmentgt
Level 3 Hypermedia response
Solves interop problems WSDL contractStrong typingClient- and server bindingsOperations (ie verbs)
WS- support (Security AtomicTransaction etc)
GETingPOSTing an XML
Many proxies block PUT Non-intuitive
SOAP
Level 0
Best practices
Resources vs actions
getTickets vs ticketsgetMusemTickets vs ticketstype=museum
Nouns vs verbs
Resource GET POST PUT DELETE
tickets List tickets Create a new ticket
Bulk update Delete all tickets
tickets123 Get the details of one ticket
Error Update a given ticket
Delete a given ticket
Base URL structure
Plural + IDCRUD-style operationsConcrete not abstract names
httpapicompanycomcafev1
Major rev only
Numbers not nicknames dates etc
Versioning
HTTP status codes
Short description Pointer to more information
Error handling
201
200
400204
401
403
404
503
405
500200 400
500
HTTP Status Code 401
status 401 messageAuthenticate code 12345 more infohttpdeveloperscompanycomdocserrors12345
Error handling
Ways to differentiate
tickets123jsontickets123format=jsonAccept applicationjson
Bonus applicationcompanyv1+json
Format handling
Paginationticketsoffset=50amplimit=25
Partial responseticketsfields=datelocation
Use defaults (documentation)
Pagination partial response defaults
Session management ndash REST is stateless
Caching ndash itrsquos very much encouraged
What if nouns are not appropriate ndash use verbs
The rest of REST ndash 21
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 7: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/7.jpg)
POST appointmentService HTTP11
ltopenSlotRequest date=2010-01-04 doctor=mjonesgt
Level 0 POX request
HTTP11 200 OK
ltopenSlotListgt ltslot start=1400 end=1450gt ltdoctor id=mjonesgt ltslotgt ltslot start=1600 end=1650gt ltdoctor id=mjonesgt ltslotgtltopenSlotListgt
Level 0 POX response
POST appointmentService HTTP11
ltappointmentRequestgt ltslot doctor=mjones start=1400
end=1450gt ltpatient id=jsmithgtltappointmentRequestgt
Level 0 POX request
HTTP11 200 OK
ltappointmentgt ltslot doctor=mjones start=1400 end=1450gt ltpatient id=jsmithgtltappointmentgt
Level 0 POX response
Many URIs one method
Level 1 Resources
POST doctorsmjones HTTP11
ltopenSlotRequest date=2010-01-04gt
Level 1 Resources request
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjones
start=1400 end=1450gt ltslot id=5678 doctor=mjones
start=1600 end=1650gtltopenSlotListgt
Level 1 Resources response
POST slots1234 HTTP11
ltappointmentRequestgt ltpatient id=jsmithgtltappointmentRequestgt
Level 1 Resources request
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 1 Resources response
Many URIs many (HTTP) methods
This is what most call REST
Best practices follow
Level 2 Verbs
GET doctorsmjonesslotsdate=20100104ampstatus=open HTTP11
Level 2 Verbs request
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjones
start=1400 end=1450gt ltslot id=5678 doctor=mjones
start=1600 end=1650gtltopenSlotListgt
Level 2 Verbs response
POST slots1234 HTTP11
ltappointmentRequestgt ltpatient id=jsmithgtltappointmentRequestgt
Level 2 Verbs request
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 2 Verbs response
W3 bdquoCool URIs donrsquot changerdquovs
Roy Fielding bdquoA REST API must not define fixed resource names or hierarchiesrdquo
HATEOAS amp self-descriptive messages
Problems peoplersquos awareness tools
Level 3 HyperMedia
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjonesrdquo start=1400 end=1450gt ltlink rel=linkrelsslotbook
uri=slots1234gt ltslotgt
hellipltopenSlotListgt
Level 3 Hypermedia response
HTTP11 201 CreatedLocation httpslots1234appointment
ltappointmentgt ltslot id=1234 hellipgt ltpatient id=jsmithgt ltlink rel=linkrelsappointmentcancel uri=slots1234appointmentgt ltlink rel=self uri=slots1234appointmentgtltappointmentgt
Level 3 Hypermedia response
Solves interop problems WSDL contractStrong typingClient- and server bindingsOperations (ie verbs)
WS- support (Security AtomicTransaction etc)
GETingPOSTing an XML
Many proxies block PUT Non-intuitive
SOAP
Level 0
Best practices
Resources vs actions
getTickets vs ticketsgetMusemTickets vs ticketstype=museum
Nouns vs verbs
Resource GET POST PUT DELETE
tickets List tickets Create a new ticket
Bulk update Delete all tickets
tickets123 Get the details of one ticket
Error Update a given ticket
Delete a given ticket
Base URL structure
Plural + IDCRUD-style operationsConcrete not abstract names
httpapicompanycomcafev1
Major rev only
Numbers not nicknames dates etc
Versioning
HTTP status codes
Short description Pointer to more information
Error handling
201
200
400204
401
403
404
503
405
500200 400
500
HTTP Status Code 401
status 401 messageAuthenticate code 12345 more infohttpdeveloperscompanycomdocserrors12345
Error handling
Ways to differentiate
tickets123jsontickets123format=jsonAccept applicationjson
Bonus applicationcompanyv1+json
Format handling
Paginationticketsoffset=50amplimit=25
Partial responseticketsfields=datelocation
Use defaults (documentation)
Pagination partial response defaults
Session management ndash REST is stateless
Caching ndash itrsquos very much encouraged
What if nouns are not appropriate ndash use verbs
The rest of REST ndash 21
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 8: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/8.jpg)
HTTP11 200 OK
ltopenSlotListgt ltslot start=1400 end=1450gt ltdoctor id=mjonesgt ltslotgt ltslot start=1600 end=1650gt ltdoctor id=mjonesgt ltslotgtltopenSlotListgt
Level 0 POX response
POST appointmentService HTTP11
ltappointmentRequestgt ltslot doctor=mjones start=1400
end=1450gt ltpatient id=jsmithgtltappointmentRequestgt
Level 0 POX request
HTTP11 200 OK
ltappointmentgt ltslot doctor=mjones start=1400 end=1450gt ltpatient id=jsmithgtltappointmentgt
Level 0 POX response
Many URIs one method
Level 1 Resources
POST doctorsmjones HTTP11
ltopenSlotRequest date=2010-01-04gt
Level 1 Resources request
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjones
start=1400 end=1450gt ltslot id=5678 doctor=mjones
start=1600 end=1650gtltopenSlotListgt
Level 1 Resources response
POST slots1234 HTTP11
ltappointmentRequestgt ltpatient id=jsmithgtltappointmentRequestgt
Level 1 Resources request
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 1 Resources response
Many URIs many (HTTP) methods
This is what most call REST
Best practices follow
Level 2 Verbs
GET doctorsmjonesslotsdate=20100104ampstatus=open HTTP11
Level 2 Verbs request
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjones
start=1400 end=1450gt ltslot id=5678 doctor=mjones
start=1600 end=1650gtltopenSlotListgt
Level 2 Verbs response
POST slots1234 HTTP11
ltappointmentRequestgt ltpatient id=jsmithgtltappointmentRequestgt
Level 2 Verbs request
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 2 Verbs response
W3 bdquoCool URIs donrsquot changerdquovs
Roy Fielding bdquoA REST API must not define fixed resource names or hierarchiesrdquo
HATEOAS amp self-descriptive messages
Problems peoplersquos awareness tools
Level 3 HyperMedia
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjonesrdquo start=1400 end=1450gt ltlink rel=linkrelsslotbook
uri=slots1234gt ltslotgt
hellipltopenSlotListgt
Level 3 Hypermedia response
HTTP11 201 CreatedLocation httpslots1234appointment
ltappointmentgt ltslot id=1234 hellipgt ltpatient id=jsmithgt ltlink rel=linkrelsappointmentcancel uri=slots1234appointmentgt ltlink rel=self uri=slots1234appointmentgtltappointmentgt
Level 3 Hypermedia response
Solves interop problems WSDL contractStrong typingClient- and server bindingsOperations (ie verbs)
WS- support (Security AtomicTransaction etc)
GETingPOSTing an XML
Many proxies block PUT Non-intuitive
SOAP
Level 0
Best practices
Resources vs actions
getTickets vs ticketsgetMusemTickets vs ticketstype=museum
Nouns vs verbs
Resource GET POST PUT DELETE
tickets List tickets Create a new ticket
Bulk update Delete all tickets
tickets123 Get the details of one ticket
Error Update a given ticket
Delete a given ticket
Base URL structure
Plural + IDCRUD-style operationsConcrete not abstract names
httpapicompanycomcafev1
Major rev only
Numbers not nicknames dates etc
Versioning
HTTP status codes
Short description Pointer to more information
Error handling
201
200
400204
401
403
404
503
405
500200 400
500
HTTP Status Code 401
status 401 messageAuthenticate code 12345 more infohttpdeveloperscompanycomdocserrors12345
Error handling
Ways to differentiate
tickets123jsontickets123format=jsonAccept applicationjson
Bonus applicationcompanyv1+json
Format handling
Paginationticketsoffset=50amplimit=25
Partial responseticketsfields=datelocation
Use defaults (documentation)
Pagination partial response defaults
Session management ndash REST is stateless
Caching ndash itrsquos very much encouraged
What if nouns are not appropriate ndash use verbs
The rest of REST ndash 21
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 9: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/9.jpg)
POST appointmentService HTTP11
ltappointmentRequestgt ltslot doctor=mjones start=1400
end=1450gt ltpatient id=jsmithgtltappointmentRequestgt
Level 0 POX request
HTTP11 200 OK
ltappointmentgt ltslot doctor=mjones start=1400 end=1450gt ltpatient id=jsmithgtltappointmentgt
Level 0 POX response
Many URIs one method
Level 1 Resources
POST doctorsmjones HTTP11
ltopenSlotRequest date=2010-01-04gt
Level 1 Resources request
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjones
start=1400 end=1450gt ltslot id=5678 doctor=mjones
start=1600 end=1650gtltopenSlotListgt
Level 1 Resources response
POST slots1234 HTTP11
ltappointmentRequestgt ltpatient id=jsmithgtltappointmentRequestgt
Level 1 Resources request
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 1 Resources response
Many URIs many (HTTP) methods
This is what most call REST
Best practices follow
Level 2 Verbs
GET doctorsmjonesslotsdate=20100104ampstatus=open HTTP11
Level 2 Verbs request
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjones
start=1400 end=1450gt ltslot id=5678 doctor=mjones
start=1600 end=1650gtltopenSlotListgt
Level 2 Verbs response
POST slots1234 HTTP11
ltappointmentRequestgt ltpatient id=jsmithgtltappointmentRequestgt
Level 2 Verbs request
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 2 Verbs response
W3 bdquoCool URIs donrsquot changerdquovs
Roy Fielding bdquoA REST API must not define fixed resource names or hierarchiesrdquo
HATEOAS amp self-descriptive messages
Problems peoplersquos awareness tools
Level 3 HyperMedia
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjonesrdquo start=1400 end=1450gt ltlink rel=linkrelsslotbook
uri=slots1234gt ltslotgt
hellipltopenSlotListgt
Level 3 Hypermedia response
HTTP11 201 CreatedLocation httpslots1234appointment
ltappointmentgt ltslot id=1234 hellipgt ltpatient id=jsmithgt ltlink rel=linkrelsappointmentcancel uri=slots1234appointmentgt ltlink rel=self uri=slots1234appointmentgtltappointmentgt
Level 3 Hypermedia response
Solves interop problems WSDL contractStrong typingClient- and server bindingsOperations (ie verbs)
WS- support (Security AtomicTransaction etc)
GETingPOSTing an XML
Many proxies block PUT Non-intuitive
SOAP
Level 0
Best practices
Resources vs actions
getTickets vs ticketsgetMusemTickets vs ticketstype=museum
Nouns vs verbs
Resource GET POST PUT DELETE
tickets List tickets Create a new ticket
Bulk update Delete all tickets
tickets123 Get the details of one ticket
Error Update a given ticket
Delete a given ticket
Base URL structure
Plural + IDCRUD-style operationsConcrete not abstract names
httpapicompanycomcafev1
Major rev only
Numbers not nicknames dates etc
Versioning
HTTP status codes
Short description Pointer to more information
Error handling
201
200
400204
401
403
404
503
405
500200 400
500
HTTP Status Code 401
status 401 messageAuthenticate code 12345 more infohttpdeveloperscompanycomdocserrors12345
Error handling
Ways to differentiate
tickets123jsontickets123format=jsonAccept applicationjson
Bonus applicationcompanyv1+json
Format handling
Paginationticketsoffset=50amplimit=25
Partial responseticketsfields=datelocation
Use defaults (documentation)
Pagination partial response defaults
Session management ndash REST is stateless
Caching ndash itrsquos very much encouraged
What if nouns are not appropriate ndash use verbs
The rest of REST ndash 21
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 10: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/10.jpg)
HTTP11 200 OK
ltappointmentgt ltslot doctor=mjones start=1400 end=1450gt ltpatient id=jsmithgtltappointmentgt
Level 0 POX response
Many URIs one method
Level 1 Resources
POST doctorsmjones HTTP11
ltopenSlotRequest date=2010-01-04gt
Level 1 Resources request
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjones
start=1400 end=1450gt ltslot id=5678 doctor=mjones
start=1600 end=1650gtltopenSlotListgt
Level 1 Resources response
POST slots1234 HTTP11
ltappointmentRequestgt ltpatient id=jsmithgtltappointmentRequestgt
Level 1 Resources request
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 1 Resources response
Many URIs many (HTTP) methods
This is what most call REST
Best practices follow
Level 2 Verbs
GET doctorsmjonesslotsdate=20100104ampstatus=open HTTP11
Level 2 Verbs request
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjones
start=1400 end=1450gt ltslot id=5678 doctor=mjones
start=1600 end=1650gtltopenSlotListgt
Level 2 Verbs response
POST slots1234 HTTP11
ltappointmentRequestgt ltpatient id=jsmithgtltappointmentRequestgt
Level 2 Verbs request
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 2 Verbs response
W3 bdquoCool URIs donrsquot changerdquovs
Roy Fielding bdquoA REST API must not define fixed resource names or hierarchiesrdquo
HATEOAS amp self-descriptive messages
Problems peoplersquos awareness tools
Level 3 HyperMedia
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjonesrdquo start=1400 end=1450gt ltlink rel=linkrelsslotbook
uri=slots1234gt ltslotgt
hellipltopenSlotListgt
Level 3 Hypermedia response
HTTP11 201 CreatedLocation httpslots1234appointment
ltappointmentgt ltslot id=1234 hellipgt ltpatient id=jsmithgt ltlink rel=linkrelsappointmentcancel uri=slots1234appointmentgt ltlink rel=self uri=slots1234appointmentgtltappointmentgt
Level 3 Hypermedia response
Solves interop problems WSDL contractStrong typingClient- and server bindingsOperations (ie verbs)
WS- support (Security AtomicTransaction etc)
GETingPOSTing an XML
Many proxies block PUT Non-intuitive
SOAP
Level 0
Best practices
Resources vs actions
getTickets vs ticketsgetMusemTickets vs ticketstype=museum
Nouns vs verbs
Resource GET POST PUT DELETE
tickets List tickets Create a new ticket
Bulk update Delete all tickets
tickets123 Get the details of one ticket
Error Update a given ticket
Delete a given ticket
Base URL structure
Plural + IDCRUD-style operationsConcrete not abstract names
httpapicompanycomcafev1
Major rev only
Numbers not nicknames dates etc
Versioning
HTTP status codes
Short description Pointer to more information
Error handling
201
200
400204
401
403
404
503
405
500200 400
500
HTTP Status Code 401
status 401 messageAuthenticate code 12345 more infohttpdeveloperscompanycomdocserrors12345
Error handling
Ways to differentiate
tickets123jsontickets123format=jsonAccept applicationjson
Bonus applicationcompanyv1+json
Format handling
Paginationticketsoffset=50amplimit=25
Partial responseticketsfields=datelocation
Use defaults (documentation)
Pagination partial response defaults
Session management ndash REST is stateless
Caching ndash itrsquos very much encouraged
What if nouns are not appropriate ndash use verbs
The rest of REST ndash 21
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 11: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/11.jpg)
Many URIs one method
Level 1 Resources
POST doctorsmjones HTTP11
ltopenSlotRequest date=2010-01-04gt
Level 1 Resources request
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjones
start=1400 end=1450gt ltslot id=5678 doctor=mjones
start=1600 end=1650gtltopenSlotListgt
Level 1 Resources response
POST slots1234 HTTP11
ltappointmentRequestgt ltpatient id=jsmithgtltappointmentRequestgt
Level 1 Resources request
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 1 Resources response
Many URIs many (HTTP) methods
This is what most call REST
Best practices follow
Level 2 Verbs
GET doctorsmjonesslotsdate=20100104ampstatus=open HTTP11
Level 2 Verbs request
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjones
start=1400 end=1450gt ltslot id=5678 doctor=mjones
start=1600 end=1650gtltopenSlotListgt
Level 2 Verbs response
POST slots1234 HTTP11
ltappointmentRequestgt ltpatient id=jsmithgtltappointmentRequestgt
Level 2 Verbs request
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 2 Verbs response
W3 bdquoCool URIs donrsquot changerdquovs
Roy Fielding bdquoA REST API must not define fixed resource names or hierarchiesrdquo
HATEOAS amp self-descriptive messages
Problems peoplersquos awareness tools
Level 3 HyperMedia
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjonesrdquo start=1400 end=1450gt ltlink rel=linkrelsslotbook
uri=slots1234gt ltslotgt
hellipltopenSlotListgt
Level 3 Hypermedia response
HTTP11 201 CreatedLocation httpslots1234appointment
ltappointmentgt ltslot id=1234 hellipgt ltpatient id=jsmithgt ltlink rel=linkrelsappointmentcancel uri=slots1234appointmentgt ltlink rel=self uri=slots1234appointmentgtltappointmentgt
Level 3 Hypermedia response
Solves interop problems WSDL contractStrong typingClient- and server bindingsOperations (ie verbs)
WS- support (Security AtomicTransaction etc)
GETingPOSTing an XML
Many proxies block PUT Non-intuitive
SOAP
Level 0
Best practices
Resources vs actions
getTickets vs ticketsgetMusemTickets vs ticketstype=museum
Nouns vs verbs
Resource GET POST PUT DELETE
tickets List tickets Create a new ticket
Bulk update Delete all tickets
tickets123 Get the details of one ticket
Error Update a given ticket
Delete a given ticket
Base URL structure
Plural + IDCRUD-style operationsConcrete not abstract names
httpapicompanycomcafev1
Major rev only
Numbers not nicknames dates etc
Versioning
HTTP status codes
Short description Pointer to more information
Error handling
201
200
400204
401
403
404
503
405
500200 400
500
HTTP Status Code 401
status 401 messageAuthenticate code 12345 more infohttpdeveloperscompanycomdocserrors12345
Error handling
Ways to differentiate
tickets123jsontickets123format=jsonAccept applicationjson
Bonus applicationcompanyv1+json
Format handling
Paginationticketsoffset=50amplimit=25
Partial responseticketsfields=datelocation
Use defaults (documentation)
Pagination partial response defaults
Session management ndash REST is stateless
Caching ndash itrsquos very much encouraged
What if nouns are not appropriate ndash use verbs
The rest of REST ndash 21
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 12: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/12.jpg)
POST doctorsmjones HTTP11
ltopenSlotRequest date=2010-01-04gt
Level 1 Resources request
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjones
start=1400 end=1450gt ltslot id=5678 doctor=mjones
start=1600 end=1650gtltopenSlotListgt
Level 1 Resources response
POST slots1234 HTTP11
ltappointmentRequestgt ltpatient id=jsmithgtltappointmentRequestgt
Level 1 Resources request
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 1 Resources response
Many URIs many (HTTP) methods
This is what most call REST
Best practices follow
Level 2 Verbs
GET doctorsmjonesslotsdate=20100104ampstatus=open HTTP11
Level 2 Verbs request
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjones
start=1400 end=1450gt ltslot id=5678 doctor=mjones
start=1600 end=1650gtltopenSlotListgt
Level 2 Verbs response
POST slots1234 HTTP11
ltappointmentRequestgt ltpatient id=jsmithgtltappointmentRequestgt
Level 2 Verbs request
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 2 Verbs response
W3 bdquoCool URIs donrsquot changerdquovs
Roy Fielding bdquoA REST API must not define fixed resource names or hierarchiesrdquo
HATEOAS amp self-descriptive messages
Problems peoplersquos awareness tools
Level 3 HyperMedia
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjonesrdquo start=1400 end=1450gt ltlink rel=linkrelsslotbook
uri=slots1234gt ltslotgt
hellipltopenSlotListgt
Level 3 Hypermedia response
HTTP11 201 CreatedLocation httpslots1234appointment
ltappointmentgt ltslot id=1234 hellipgt ltpatient id=jsmithgt ltlink rel=linkrelsappointmentcancel uri=slots1234appointmentgt ltlink rel=self uri=slots1234appointmentgtltappointmentgt
Level 3 Hypermedia response
Solves interop problems WSDL contractStrong typingClient- and server bindingsOperations (ie verbs)
WS- support (Security AtomicTransaction etc)
GETingPOSTing an XML
Many proxies block PUT Non-intuitive
SOAP
Level 0
Best practices
Resources vs actions
getTickets vs ticketsgetMusemTickets vs ticketstype=museum
Nouns vs verbs
Resource GET POST PUT DELETE
tickets List tickets Create a new ticket
Bulk update Delete all tickets
tickets123 Get the details of one ticket
Error Update a given ticket
Delete a given ticket
Base URL structure
Plural + IDCRUD-style operationsConcrete not abstract names
httpapicompanycomcafev1
Major rev only
Numbers not nicknames dates etc
Versioning
HTTP status codes
Short description Pointer to more information
Error handling
201
200
400204
401
403
404
503
405
500200 400
500
HTTP Status Code 401
status 401 messageAuthenticate code 12345 more infohttpdeveloperscompanycomdocserrors12345
Error handling
Ways to differentiate
tickets123jsontickets123format=jsonAccept applicationjson
Bonus applicationcompanyv1+json
Format handling
Paginationticketsoffset=50amplimit=25
Partial responseticketsfields=datelocation
Use defaults (documentation)
Pagination partial response defaults
Session management ndash REST is stateless
Caching ndash itrsquos very much encouraged
What if nouns are not appropriate ndash use verbs
The rest of REST ndash 21
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 13: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/13.jpg)
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjones
start=1400 end=1450gt ltslot id=5678 doctor=mjones
start=1600 end=1650gtltopenSlotListgt
Level 1 Resources response
POST slots1234 HTTP11
ltappointmentRequestgt ltpatient id=jsmithgtltappointmentRequestgt
Level 1 Resources request
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 1 Resources response
Many URIs many (HTTP) methods
This is what most call REST
Best practices follow
Level 2 Verbs
GET doctorsmjonesslotsdate=20100104ampstatus=open HTTP11
Level 2 Verbs request
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjones
start=1400 end=1450gt ltslot id=5678 doctor=mjones
start=1600 end=1650gtltopenSlotListgt
Level 2 Verbs response
POST slots1234 HTTP11
ltappointmentRequestgt ltpatient id=jsmithgtltappointmentRequestgt
Level 2 Verbs request
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 2 Verbs response
W3 bdquoCool URIs donrsquot changerdquovs
Roy Fielding bdquoA REST API must not define fixed resource names or hierarchiesrdquo
HATEOAS amp self-descriptive messages
Problems peoplersquos awareness tools
Level 3 HyperMedia
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjonesrdquo start=1400 end=1450gt ltlink rel=linkrelsslotbook
uri=slots1234gt ltslotgt
hellipltopenSlotListgt
Level 3 Hypermedia response
HTTP11 201 CreatedLocation httpslots1234appointment
ltappointmentgt ltslot id=1234 hellipgt ltpatient id=jsmithgt ltlink rel=linkrelsappointmentcancel uri=slots1234appointmentgt ltlink rel=self uri=slots1234appointmentgtltappointmentgt
Level 3 Hypermedia response
Solves interop problems WSDL contractStrong typingClient- and server bindingsOperations (ie verbs)
WS- support (Security AtomicTransaction etc)
GETingPOSTing an XML
Many proxies block PUT Non-intuitive
SOAP
Level 0
Best practices
Resources vs actions
getTickets vs ticketsgetMusemTickets vs ticketstype=museum
Nouns vs verbs
Resource GET POST PUT DELETE
tickets List tickets Create a new ticket
Bulk update Delete all tickets
tickets123 Get the details of one ticket
Error Update a given ticket
Delete a given ticket
Base URL structure
Plural + IDCRUD-style operationsConcrete not abstract names
httpapicompanycomcafev1
Major rev only
Numbers not nicknames dates etc
Versioning
HTTP status codes
Short description Pointer to more information
Error handling
201
200
400204
401
403
404
503
405
500200 400
500
HTTP Status Code 401
status 401 messageAuthenticate code 12345 more infohttpdeveloperscompanycomdocserrors12345
Error handling
Ways to differentiate
tickets123jsontickets123format=jsonAccept applicationjson
Bonus applicationcompanyv1+json
Format handling
Paginationticketsoffset=50amplimit=25
Partial responseticketsfields=datelocation
Use defaults (documentation)
Pagination partial response defaults
Session management ndash REST is stateless
Caching ndash itrsquos very much encouraged
What if nouns are not appropriate ndash use verbs
The rest of REST ndash 21
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 14: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/14.jpg)
POST slots1234 HTTP11
ltappointmentRequestgt ltpatient id=jsmithgtltappointmentRequestgt
Level 1 Resources request
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 1 Resources response
Many URIs many (HTTP) methods
This is what most call REST
Best practices follow
Level 2 Verbs
GET doctorsmjonesslotsdate=20100104ampstatus=open HTTP11
Level 2 Verbs request
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjones
start=1400 end=1450gt ltslot id=5678 doctor=mjones
start=1600 end=1650gtltopenSlotListgt
Level 2 Verbs response
POST slots1234 HTTP11
ltappointmentRequestgt ltpatient id=jsmithgtltappointmentRequestgt
Level 2 Verbs request
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 2 Verbs response
W3 bdquoCool URIs donrsquot changerdquovs
Roy Fielding bdquoA REST API must not define fixed resource names or hierarchiesrdquo
HATEOAS amp self-descriptive messages
Problems peoplersquos awareness tools
Level 3 HyperMedia
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjonesrdquo start=1400 end=1450gt ltlink rel=linkrelsslotbook
uri=slots1234gt ltslotgt
hellipltopenSlotListgt
Level 3 Hypermedia response
HTTP11 201 CreatedLocation httpslots1234appointment
ltappointmentgt ltslot id=1234 hellipgt ltpatient id=jsmithgt ltlink rel=linkrelsappointmentcancel uri=slots1234appointmentgt ltlink rel=self uri=slots1234appointmentgtltappointmentgt
Level 3 Hypermedia response
Solves interop problems WSDL contractStrong typingClient- and server bindingsOperations (ie verbs)
WS- support (Security AtomicTransaction etc)
GETingPOSTing an XML
Many proxies block PUT Non-intuitive
SOAP
Level 0
Best practices
Resources vs actions
getTickets vs ticketsgetMusemTickets vs ticketstype=museum
Nouns vs verbs
Resource GET POST PUT DELETE
tickets List tickets Create a new ticket
Bulk update Delete all tickets
tickets123 Get the details of one ticket
Error Update a given ticket
Delete a given ticket
Base URL structure
Plural + IDCRUD-style operationsConcrete not abstract names
httpapicompanycomcafev1
Major rev only
Numbers not nicknames dates etc
Versioning
HTTP status codes
Short description Pointer to more information
Error handling
201
200
400204
401
403
404
503
405
500200 400
500
HTTP Status Code 401
status 401 messageAuthenticate code 12345 more infohttpdeveloperscompanycomdocserrors12345
Error handling
Ways to differentiate
tickets123jsontickets123format=jsonAccept applicationjson
Bonus applicationcompanyv1+json
Format handling
Paginationticketsoffset=50amplimit=25
Partial responseticketsfields=datelocation
Use defaults (documentation)
Pagination partial response defaults
Session management ndash REST is stateless
Caching ndash itrsquos very much encouraged
What if nouns are not appropriate ndash use verbs
The rest of REST ndash 21
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 15: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/15.jpg)
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 1 Resources response
Many URIs many (HTTP) methods
This is what most call REST
Best practices follow
Level 2 Verbs
GET doctorsmjonesslotsdate=20100104ampstatus=open HTTP11
Level 2 Verbs request
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjones
start=1400 end=1450gt ltslot id=5678 doctor=mjones
start=1600 end=1650gtltopenSlotListgt
Level 2 Verbs response
POST slots1234 HTTP11
ltappointmentRequestgt ltpatient id=jsmithgtltappointmentRequestgt
Level 2 Verbs request
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 2 Verbs response
W3 bdquoCool URIs donrsquot changerdquovs
Roy Fielding bdquoA REST API must not define fixed resource names or hierarchiesrdquo
HATEOAS amp self-descriptive messages
Problems peoplersquos awareness tools
Level 3 HyperMedia
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjonesrdquo start=1400 end=1450gt ltlink rel=linkrelsslotbook
uri=slots1234gt ltslotgt
hellipltopenSlotListgt
Level 3 Hypermedia response
HTTP11 201 CreatedLocation httpslots1234appointment
ltappointmentgt ltslot id=1234 hellipgt ltpatient id=jsmithgt ltlink rel=linkrelsappointmentcancel uri=slots1234appointmentgt ltlink rel=self uri=slots1234appointmentgtltappointmentgt
Level 3 Hypermedia response
Solves interop problems WSDL contractStrong typingClient- and server bindingsOperations (ie verbs)
WS- support (Security AtomicTransaction etc)
GETingPOSTing an XML
Many proxies block PUT Non-intuitive
SOAP
Level 0
Best practices
Resources vs actions
getTickets vs ticketsgetMusemTickets vs ticketstype=museum
Nouns vs verbs
Resource GET POST PUT DELETE
tickets List tickets Create a new ticket
Bulk update Delete all tickets
tickets123 Get the details of one ticket
Error Update a given ticket
Delete a given ticket
Base URL structure
Plural + IDCRUD-style operationsConcrete not abstract names
httpapicompanycomcafev1
Major rev only
Numbers not nicknames dates etc
Versioning
HTTP status codes
Short description Pointer to more information
Error handling
201
200
400204
401
403
404
503
405
500200 400
500
HTTP Status Code 401
status 401 messageAuthenticate code 12345 more infohttpdeveloperscompanycomdocserrors12345
Error handling
Ways to differentiate
tickets123jsontickets123format=jsonAccept applicationjson
Bonus applicationcompanyv1+json
Format handling
Paginationticketsoffset=50amplimit=25
Partial responseticketsfields=datelocation
Use defaults (documentation)
Pagination partial response defaults
Session management ndash REST is stateless
Caching ndash itrsquos very much encouraged
What if nouns are not appropriate ndash use verbs
The rest of REST ndash 21
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 16: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/16.jpg)
Many URIs many (HTTP) methods
This is what most call REST
Best practices follow
Level 2 Verbs
GET doctorsmjonesslotsdate=20100104ampstatus=open HTTP11
Level 2 Verbs request
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjones
start=1400 end=1450gt ltslot id=5678 doctor=mjones
start=1600 end=1650gtltopenSlotListgt
Level 2 Verbs response
POST slots1234 HTTP11
ltappointmentRequestgt ltpatient id=jsmithgtltappointmentRequestgt
Level 2 Verbs request
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 2 Verbs response
W3 bdquoCool URIs donrsquot changerdquovs
Roy Fielding bdquoA REST API must not define fixed resource names or hierarchiesrdquo
HATEOAS amp self-descriptive messages
Problems peoplersquos awareness tools
Level 3 HyperMedia
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjonesrdquo start=1400 end=1450gt ltlink rel=linkrelsslotbook
uri=slots1234gt ltslotgt
hellipltopenSlotListgt
Level 3 Hypermedia response
HTTP11 201 CreatedLocation httpslots1234appointment
ltappointmentgt ltslot id=1234 hellipgt ltpatient id=jsmithgt ltlink rel=linkrelsappointmentcancel uri=slots1234appointmentgt ltlink rel=self uri=slots1234appointmentgtltappointmentgt
Level 3 Hypermedia response
Solves interop problems WSDL contractStrong typingClient- and server bindingsOperations (ie verbs)
WS- support (Security AtomicTransaction etc)
GETingPOSTing an XML
Many proxies block PUT Non-intuitive
SOAP
Level 0
Best practices
Resources vs actions
getTickets vs ticketsgetMusemTickets vs ticketstype=museum
Nouns vs verbs
Resource GET POST PUT DELETE
tickets List tickets Create a new ticket
Bulk update Delete all tickets
tickets123 Get the details of one ticket
Error Update a given ticket
Delete a given ticket
Base URL structure
Plural + IDCRUD-style operationsConcrete not abstract names
httpapicompanycomcafev1
Major rev only
Numbers not nicknames dates etc
Versioning
HTTP status codes
Short description Pointer to more information
Error handling
201
200
400204
401
403
404
503
405
500200 400
500
HTTP Status Code 401
status 401 messageAuthenticate code 12345 more infohttpdeveloperscompanycomdocserrors12345
Error handling
Ways to differentiate
tickets123jsontickets123format=jsonAccept applicationjson
Bonus applicationcompanyv1+json
Format handling
Paginationticketsoffset=50amplimit=25
Partial responseticketsfields=datelocation
Use defaults (documentation)
Pagination partial response defaults
Session management ndash REST is stateless
Caching ndash itrsquos very much encouraged
What if nouns are not appropriate ndash use verbs
The rest of REST ndash 21
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 17: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/17.jpg)
GET doctorsmjonesslotsdate=20100104ampstatus=open HTTP11
Level 2 Verbs request
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjones
start=1400 end=1450gt ltslot id=5678 doctor=mjones
start=1600 end=1650gtltopenSlotListgt
Level 2 Verbs response
POST slots1234 HTTP11
ltappointmentRequestgt ltpatient id=jsmithgtltappointmentRequestgt
Level 2 Verbs request
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 2 Verbs response
W3 bdquoCool URIs donrsquot changerdquovs
Roy Fielding bdquoA REST API must not define fixed resource names or hierarchiesrdquo
HATEOAS amp self-descriptive messages
Problems peoplersquos awareness tools
Level 3 HyperMedia
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjonesrdquo start=1400 end=1450gt ltlink rel=linkrelsslotbook
uri=slots1234gt ltslotgt
hellipltopenSlotListgt
Level 3 Hypermedia response
HTTP11 201 CreatedLocation httpslots1234appointment
ltappointmentgt ltslot id=1234 hellipgt ltpatient id=jsmithgt ltlink rel=linkrelsappointmentcancel uri=slots1234appointmentgt ltlink rel=self uri=slots1234appointmentgtltappointmentgt
Level 3 Hypermedia response
Solves interop problems WSDL contractStrong typingClient- and server bindingsOperations (ie verbs)
WS- support (Security AtomicTransaction etc)
GETingPOSTing an XML
Many proxies block PUT Non-intuitive
SOAP
Level 0
Best practices
Resources vs actions
getTickets vs ticketsgetMusemTickets vs ticketstype=museum
Nouns vs verbs
Resource GET POST PUT DELETE
tickets List tickets Create a new ticket
Bulk update Delete all tickets
tickets123 Get the details of one ticket
Error Update a given ticket
Delete a given ticket
Base URL structure
Plural + IDCRUD-style operationsConcrete not abstract names
httpapicompanycomcafev1
Major rev only
Numbers not nicknames dates etc
Versioning
HTTP status codes
Short description Pointer to more information
Error handling
201
200
400204
401
403
404
503
405
500200 400
500
HTTP Status Code 401
status 401 messageAuthenticate code 12345 more infohttpdeveloperscompanycomdocserrors12345
Error handling
Ways to differentiate
tickets123jsontickets123format=jsonAccept applicationjson
Bonus applicationcompanyv1+json
Format handling
Paginationticketsoffset=50amplimit=25
Partial responseticketsfields=datelocation
Use defaults (documentation)
Pagination partial response defaults
Session management ndash REST is stateless
Caching ndash itrsquos very much encouraged
What if nouns are not appropriate ndash use verbs
The rest of REST ndash 21
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 18: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/18.jpg)
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjones
start=1400 end=1450gt ltslot id=5678 doctor=mjones
start=1600 end=1650gtltopenSlotListgt
Level 2 Verbs response
POST slots1234 HTTP11
ltappointmentRequestgt ltpatient id=jsmithgtltappointmentRequestgt
Level 2 Verbs request
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 2 Verbs response
W3 bdquoCool URIs donrsquot changerdquovs
Roy Fielding bdquoA REST API must not define fixed resource names or hierarchiesrdquo
HATEOAS amp self-descriptive messages
Problems peoplersquos awareness tools
Level 3 HyperMedia
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjonesrdquo start=1400 end=1450gt ltlink rel=linkrelsslotbook
uri=slots1234gt ltslotgt
hellipltopenSlotListgt
Level 3 Hypermedia response
HTTP11 201 CreatedLocation httpslots1234appointment
ltappointmentgt ltslot id=1234 hellipgt ltpatient id=jsmithgt ltlink rel=linkrelsappointmentcancel uri=slots1234appointmentgt ltlink rel=self uri=slots1234appointmentgtltappointmentgt
Level 3 Hypermedia response
Solves interop problems WSDL contractStrong typingClient- and server bindingsOperations (ie verbs)
WS- support (Security AtomicTransaction etc)
GETingPOSTing an XML
Many proxies block PUT Non-intuitive
SOAP
Level 0
Best practices
Resources vs actions
getTickets vs ticketsgetMusemTickets vs ticketstype=museum
Nouns vs verbs
Resource GET POST PUT DELETE
tickets List tickets Create a new ticket
Bulk update Delete all tickets
tickets123 Get the details of one ticket
Error Update a given ticket
Delete a given ticket
Base URL structure
Plural + IDCRUD-style operationsConcrete not abstract names
httpapicompanycomcafev1
Major rev only
Numbers not nicknames dates etc
Versioning
HTTP status codes
Short description Pointer to more information
Error handling
201
200
400204
401
403
404
503
405
500200 400
500
HTTP Status Code 401
status 401 messageAuthenticate code 12345 more infohttpdeveloperscompanycomdocserrors12345
Error handling
Ways to differentiate
tickets123jsontickets123format=jsonAccept applicationjson
Bonus applicationcompanyv1+json
Format handling
Paginationticketsoffset=50amplimit=25
Partial responseticketsfields=datelocation
Use defaults (documentation)
Pagination partial response defaults
Session management ndash REST is stateless
Caching ndash itrsquos very much encouraged
What if nouns are not appropriate ndash use verbs
The rest of REST ndash 21
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 19: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/19.jpg)
POST slots1234 HTTP11
ltappointmentRequestgt ltpatient id=jsmithgtltappointmentRequestgt
Level 2 Verbs request
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 2 Verbs response
W3 bdquoCool URIs donrsquot changerdquovs
Roy Fielding bdquoA REST API must not define fixed resource names or hierarchiesrdquo
HATEOAS amp self-descriptive messages
Problems peoplersquos awareness tools
Level 3 HyperMedia
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjonesrdquo start=1400 end=1450gt ltlink rel=linkrelsslotbook
uri=slots1234gt ltslotgt
hellipltopenSlotListgt
Level 3 Hypermedia response
HTTP11 201 CreatedLocation httpslots1234appointment
ltappointmentgt ltslot id=1234 hellipgt ltpatient id=jsmithgt ltlink rel=linkrelsappointmentcancel uri=slots1234appointmentgt ltlink rel=self uri=slots1234appointmentgtltappointmentgt
Level 3 Hypermedia response
Solves interop problems WSDL contractStrong typingClient- and server bindingsOperations (ie verbs)
WS- support (Security AtomicTransaction etc)
GETingPOSTing an XML
Many proxies block PUT Non-intuitive
SOAP
Level 0
Best practices
Resources vs actions
getTickets vs ticketsgetMusemTickets vs ticketstype=museum
Nouns vs verbs
Resource GET POST PUT DELETE
tickets List tickets Create a new ticket
Bulk update Delete all tickets
tickets123 Get the details of one ticket
Error Update a given ticket
Delete a given ticket
Base URL structure
Plural + IDCRUD-style operationsConcrete not abstract names
httpapicompanycomcafev1
Major rev only
Numbers not nicknames dates etc
Versioning
HTTP status codes
Short description Pointer to more information
Error handling
201
200
400204
401
403
404
503
405
500200 400
500
HTTP Status Code 401
status 401 messageAuthenticate code 12345 more infohttpdeveloperscompanycomdocserrors12345
Error handling
Ways to differentiate
tickets123jsontickets123format=jsonAccept applicationjson
Bonus applicationcompanyv1+json
Format handling
Paginationticketsoffset=50amplimit=25
Partial responseticketsfields=datelocation
Use defaults (documentation)
Pagination partial response defaults
Session management ndash REST is stateless
Caching ndash itrsquos very much encouraged
What if nouns are not appropriate ndash use verbs
The rest of REST ndash 21
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 20: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/20.jpg)
HTTP11 200 OK
ltappointment id=2468gt ltslot id=1234 doctor=mjones
start=1400 end=1450rdquogt ltpatient id=jsmithgtltappointmentgt
Level 2 Verbs response
W3 bdquoCool URIs donrsquot changerdquovs
Roy Fielding bdquoA REST API must not define fixed resource names or hierarchiesrdquo
HATEOAS amp self-descriptive messages
Problems peoplersquos awareness tools
Level 3 HyperMedia
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjonesrdquo start=1400 end=1450gt ltlink rel=linkrelsslotbook
uri=slots1234gt ltslotgt
hellipltopenSlotListgt
Level 3 Hypermedia response
HTTP11 201 CreatedLocation httpslots1234appointment
ltappointmentgt ltslot id=1234 hellipgt ltpatient id=jsmithgt ltlink rel=linkrelsappointmentcancel uri=slots1234appointmentgt ltlink rel=self uri=slots1234appointmentgtltappointmentgt
Level 3 Hypermedia response
Solves interop problems WSDL contractStrong typingClient- and server bindingsOperations (ie verbs)
WS- support (Security AtomicTransaction etc)
GETingPOSTing an XML
Many proxies block PUT Non-intuitive
SOAP
Level 0
Best practices
Resources vs actions
getTickets vs ticketsgetMusemTickets vs ticketstype=museum
Nouns vs verbs
Resource GET POST PUT DELETE
tickets List tickets Create a new ticket
Bulk update Delete all tickets
tickets123 Get the details of one ticket
Error Update a given ticket
Delete a given ticket
Base URL structure
Plural + IDCRUD-style operationsConcrete not abstract names
httpapicompanycomcafev1
Major rev only
Numbers not nicknames dates etc
Versioning
HTTP status codes
Short description Pointer to more information
Error handling
201
200
400204
401
403
404
503
405
500200 400
500
HTTP Status Code 401
status 401 messageAuthenticate code 12345 more infohttpdeveloperscompanycomdocserrors12345
Error handling
Ways to differentiate
tickets123jsontickets123format=jsonAccept applicationjson
Bonus applicationcompanyv1+json
Format handling
Paginationticketsoffset=50amplimit=25
Partial responseticketsfields=datelocation
Use defaults (documentation)
Pagination partial response defaults
Session management ndash REST is stateless
Caching ndash itrsquos very much encouraged
What if nouns are not appropriate ndash use verbs
The rest of REST ndash 21
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 21: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/21.jpg)
W3 bdquoCool URIs donrsquot changerdquovs
Roy Fielding bdquoA REST API must not define fixed resource names or hierarchiesrdquo
HATEOAS amp self-descriptive messages
Problems peoplersquos awareness tools
Level 3 HyperMedia
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjonesrdquo start=1400 end=1450gt ltlink rel=linkrelsslotbook
uri=slots1234gt ltslotgt
hellipltopenSlotListgt
Level 3 Hypermedia response
HTTP11 201 CreatedLocation httpslots1234appointment
ltappointmentgt ltslot id=1234 hellipgt ltpatient id=jsmithgt ltlink rel=linkrelsappointmentcancel uri=slots1234appointmentgt ltlink rel=self uri=slots1234appointmentgtltappointmentgt
Level 3 Hypermedia response
Solves interop problems WSDL contractStrong typingClient- and server bindingsOperations (ie verbs)
WS- support (Security AtomicTransaction etc)
GETingPOSTing an XML
Many proxies block PUT Non-intuitive
SOAP
Level 0
Best practices
Resources vs actions
getTickets vs ticketsgetMusemTickets vs ticketstype=museum
Nouns vs verbs
Resource GET POST PUT DELETE
tickets List tickets Create a new ticket
Bulk update Delete all tickets
tickets123 Get the details of one ticket
Error Update a given ticket
Delete a given ticket
Base URL structure
Plural + IDCRUD-style operationsConcrete not abstract names
httpapicompanycomcafev1
Major rev only
Numbers not nicknames dates etc
Versioning
HTTP status codes
Short description Pointer to more information
Error handling
201
200
400204
401
403
404
503
405
500200 400
500
HTTP Status Code 401
status 401 messageAuthenticate code 12345 more infohttpdeveloperscompanycomdocserrors12345
Error handling
Ways to differentiate
tickets123jsontickets123format=jsonAccept applicationjson
Bonus applicationcompanyv1+json
Format handling
Paginationticketsoffset=50amplimit=25
Partial responseticketsfields=datelocation
Use defaults (documentation)
Pagination partial response defaults
Session management ndash REST is stateless
Caching ndash itrsquos very much encouraged
What if nouns are not appropriate ndash use verbs
The rest of REST ndash 21
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 22: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/22.jpg)
HTTP11 200 OK
ltopenSlotListgt ltslot id=1234 doctor=mjonesrdquo start=1400 end=1450gt ltlink rel=linkrelsslotbook
uri=slots1234gt ltslotgt
hellipltopenSlotListgt
Level 3 Hypermedia response
HTTP11 201 CreatedLocation httpslots1234appointment
ltappointmentgt ltslot id=1234 hellipgt ltpatient id=jsmithgt ltlink rel=linkrelsappointmentcancel uri=slots1234appointmentgt ltlink rel=self uri=slots1234appointmentgtltappointmentgt
Level 3 Hypermedia response
Solves interop problems WSDL contractStrong typingClient- and server bindingsOperations (ie verbs)
WS- support (Security AtomicTransaction etc)
GETingPOSTing an XML
Many proxies block PUT Non-intuitive
SOAP
Level 0
Best practices
Resources vs actions
getTickets vs ticketsgetMusemTickets vs ticketstype=museum
Nouns vs verbs
Resource GET POST PUT DELETE
tickets List tickets Create a new ticket
Bulk update Delete all tickets
tickets123 Get the details of one ticket
Error Update a given ticket
Delete a given ticket
Base URL structure
Plural + IDCRUD-style operationsConcrete not abstract names
httpapicompanycomcafev1
Major rev only
Numbers not nicknames dates etc
Versioning
HTTP status codes
Short description Pointer to more information
Error handling
201
200
400204
401
403
404
503
405
500200 400
500
HTTP Status Code 401
status 401 messageAuthenticate code 12345 more infohttpdeveloperscompanycomdocserrors12345
Error handling
Ways to differentiate
tickets123jsontickets123format=jsonAccept applicationjson
Bonus applicationcompanyv1+json
Format handling
Paginationticketsoffset=50amplimit=25
Partial responseticketsfields=datelocation
Use defaults (documentation)
Pagination partial response defaults
Session management ndash REST is stateless
Caching ndash itrsquos very much encouraged
What if nouns are not appropriate ndash use verbs
The rest of REST ndash 21
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 23: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/23.jpg)
HTTP11 201 CreatedLocation httpslots1234appointment
ltappointmentgt ltslot id=1234 hellipgt ltpatient id=jsmithgt ltlink rel=linkrelsappointmentcancel uri=slots1234appointmentgt ltlink rel=self uri=slots1234appointmentgtltappointmentgt
Level 3 Hypermedia response
Solves interop problems WSDL contractStrong typingClient- and server bindingsOperations (ie verbs)
WS- support (Security AtomicTransaction etc)
GETingPOSTing an XML
Many proxies block PUT Non-intuitive
SOAP
Level 0
Best practices
Resources vs actions
getTickets vs ticketsgetMusemTickets vs ticketstype=museum
Nouns vs verbs
Resource GET POST PUT DELETE
tickets List tickets Create a new ticket
Bulk update Delete all tickets
tickets123 Get the details of one ticket
Error Update a given ticket
Delete a given ticket
Base URL structure
Plural + IDCRUD-style operationsConcrete not abstract names
httpapicompanycomcafev1
Major rev only
Numbers not nicknames dates etc
Versioning
HTTP status codes
Short description Pointer to more information
Error handling
201
200
400204
401
403
404
503
405
500200 400
500
HTTP Status Code 401
status 401 messageAuthenticate code 12345 more infohttpdeveloperscompanycomdocserrors12345
Error handling
Ways to differentiate
tickets123jsontickets123format=jsonAccept applicationjson
Bonus applicationcompanyv1+json
Format handling
Paginationticketsoffset=50amplimit=25
Partial responseticketsfields=datelocation
Use defaults (documentation)
Pagination partial response defaults
Session management ndash REST is stateless
Caching ndash itrsquos very much encouraged
What if nouns are not appropriate ndash use verbs
The rest of REST ndash 21
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 24: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/24.jpg)
Solves interop problems WSDL contractStrong typingClient- and server bindingsOperations (ie verbs)
WS- support (Security AtomicTransaction etc)
GETingPOSTing an XML
Many proxies block PUT Non-intuitive
SOAP
Level 0
Best practices
Resources vs actions
getTickets vs ticketsgetMusemTickets vs ticketstype=museum
Nouns vs verbs
Resource GET POST PUT DELETE
tickets List tickets Create a new ticket
Bulk update Delete all tickets
tickets123 Get the details of one ticket
Error Update a given ticket
Delete a given ticket
Base URL structure
Plural + IDCRUD-style operationsConcrete not abstract names
httpapicompanycomcafev1
Major rev only
Numbers not nicknames dates etc
Versioning
HTTP status codes
Short description Pointer to more information
Error handling
201
200
400204
401
403
404
503
405
500200 400
500
HTTP Status Code 401
status 401 messageAuthenticate code 12345 more infohttpdeveloperscompanycomdocserrors12345
Error handling
Ways to differentiate
tickets123jsontickets123format=jsonAccept applicationjson
Bonus applicationcompanyv1+json
Format handling
Paginationticketsoffset=50amplimit=25
Partial responseticketsfields=datelocation
Use defaults (documentation)
Pagination partial response defaults
Session management ndash REST is stateless
Caching ndash itrsquos very much encouraged
What if nouns are not appropriate ndash use verbs
The rest of REST ndash 21
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 25: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/25.jpg)
Best practices
Resources vs actions
getTickets vs ticketsgetMusemTickets vs ticketstype=museum
Nouns vs verbs
Resource GET POST PUT DELETE
tickets List tickets Create a new ticket
Bulk update Delete all tickets
tickets123 Get the details of one ticket
Error Update a given ticket
Delete a given ticket
Base URL structure
Plural + IDCRUD-style operationsConcrete not abstract names
httpapicompanycomcafev1
Major rev only
Numbers not nicknames dates etc
Versioning
HTTP status codes
Short description Pointer to more information
Error handling
201
200
400204
401
403
404
503
405
500200 400
500
HTTP Status Code 401
status 401 messageAuthenticate code 12345 more infohttpdeveloperscompanycomdocserrors12345
Error handling
Ways to differentiate
tickets123jsontickets123format=jsonAccept applicationjson
Bonus applicationcompanyv1+json
Format handling
Paginationticketsoffset=50amplimit=25
Partial responseticketsfields=datelocation
Use defaults (documentation)
Pagination partial response defaults
Session management ndash REST is stateless
Caching ndash itrsquos very much encouraged
What if nouns are not appropriate ndash use verbs
The rest of REST ndash 21
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 26: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/26.jpg)
Resources vs actions
getTickets vs ticketsgetMusemTickets vs ticketstype=museum
Nouns vs verbs
Resource GET POST PUT DELETE
tickets List tickets Create a new ticket
Bulk update Delete all tickets
tickets123 Get the details of one ticket
Error Update a given ticket
Delete a given ticket
Base URL structure
Plural + IDCRUD-style operationsConcrete not abstract names
httpapicompanycomcafev1
Major rev only
Numbers not nicknames dates etc
Versioning
HTTP status codes
Short description Pointer to more information
Error handling
201
200
400204
401
403
404
503
405
500200 400
500
HTTP Status Code 401
status 401 messageAuthenticate code 12345 more infohttpdeveloperscompanycomdocserrors12345
Error handling
Ways to differentiate
tickets123jsontickets123format=jsonAccept applicationjson
Bonus applicationcompanyv1+json
Format handling
Paginationticketsoffset=50amplimit=25
Partial responseticketsfields=datelocation
Use defaults (documentation)
Pagination partial response defaults
Session management ndash REST is stateless
Caching ndash itrsquos very much encouraged
What if nouns are not appropriate ndash use verbs
The rest of REST ndash 21
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 27: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/27.jpg)
Resource GET POST PUT DELETE
tickets List tickets Create a new ticket
Bulk update Delete all tickets
tickets123 Get the details of one ticket
Error Update a given ticket
Delete a given ticket
Base URL structure
Plural + IDCRUD-style operationsConcrete not abstract names
httpapicompanycomcafev1
Major rev only
Numbers not nicknames dates etc
Versioning
HTTP status codes
Short description Pointer to more information
Error handling
201
200
400204
401
403
404
503
405
500200 400
500
HTTP Status Code 401
status 401 messageAuthenticate code 12345 more infohttpdeveloperscompanycomdocserrors12345
Error handling
Ways to differentiate
tickets123jsontickets123format=jsonAccept applicationjson
Bonus applicationcompanyv1+json
Format handling
Paginationticketsoffset=50amplimit=25
Partial responseticketsfields=datelocation
Use defaults (documentation)
Pagination partial response defaults
Session management ndash REST is stateless
Caching ndash itrsquos very much encouraged
What if nouns are not appropriate ndash use verbs
The rest of REST ndash 21
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 28: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/28.jpg)
httpapicompanycomcafev1
Major rev only
Numbers not nicknames dates etc
Versioning
HTTP status codes
Short description Pointer to more information
Error handling
201
200
400204
401
403
404
503
405
500200 400
500
HTTP Status Code 401
status 401 messageAuthenticate code 12345 more infohttpdeveloperscompanycomdocserrors12345
Error handling
Ways to differentiate
tickets123jsontickets123format=jsonAccept applicationjson
Bonus applicationcompanyv1+json
Format handling
Paginationticketsoffset=50amplimit=25
Partial responseticketsfields=datelocation
Use defaults (documentation)
Pagination partial response defaults
Session management ndash REST is stateless
Caching ndash itrsquos very much encouraged
What if nouns are not appropriate ndash use verbs
The rest of REST ndash 21
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 29: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/29.jpg)
HTTP status codes
Short description Pointer to more information
Error handling
201
200
400204
401
403
404
503
405
500200 400
500
HTTP Status Code 401
status 401 messageAuthenticate code 12345 more infohttpdeveloperscompanycomdocserrors12345
Error handling
Ways to differentiate
tickets123jsontickets123format=jsonAccept applicationjson
Bonus applicationcompanyv1+json
Format handling
Paginationticketsoffset=50amplimit=25
Partial responseticketsfields=datelocation
Use defaults (documentation)
Pagination partial response defaults
Session management ndash REST is stateless
Caching ndash itrsquos very much encouraged
What if nouns are not appropriate ndash use verbs
The rest of REST ndash 21
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 30: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/30.jpg)
HTTP Status Code 401
status 401 messageAuthenticate code 12345 more infohttpdeveloperscompanycomdocserrors12345
Error handling
Ways to differentiate
tickets123jsontickets123format=jsonAccept applicationjson
Bonus applicationcompanyv1+json
Format handling
Paginationticketsoffset=50amplimit=25
Partial responseticketsfields=datelocation
Use defaults (documentation)
Pagination partial response defaults
Session management ndash REST is stateless
Caching ndash itrsquos very much encouraged
What if nouns are not appropriate ndash use verbs
The rest of REST ndash 21
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 31: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/31.jpg)
Ways to differentiate
tickets123jsontickets123format=jsonAccept applicationjson
Bonus applicationcompanyv1+json
Format handling
Paginationticketsoffset=50amplimit=25
Partial responseticketsfields=datelocation
Use defaults (documentation)
Pagination partial response defaults
Session management ndash REST is stateless
Caching ndash itrsquos very much encouraged
What if nouns are not appropriate ndash use verbs
The rest of REST ndash 21
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 32: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/32.jpg)
Paginationticketsoffset=50amplimit=25
Partial responseticketsfields=datelocation
Use defaults (documentation)
Pagination partial response defaults
Session management ndash REST is stateless
Caching ndash itrsquos very much encouraged
What if nouns are not appropriate ndash use verbs
The rest of REST ndash 21
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 33: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/33.jpg)
Session management ndash REST is stateless
Caching ndash itrsquos very much encouraged
What if nouns are not appropriate ndash use verbs
The rest of REST ndash 21
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 34: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/34.jpg)
Security ndash preferred is OAuth lot of BasicDigest over HTTPS in practice
Subdomains api developers for SDK
Clean REST
The rest of REST ndash 22
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 35: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/35.jpg)
Java support
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 36: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/36.jpg)
JSR 311 Java API for RESTful Web Services
Annotation-drivenGET Path PathParam Consumes
ImplementationsJersey Restlet RESTeasy Apache CXF
Jax-rs-hateoas
JAX-RS
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 37: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/37.jpg)
jax-rs examplejava
JAX-RS
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 38: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/38.jpg)
Spring MVC application essentially
Annotation-driven + XML configurationRequestMapping et al + view resolvers message converters et al
spring-hateoas
Spring MVC
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 39: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/39.jpg)
spring mvc examplejava
Spring MVC
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 40: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/40.jpg)
CRUD for JPA-entities using REST semantics
RestResource
Pagination and sorting support
spring-hateoas
Spring Data REST
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 41: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/41.jpg)
spring data restjava
Spring Data REST
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 42: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/42.jpg)
MVC vs Data REST in Spring
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 43: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/43.jpg)
Roy Fieldingrsquos dissertation
REST in Practice from OrsquoReilly
Apigee blog amp video tutorials
Articles forums
Literature
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 44: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/44.jpg)
Levels of REST ndash REST ne CRUD
Consistent view of best practices
Java support
Summary
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 45: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/45.jpg)
Has been in the industry since late rsquo90s
Has been EPAM since 2009 acted as a Dev LeadPM now Solutions Architect
Has mobile + enterprise background
gaboritorokgmailcom
Gaacutebor Toumlroumlk
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-
![Page 46: Rest in practice](https://reader030.vdocuments.us/reader030/viewer/2022032700/55d504c8bb61ebf2248b45e9/html5/thumbnails/46.jpg)
Thank You
- REST In Practice
- Agenda
- Introduction
- REpresentational State Transfer
- Levels of REST
- Level 0 Swamp of POX
- Level 0 POX request
- Slide 8
- Level 0 POX request (2)
- Slide 10
- Level 1 Resources
- Level 1 Resources request
- Slide 13
- Level 1 Resources request (2)
- Slide 15
- Level 2 Verbs
- Level 2 Verbs request
- Slide 18
- Level 2 Verbs request (2)
- Slide 20
- Level 3 HyperMedia
- Slide 22
- Slide 23
- SOAP
- Best practices
- Nouns vs verbs
- Base URL structure
- Versioning
- Error handling
- Error handling (2)
- Format handling
- Pagination partial response defaults
- The rest of REST ndash 21
- The rest of REST ndash 22
- Java support
- JAX-RS
- JAX-RS (2)
- Spring MVC
- Spring MVC (2)
- Spring Data REST
- Spring Data REST (2)
- MVC vs Data REST in Spring
- Literature
- Summary
- Gaacutebor Toumlroumlk
- Thank You
-