Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Hypermedia-Driven RESTful APIs
Search
Christoph Strobl
May 25, 2016
Programming
88
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Hypermedia-Driven RESTful APIs
Christoph Strobl
May 25, 2016
More Decks by Christoph Strobl
See All by Christoph Strobl
Beyond the Magic - Spring Data AOT Repositories
christophstrobl
1
38
Beyond the Magic - Spring Data Ahead of Time Repositories for MongoDB
christophstrobl
0
40
MongoDB for Java Developers: The Ultimate Spring Data MongoDB Starter Kit
christophstrobl
1
120
Spring Data Cookbook
christophstrobl
2
600
No Offset - Pagination with the Seek Method
christophstrobl
0
220
Tech Talk - Persistence with Spring Data
christophstrobl
0
320
A Spring Data’s Guide to Persistence
christophstrobl
0
160
What's new in Spring Data MongoDB
christophstrobl
0
230
Spring Data Moore and Beyond
christophstrobl
0
850
Other Decks in Programming
See All in Programming
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
430
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
300
速習iPhone Duo対応
yuukiw00w
2
920
App Storeの外へ──日本のiOSサイドローディング入門 for iOSDC Japan 2026
yuukiw00w
0
280
Java 27新機能 / Java 27 new features
kishida
2
190
JAWS-UG 東京支部が始める、JAWS-UG支部コラボ / JAWS-UG lunchtime LT Collaboration
y0hgi
0
170
テストを司るデーモンに会いに行く 〜隔離した仮想マシンでテストを通すまで〜
h1d3mun3
1
600
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.7k
wkhtmltopdfの次どうするか問題2026
willnet
2
1.8k
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
290
難しいけど、読めた。- OSSの入口に立った話。
sts11142
0
130
SONY CISC-NEWS NWS-1750 + NWB-225 フレームバッファの NetBSD/news68k ドライバ実装 / OSC2026Hiroshima
tsutsui
0
160
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
528
40k
Google's AI Overviews - The New Search
badams
0
1.6k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Agile that works and the tools we love
rasmusluckow
331
22k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
530
Designing for Performance
lara
611
70k
Building Applications with DynamoDB
mza
96
7.2k
The Cost Of JavaScript in 2023
addyosmani
55
10k
RailsConf 2023
tenderlove
30
1.6k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
250
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
WENDY [Excerpt]
tessaabrams
14
40k
Transcript
Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software,
Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ > Hypermedia-Driven RESTful APIs > Christoph Strobl | @stroblchristoph > Pivotal Software, Inc.
2
Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software,
Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ > > REST?
4 POST = Create, GET = Read,… Client-Server, Stateless, Cacheable
> Representational State Transfer > uses: HTTP for CRUD > requires: Architecture Constraints Uniform Interface
5 image source: http://petstore.swagger.io
Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software,
Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ > > Hypermedia?
Hypermedia Presentation of data and navigation controls! at the same
time
HATEOAS 8 Media Types describe resources. Actions are executed by
following links. Response reflects state. Clients explore the API. Hypermedia as the Engine of Application State
HAL 9 Resource Links Embedded Resource State Name Target Hypertext
Application Language
ALPS 10 Closes the gap between! ! state and transition.
Descriptors semantic data safe GET unsafe POST idempotent PUT/DELTE Application Level Profile Semantics
JSON Schema 11 Describes your JSON data
Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software,
Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ > > Demo?
Spring Data REST 13 @SpringBootApplication public class StoreApp { !
public static void main(String[] args) { SpringApplication.run(StoreApp.class, args); } ! interface StoreRepository extends PagingAndSortingRepository<Store, String> { ! ! } } Page<Store> findByAddressLocationNear(Point location, Distance distance, Pageable pageable); @RestResource(rel = "by-location") <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-rest</artifactId>
14 Repository Resource Relation Link IDs URIs @Version ETags @LastModified
Date Last-Modified What it does
Let’s try this local… 15 <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> >
mvn clean spring-boot:run
None
I am completely operational.! ! All my circuits ! are
functioning perfectly. Thank you! image source: HAL 9000 - Space Odyssey wallpaper http://www.wallconvert.com/
Resources (alphabetical) § alps.io/spec/ § json-schema.org § projects.spring.io/spring-boot § projects.spring.io/spring-data
§ stateless.co/hal_specification § swagger.io 18