Suche senden
Hochladen
CRUD Is Not REST! Hypermedia For Y'All!
•
Als ODP, PDF herunterladen
•
1 gefällt mir
•
897 views
A
apotonick
Folgen
Technologie
Unterhaltung & Humor
Melden
Teilen
Melden
Teilen
1 von 37
Jetzt herunterladen
Empfohlen
"From CRUD to Hypermedia APIs with Spring" Владимир Цукур
"From CRUD to Hypermedia APIs with Spring" Владимир Цукур
Fwdays
If - The Vodka of Ruby
If - The Vodka of Ruby
apotonick
Have Better Toys
Have Better Toys
apotonick
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Empfohlen
"From CRUD to Hypermedia APIs with Spring" Владимир Цукур
"From CRUD to Hypermedia APIs with Spring" Владимир Цукур
Fwdays
If - The Vodka of Ruby
If - The Vodka of Ruby
apotonick
Have Better Toys
Have Better Toys
apotonick
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
ChatGPT webinar slides
ChatGPT webinar slides
Alireza Esmikhani
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Project for Public Spaces & National Center for Biking and Walking
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
DevGAMM Conference
Weitere ähnliche Inhalte
Empfohlen
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
ChatGPT webinar slides
ChatGPT webinar slides
Alireza Esmikhani
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Project for Public Spaces & National Center for Biking and Walking
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
DevGAMM Conference
Empfohlen
(20)
Skeleton Culture Code
Skeleton Culture Code
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
How to have difficult conversations
How to have difficult conversations
Introduction to Data Science
Introduction to Data Science
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
The six step guide to practical project management
The six step guide to practical project management
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
ChatGPT webinar slides
ChatGPT webinar slides
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
CRUD Is Not REST! Hypermedia For Y'All!
1.
Nick „The German“
Sutterer OMG, he's on the twitter, finally! @apotonick Hypermedia for y'all!
2.
3.
Hypermedia
4.
ROAR
5.
„ architectural style
for distributed hypermedia systems“ Roy Fielding's dissertation, chapter 5, line 1
6.
require 'rest'
class Application include Restful end
7.
GET http://nick/state
{„status“ : „tired“, „ status-fr“: „fatigue“}
8.
Resource Unique URL
http://wines/red/1 Uniform Interface GET POST PUT ... Represen- tation
9.
GET http://wines/red/1
{„color“: „red“, „ alc“: 12.8, … }
10.
POST http://wines/ {„color“:
„red“, „ alc“: 12.8 } http://wines/red/1 {„id“: 1, „ color“: „red“, „ alc“: 12.8, }
11.
GET http://wines/red/1
Content-Type: app/wine+json <body>
12.
JSON Representations ==
Documents
13.
GET: show
POST: create PUT: update ... REST is CRUD is not REST!
14.
Hypermedia? <a href=“
http://wine.fr/buy “> Buy good wine! </a>
15.
<wine> <id>1</id> <color>red</color>
<link rel=“ buy “ href=“ http://wine/buy/1 “ />
16.
Order Article User
Variant Size Role Client Address Shipping Authenti- cation Price
17.
Order Article User
Variant Size Role Client Address Shipping Authenti- cation Price
18.
„ Tab“ =
Ordered drinks per Table RESTaurant
19.
RESTaurant.tabs.add(table_3) POST
http://tabs
20.
{„tab“: {
„ table“: 3 , „ drinks“: [], ... }} ? ! POST http://tabs {„tab“: {„table“: 3}} REST client!
21.
{„tab“: { „
id“: 42 „ table“: 3, „ drinks“: [], „ links“: [ {„rel“ => „self“, „ href“ => „http://tabs/42“}, {„rel“ => „order“, „ href“ => „http://tabs/42/order/{name}“} {„rel“ => „pay“, „ href“ => „http://tabs/42/pay“} ] }} Hypermedia!
22.
{„ rel “
=> „pay“, „ href “ => „http://tabs/42/pay“}
23.
<tab> <id>42</id> <table>3</table>
<drinks /> <link rel=„self“ href=„ http://tabs/42 “ /> <link rel =„order“ href=„ http://tabs/42 /order/{name}“ /> <link rel=„pay“ href=„ http://tabs/42 /pay“ /> </tab>
24.
{„tab“: { „
id“: 42 „ table“: 3, „ drinks“: [], „ links“: [ {„rel“ => „self“, „ href“ => „http://tabs/42“}, {„rel“ => „order“, „ href“ => „http://tabs/42/order/{name}“} {„rel“ => „pay“, „ href“ => „http://tabs/42/pay“} ] }}
25.
RESTaurant. tab(42). order(11)
1. look for rel=“order“ 2. extract href 3. expand URL template 4. POST
26.
{„tab“: { „
id“: 42 „ table“: 3, „ drinks“: [], „ links“: [ {„rel“ => „self“, „ href“ => „http://tabs/42“}, { „rel“ => „order“, „ href“ => „http://tabs/42/order/{name}“ } {„rel“ => „pay“, „ href“ => „http://tabs/42/pay“} ] }}
27.
http://tabs/42/order/bordeaux
28.
? ! POST
http://tabs/42/order/bordeaux {„tab“: { „ id“: 42 „ table“: 3, „ drinks“: [bordeaux] ,
29.
30.
NO guessing
31.
Just following links
32.
Code!
33.
{„tab“: {
„ table“: 3 , „ drinks“: [11], „ links“: [ {„rel“: „self“, }} ? ! GET http://tabs /42
34.
class TabRepresenter <
Roar::Representer::JSON property :id, :table collection :drinks link :self do tab_url(represented) end link :order do order_url(represented) end ...
35.
TabRepresenter. from_model (@tab).
serialize # => {„tab“: { „ id“: 42 „ table“: 3 , „ drinks“: [11], „ links“: [ {„rel“: „self“, „ href“: „ http://tabs/42 “} ...
36.
{„tab“: {
„ table“: 3 , „ drinks“: [11], „ links“: [ ... ? ! POST http://tabs {„tab“: {„table“: 3, „ drinks“: 11}}
37.
TabRepresenter. deserialize (json_body).
to_nested_attributes # => {:table => 3, :drink_ids => [11]} TableOrder.create(attrs)
38.
? ! POST
http://tabs/42/order/11
39.
tab = TabRepresenter.
from (:table => 3). post( „http://tabs“ )
40.
tab. links [:order].
# => „http://tabs/42/order/{id} expand (:id => 11). post!
41.
42.
http://github.com/apotonick/roar
Hinweis der Redaktion
Have great user interfaces Bild von facebook einblenden
Architectural style Up to you as architect No gem
Have great user interfaces Bild von facebook einblenden
People usually write a huge app with uncountable dependencies. In the last project
Have great user interfaces Bild von facebook einblenden
Jetzt herunterladen