SlideShare uma empresa Scribd logo
1 de 27
Baixar para ler offline
TRE UBELEILIGE SANNHETER OM REST
COMPUTASDAG, 13. JUNI 2014
1
2
Fra: http://martinfowler.com/articles/richardsonMaturityModel.html
SANNHET #1:
GET-kall er aldri nullipotent
3
4
Fra: http://martinfowler.com/articles/richardsonMaturityModel.html
Hva betyr «nullipotent»?
5
Fra Wikipedia:
«The GET method is a safe method (or
nullipotent), meaning that calling it
produces no side-effects.»
6
Tomcat Access
Log
Moteksempler
●
Access log som REST-ressurs
●
Tilgangskontroll
– Three strikes-regel
●
Engangsnedlasting
7
SANNHET #2:
HTTP Response Codes ≠ «REST Response Codes»
8
9
Fra: http://martinfowler.com/articles/richardsonMaturityModel.html
10
Fra: http://www.restapitutorial.com/httpstatuscodes.html
11
Fra: http://www.restapitutorial.com/httpstatuscodes.html
12
Fra: http://www.restapitutorial.com/httpstatuscodes.html
13
Fra: http://www.restapitutorial.com/httpstatuscodes.html
Martin Fowler om HATEOAS
14
«The key elements that are supported
by the existence of the web are the
strong separation between safe (eg
GET) and non-safe operations, together
with using status codes to help
communicate the kinds of errors you
run into.»
http://martinfowler.com/articles/richardsonMaturityModel.html
SANNHET #3:
HATEOAS YAGNI⇒
15
16
Fra: http://martinfowler.com/articles/richardsonMaturityModel.html
HATEOAS
17
Hypermedia as the engine of application
state
Fra Wikipedia:
«Clients make state transitions only
through actions that are dynamically
identified within hypermedia by the server.
Except for simple fixed entry points to the
application, a client does not assume that
any particular action is available for any
particular resources beyond those
described in representations previously
received from the server.»
Eksempel: Hire i EPIM LogisticsHub
18
<Hire id="h101442">
<CcuId>141705</CcuId>
<EnclosingHireIds>
<EnclosingHireId distance="1">a1</EnclosingHireId>
</EnclosingHireIds>
<OrgNo>123456789</OrgNo>
<GlnLocation>1234567890123</GlnLocation>
<StartDate>2013-10-09</StartDate>
<EndDate>2013-11-08</EndDate>
<Link href="/ccus/141705/hires/a1/hires/h101442" method="get" rel="self"/>
<Link href="/ccus/141705" method="get" rel="Ccu"/>
<Link href="/ccus/141705/hires/a1" method="get" rel="EnclosingHire"/>
</Hire>
Eksempel: Hire i EPIM LogisticsHub
19
<Hire id="h101442">
<CcuId>141705</CcuId>
<EnclosingHireIds>
<EnclosingHireId distance="1">a1</EnclosingHireId>
</EnclosingHireIds>
<OrgNo>123456789</OrgNo>
<GlnLocation>1234567890123</GlnLocation>
<StartDate>2013-10-09</StartDate>
<EndDate>2013-11-08</EndDate>
<Link href="/ccus/141705/hires/a1/hires/h101442" method="get" rel="self"/>
<Link href="/ccus/141705" method="get" rel="Ccu"/>
<Link href="/ccus/141705/hires/a1" method="get" rel="EnclosingHire"/>
</Hire>
Eksempel: Hire i EPIM LogisticsHub
20
<Hire id="h101442">
<CcuId>141705</CcuId>
<EnclosingHireIds>
<EnclosingHireId distance="1">a1</EnclosingHireId>
</EnclosingHireIds>
<OrgNo>123456789</OrgNo>
<GlnLocation>1234567890123</GlnLocation>
<StartDate>2013-10-09</StartDate>
<EndDate>2013-11-08</EndDate>
<Link href="/ccus/141705/hires/a1/hires/h101442" method="get" rel="self"/>
<Link href="/ccus/141705" method="get" rel="Ccu"/>
<Link href="/ccus/141705/hires/a1" method="get" rel="EnclosingHire"/>
</Hire>
199 av totalt 477 tegn
(42%)
Eksempel: Hire i EPIM LogisticsHub, full HATEOAS
21
<Hire id="h101442">
<CcuId>141705</CcuId>
<EnclosingHireIds>
<EnclosingHireId distance="1">a1</EnclosingHireId>
</EnclosingHireIds>
<OrgNo>123456789</OrgNo>
<GlnLocation>1234567890123</GlnLocation>
<StartDate>2013-10-09</StartDate>
<EndDate>2013-11-08</EndDate>
<Link href="/ccus/141705/hires/a1/hires/h101442" method="get" rel="self"/>
<Link href="/ccus/141705" method="get" rel="Ccu"/>
<Link href="/ccus/141705/hires/a1" method="get" rel="EnclosingHire"/>
<Link href="/organizations/123456789" method="get" rel="Organization"/>
<Link href="/organizations/123456789/locations/1234567890123" method="get" rel="Location"/>
<Link href="/ccus/141705/hires/a1/hires/h101442/documents" method="post" rel="Documents"/>
<Link href="/ccus/141705/hires/a1/hires/h101442" method="put" rel="update"/>
<Link href="/ccus/141705/hires/a1/hires/h101442/hires" method="post" rel="addHire"/>
</Hire>
620 av totalt 899 tegn
(69%)
Martin Fowler om HATEOAS
22
«One obvious benefit of hypermedia
controls is that it allows the server to
change its URI scheme without
breaking clients. As long as clients look
up the “addTest” link URI then the
server team can juggle all URIs other
than the initial entry points.»
http://martinfowler.com/articles/richardsonMaturityModel.html
Martin Fowler om HATEOAS
23
«A further benefit is that it helps client
developers explore the protocol. The
links give client developers a hint as to
what may be possible next. It doesn't
give all the information: both the
“latest” and “cancel” controls point to
the same URI – they need to figure out
that one is a GET and the other a
DELETE. But at least it gives them a
starting point as to what to think about
for more information and to look for a
similar URI in the protocol
documentation.»
http://martinfowler.com/articles/richardsonMaturityModel.html
Kost/nytte av HATEOAS
Hva endrer seg oftest?
●
Oppførsel
●
Innhold
●
URLer
Hva er vanskelig å refaktorere?
●
Oppførsel
●
Innhold
●
URLer
24
Eksempel: Hire i EPIM LogisticsHub
25
<Hire id="h101442">
<CcuId>141705</CcuId>
<EnclosingHireIds>
<EnclosingHireId distance="1">b2</EnclosingHireId>
<EnclosingHireId distance="2">a1</EnclosingHireId>
</EnclosingHireIds>
<OrgNo>123456789</OrgNo>
<GlnLocation>1234567890123</GlnLocation>
<StartDate>2013-10-09</StartDate>
<EndDate>2013-11-08</EndDate>
<Link href="/ccus/141705/hires/a1/hires/h101442" method="get" rel="self"/>
<Link href="/ccus/141705" method="get" rel="Ccu"/>
<Link href="/ccus/141705/hires/a1" method="get" rel="EnclosingHire"/>
<Link href="/organizations/123456789" method="get" rel="Organization"/>
<Link href="/organizations/123456789/locations/1234567890123" method="get" rel="Location"/>
<Link href="/ccus/141705/hires/a1/hires/h101442/documents" method="post" rel="Documents"/>
<Link href="/ccus/141705/hires/a1/hires/h101442" method="put" rel="update"/>
<Link href="/ccus/141705/hires/a1/hires/h101442/hires" method="post" rel="addHire"/>
</Hire>
Eksempel: Hire i EPIM LogisticsHub
26
<Hire id="h101442">
<CcuId>141705</CcuId>
<EnclosingHireIds>
<EnclosingHireId distance="1">b2</EnclosingHireId>
<EnclosingHireId distance="2">a1</EnclosingHireId>
</EnclosingHireIds>
<OrgNo>123456789</OrgNo>
<GlnLocation>1234567890123</GlnLocation>
<StartDate>2013-10-09</StartDate>
<EndDate>2013-11-08</EndDate>
<Link href="/ccus/141705/hires/a1/hires/h101442" method="get" rel="self"/>
<Link href="/ccus/141705" method="get" rel="Ccu"/>
<Link href="/ccus/141705/hires/a1" method="get" rel="EnclosingHire"/>
<Link href="/organizations/123456789" method="get" rel="Organization"/>
<Link href="/organizations/123456789/locations/1234567890123" method="get" rel="Location"/>
<Link href="/ccus/141705/hires/a1/hires/h101442/documents" method="post" rel="Documents"/>
<Link href="/ccus/141705/hires/a1/hires/h101442" method="put" rel="update"/>
<Link href="/ccus/141705/hires/a1/hires/h101442/hires" method="post" rel="addHire"/>
</Hire>
HATEOAS
27
●
Bruker mye båndbredde
●
For å kunne slippe å refaktorere
noe som er lett å refaktorere
●
Og som nesten aldri endrer seg
●
YAGNI (You aren't gonna need it)

Mais conteúdo relacionado

Semelhante a Tre ubeleilige sannheter om REST

HTTP Parameter Pollution (HPP) - SEaCURE.it edition
HTTP Parameter Pollution (HPP) - SEaCURE.it editionHTTP Parameter Pollution (HPP) - SEaCURE.it edition
HTTP Parameter Pollution (HPP) - SEaCURE.it editionLuca Carettoni
 
[OSSParis 2015] The OpenID Connect Protocol
[OSSParis 2015] The OpenID Connect Protocol[OSSParis 2015] The OpenID Connect Protocol
[OSSParis 2015] The OpenID Connect ProtocolClément OUDOT
 
Sprint 137
Sprint 137Sprint 137
Sprint 137ManageIQ
 
CSU33012-I-microservices.pdf
CSU33012-I-microservices.pdfCSU33012-I-microservices.pdf
CSU33012-I-microservices.pdfRicky Garg
 
Ekon25 mORMot 2 Server-Side Notifications
Ekon25 mORMot 2 Server-Side NotificationsEkon25 mORMot 2 Server-Side Notifications
Ekon25 mORMot 2 Server-Side NotificationsArnaud Bouchez
 
Running microservices successfully | Bastian Hofmann | CODEiD
Running microservices successfully | Bastian Hofmann | CODEiDRunning microservices successfully | Bastian Hofmann | CODEiD
Running microservices successfully | Bastian Hofmann | CODEiDCODEiD PHP Community
 
What's Missing? Microservices Meetup at Cisco
What's Missing? Microservices Meetup at CiscoWhat's Missing? Microservices Meetup at Cisco
What's Missing? Microservices Meetup at CiscoAdrian Cockcroft
 
Innovate2014 Better Integrations Through Open Interfaces
Innovate2014 Better Integrations Through Open InterfacesInnovate2014 Better Integrations Through Open Interfaces
Innovate2014 Better Integrations Through Open InterfacesSteve Speicher
 
Кирилл Толкачев. Микросервисы: огонь, вода и девопс
Кирилл Толкачев. Микросервисы: огонь, вода и девопсКирилл Толкачев. Микросервисы: огонь, вода и девопс
Кирилл Толкачев. Микросервисы: огонь, вода и девопсScrumTrek
 
Statying Alive - Online and OFfline
Statying Alive - Online and OFflineStatying Alive - Online and OFfline
Statying Alive - Online and OFflineErik Hellman
 
Technical Introduction to IBM's Open Blockchain (OBC)
Technical Introduction to IBM's Open Blockchain (OBC)Technical Introduction to IBM's Open Blockchain (OBC)
Technical Introduction to IBM's Open Blockchain (OBC)Altoros
 
distributing over the web
distributing over the webdistributing over the web
distributing over the webNicola Baldi
 
Criando API's com HapiJS
Criando API's com HapiJSCriando API's com HapiJS
Criando API's com HapiJSMatheus Fidelis
 

Semelhante a Tre ubeleilige sannheter om REST (20)

Asp Net Architecture
Asp Net ArchitectureAsp Net Architecture
Asp Net Architecture
 
HTTP Parameter Pollution (HPP) - SEaCURE.it edition
HTTP Parameter Pollution (HPP) - SEaCURE.it editionHTTP Parameter Pollution (HPP) - SEaCURE.it edition
HTTP Parameter Pollution (HPP) - SEaCURE.it edition
 
Mule meetup 25thjan
Mule meetup 25thjanMule meetup 25thjan
Mule meetup 25thjan
 
Api design best practice
Api design best practiceApi design best practice
Api design best practice
 
[OSSParis 2015] The OpenID Connect Protocol
[OSSParis 2015] The OpenID Connect Protocol[OSSParis 2015] The OpenID Connect Protocol
[OSSParis 2015] The OpenID Connect Protocol
 
Sprint 137
Sprint 137Sprint 137
Sprint 137
 
CSU33012-I-microservices.pdf
CSU33012-I-microservices.pdfCSU33012-I-microservices.pdf
CSU33012-I-microservices.pdf
 
Ekon25 mORMot 2 Server-Side Notifications
Ekon25 mORMot 2 Server-Side NotificationsEkon25 mORMot 2 Server-Side Notifications
Ekon25 mORMot 2 Server-Side Notifications
 
Running microservices successfully | Bastian Hofmann | CODEiD
Running microservices successfully | Bastian Hofmann | CODEiDRunning microservices successfully | Bastian Hofmann | CODEiD
Running microservices successfully | Bastian Hofmann | CODEiD
 
What's Missing? Microservices Meetup at Cisco
What's Missing? Microservices Meetup at CiscoWhat's Missing? Microservices Meetup at Cisco
What's Missing? Microservices Meetup at Cisco
 
Innovate2014 Better Integrations Through Open Interfaces
Innovate2014 Better Integrations Through Open InterfacesInnovate2014 Better Integrations Through Open Interfaces
Innovate2014 Better Integrations Through Open Interfaces
 
Кирилл Толкачев. Микросервисы: огонь, вода и девопс
Кирилл Толкачев. Микросервисы: огонь, вода и девопсКирилл Толкачев. Микросервисы: огонь, вода и девопс
Кирилл Толкачев. Микросервисы: огонь, вода и девопс
 
Statying Alive - Online and OFfline
Statying Alive - Online and OFflineStatying Alive - Online and OFfline
Statying Alive - Online and OFfline
 
What's new in Performance Vision version 2.18
What's new in Performance Vision version 2.18What's new in Performance Vision version 2.18
What's new in Performance Vision version 2.18
 
WCF - In a Week
WCF - In a WeekWCF - In a Week
WCF - In a Week
 
Technical Introduction to IBM's Open Blockchain (OBC)
Technical Introduction to IBM's Open Blockchain (OBC)Technical Introduction to IBM's Open Blockchain (OBC)
Technical Introduction to IBM's Open Blockchain (OBC)
 
Micro service architecture
Micro service architectureMicro service architecture
Micro service architecture
 
Api RESTFull
Api RESTFullApi RESTFull
Api RESTFull
 
distributing over the web
distributing over the webdistributing over the web
distributing over the web
 
Criando API's com HapiJS
Criando API's com HapiJSCriando API's com HapiJS
Criando API's com HapiJS
 

Mais de Filip Van Laenen

How JSR 385 could have saved the Mars Climate Orbiter
How JSR 385 could have saved the Mars Climate OrbiterHow JSR 385 could have saved the Mars Climate Orbiter
How JSR 385 could have saved the Mars Climate OrbiterFilip Van Laenen
 
How JSR-385 Could Have Saved the Mars Climate Orbiter
How JSR-385 Could Have Saved the Mars Climate OrbiterHow JSR-385 Could Have Saved the Mars Climate Orbiter
How JSR-385 Could Have Saved the Mars Climate OrbiterFilip Van Laenen
 
Clouds with Trenches and Sharp Edges
Clouds with Trenches and Sharp EdgesClouds with Trenches and Sharp Edges
Clouds with Trenches and Sharp EdgesFilip Van Laenen
 
Become an SVG Architect, not a PowerPoint Architect
Become an SVG Architect, not a PowerPoint ArchitectBecome an SVG Architect, not a PowerPoint Architect
Become an SVG Architect, not a PowerPoint ArchitectFilip Van Laenen
 
Mutasjonstesting – Lag bugs for å få bedre kode
Mutasjonstesting – Lag bugs for å få bedre kodeMutasjonstesting – Lag bugs for å få bedre kode
Mutasjonstesting – Lag bugs for å få bedre kodeFilip Van Laenen
 
Hvem kommer til å vinne kommunevalget?
Hvem kommer til å vinne kommunevalget?Hvem kommer til å vinne kommunevalget?
Hvem kommer til å vinne kommunevalget?Filip Van Laenen
 
Five Inconvenient Truths about REST
Five Inconvenient Truths about RESTFive Inconvenient Truths about REST
Five Inconvenient Truths about RESTFilip Van Laenen
 
How Free Data Can Drive Some of the Monkey Business Out of Political Journali...
How Free Data Can Drive Some of the Monkey Business Out of Political Journali...How Free Data Can Drive Some of the Monkey Business Out of Political Journali...
How Free Data Can Drive Some of the Monkey Business Out of Political Journali...Filip Van Laenen
 
Oop 2015 – Mutation Testing
Oop 2015 – Mutation TestingOop 2015 – Mutation Testing
Oop 2015 – Mutation TestingFilip Van Laenen
 
#NoEstimates – Smidig 2014
 #NoEstimates – Smidig 2014 #NoEstimates – Smidig 2014
#NoEstimates – Smidig 2014Filip Van Laenen
 
Mutation Testing with PIT (Booster 2014, 2014-MAR-13)
Mutation Testing with PIT (Booster 2014, 2014-MAR-13)Mutation Testing with PIT (Booster 2014, 2014-MAR-13)
Mutation Testing with PIT (Booster 2014, 2014-MAR-13)Filip Van Laenen
 
Hvorfor stole på e-valg 2011/13?
Hvorfor stole på e-valg 2011/13?Hvorfor stole på e-valg 2011/13?
Hvorfor stole på e-valg 2011/13?Filip Van Laenen
 
Mutation testing (OOP 2012, 2012-JAN-24)
Mutation testing (OOP 2012, 2012-JAN-24)Mutation testing (OOP 2012, 2012-JAN-24)
Mutation testing (OOP 2012, 2012-JAN-24)Filip Van Laenen
 
SVG (Devoxx 2011, 2011-NOV-14)
SVG (Devoxx 2011, 2011-NOV-14)SVG (Devoxx 2011, 2011-NOV-14)
SVG (Devoxx 2011, 2011-NOV-14)Filip Van Laenen
 
SVG (Framsia, 27-SEP-2011)
SVG (Framsia, 27-SEP-2011)SVG (Framsia, 27-SEP-2011)
SVG (Framsia, 27-SEP-2011)Filip Van Laenen
 

Mais de Filip Van Laenen (18)

Drawing for IT Architects
Drawing for IT ArchitectsDrawing for IT Architects
Drawing for IT Architects
 
How JSR 385 could have saved the Mars Climate Orbiter
How JSR 385 could have saved the Mars Climate OrbiterHow JSR 385 could have saved the Mars Climate Orbiter
How JSR 385 could have saved the Mars Climate Orbiter
 
How JSR-385 Could Have Saved the Mars Climate Orbiter
How JSR-385 Could Have Saved the Mars Climate OrbiterHow JSR-385 Could Have Saved the Mars Climate Orbiter
How JSR-385 Could Have Saved the Mars Climate Orbiter
 
Clouds with Trenches and Sharp Edges
Clouds with Trenches and Sharp EdgesClouds with Trenches and Sharp Edges
Clouds with Trenches and Sharp Edges
 
Become an SVG Architect, not a PowerPoint Architect
Become an SVG Architect, not a PowerPoint ArchitectBecome an SVG Architect, not a PowerPoint Architect
Become an SVG Architect, not a PowerPoint Architect
 
Dial M for Mutation
Dial M for MutationDial M for Mutation
Dial M for Mutation
 
Mutasjonstesting – Lag bugs for å få bedre kode
Mutasjonstesting – Lag bugs for å få bedre kodeMutasjonstesting – Lag bugs for å få bedre kode
Mutasjonstesting – Lag bugs for å få bedre kode
 
Hvem kommer til å vinne kommunevalget?
Hvem kommer til å vinne kommunevalget?Hvem kommer til å vinne kommunevalget?
Hvem kommer til å vinne kommunevalget?
 
Five Inconvenient Truths about REST
Five Inconvenient Truths about RESTFive Inconvenient Truths about REST
Five Inconvenient Truths about REST
 
How Free Data Can Drive Some of the Monkey Business Out of Political Journali...
How Free Data Can Drive Some of the Monkey Business Out of Political Journali...How Free Data Can Drive Some of the Monkey Business Out of Political Journali...
How Free Data Can Drive Some of the Monkey Business Out of Political Journali...
 
Oop 2015 – Mutation Testing
Oop 2015 – Mutation TestingOop 2015 – Mutation Testing
Oop 2015 – Mutation Testing
 
#NoEstimates – Smidig 2014
 #NoEstimates – Smidig 2014 #NoEstimates – Smidig 2014
#NoEstimates – Smidig 2014
 
What Architects Really Do
What Architects Really DoWhat Architects Really Do
What Architects Really Do
 
Mutation Testing with PIT (Booster 2014, 2014-MAR-13)
Mutation Testing with PIT (Booster 2014, 2014-MAR-13)Mutation Testing with PIT (Booster 2014, 2014-MAR-13)
Mutation Testing with PIT (Booster 2014, 2014-MAR-13)
 
Hvorfor stole på e-valg 2011/13?
Hvorfor stole på e-valg 2011/13?Hvorfor stole på e-valg 2011/13?
Hvorfor stole på e-valg 2011/13?
 
Mutation testing (OOP 2012, 2012-JAN-24)
Mutation testing (OOP 2012, 2012-JAN-24)Mutation testing (OOP 2012, 2012-JAN-24)
Mutation testing (OOP 2012, 2012-JAN-24)
 
SVG (Devoxx 2011, 2011-NOV-14)
SVG (Devoxx 2011, 2011-NOV-14)SVG (Devoxx 2011, 2011-NOV-14)
SVG (Devoxx 2011, 2011-NOV-14)
 
SVG (Framsia, 27-SEP-2011)
SVG (Framsia, 27-SEP-2011)SVG (Framsia, 27-SEP-2011)
SVG (Framsia, 27-SEP-2011)
 

Último

5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 

Último (20)

5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 

Tre ubeleilige sannheter om REST

  • 1. TRE UBELEILIGE SANNHETER OM REST COMPUTASDAG, 13. JUNI 2014 1
  • 3. SANNHET #1: GET-kall er aldri nullipotent 3
  • 5. Hva betyr «nullipotent»? 5 Fra Wikipedia: «The GET method is a safe method (or nullipotent), meaning that calling it produces no side-effects.»
  • 7. Moteksempler ● Access log som REST-ressurs ● Tilgangskontroll – Three strikes-regel ● Engangsnedlasting 7
  • 8. SANNHET #2: HTTP Response Codes ≠ «REST Response Codes» 8
  • 14. Martin Fowler om HATEOAS 14 «The key elements that are supported by the existence of the web are the strong separation between safe (eg GET) and non-safe operations, together with using status codes to help communicate the kinds of errors you run into.» http://martinfowler.com/articles/richardsonMaturityModel.html
  • 17. HATEOAS 17 Hypermedia as the engine of application state Fra Wikipedia: «Clients make state transitions only through actions that are dynamically identified within hypermedia by the server. Except for simple fixed entry points to the application, a client does not assume that any particular action is available for any particular resources beyond those described in representations previously received from the server.»
  • 18. Eksempel: Hire i EPIM LogisticsHub 18 <Hire id="h101442"> <CcuId>141705</CcuId> <EnclosingHireIds> <EnclosingHireId distance="1">a1</EnclosingHireId> </EnclosingHireIds> <OrgNo>123456789</OrgNo> <GlnLocation>1234567890123</GlnLocation> <StartDate>2013-10-09</StartDate> <EndDate>2013-11-08</EndDate> <Link href="/ccus/141705/hires/a1/hires/h101442" method="get" rel="self"/> <Link href="/ccus/141705" method="get" rel="Ccu"/> <Link href="/ccus/141705/hires/a1" method="get" rel="EnclosingHire"/> </Hire>
  • 19. Eksempel: Hire i EPIM LogisticsHub 19 <Hire id="h101442"> <CcuId>141705</CcuId> <EnclosingHireIds> <EnclosingHireId distance="1">a1</EnclosingHireId> </EnclosingHireIds> <OrgNo>123456789</OrgNo> <GlnLocation>1234567890123</GlnLocation> <StartDate>2013-10-09</StartDate> <EndDate>2013-11-08</EndDate> <Link href="/ccus/141705/hires/a1/hires/h101442" method="get" rel="self"/> <Link href="/ccus/141705" method="get" rel="Ccu"/> <Link href="/ccus/141705/hires/a1" method="get" rel="EnclosingHire"/> </Hire>
  • 20. Eksempel: Hire i EPIM LogisticsHub 20 <Hire id="h101442"> <CcuId>141705</CcuId> <EnclosingHireIds> <EnclosingHireId distance="1">a1</EnclosingHireId> </EnclosingHireIds> <OrgNo>123456789</OrgNo> <GlnLocation>1234567890123</GlnLocation> <StartDate>2013-10-09</StartDate> <EndDate>2013-11-08</EndDate> <Link href="/ccus/141705/hires/a1/hires/h101442" method="get" rel="self"/> <Link href="/ccus/141705" method="get" rel="Ccu"/> <Link href="/ccus/141705/hires/a1" method="get" rel="EnclosingHire"/> </Hire> 199 av totalt 477 tegn (42%)
  • 21. Eksempel: Hire i EPIM LogisticsHub, full HATEOAS 21 <Hire id="h101442"> <CcuId>141705</CcuId> <EnclosingHireIds> <EnclosingHireId distance="1">a1</EnclosingHireId> </EnclosingHireIds> <OrgNo>123456789</OrgNo> <GlnLocation>1234567890123</GlnLocation> <StartDate>2013-10-09</StartDate> <EndDate>2013-11-08</EndDate> <Link href="/ccus/141705/hires/a1/hires/h101442" method="get" rel="self"/> <Link href="/ccus/141705" method="get" rel="Ccu"/> <Link href="/ccus/141705/hires/a1" method="get" rel="EnclosingHire"/> <Link href="/organizations/123456789" method="get" rel="Organization"/> <Link href="/organizations/123456789/locations/1234567890123" method="get" rel="Location"/> <Link href="/ccus/141705/hires/a1/hires/h101442/documents" method="post" rel="Documents"/> <Link href="/ccus/141705/hires/a1/hires/h101442" method="put" rel="update"/> <Link href="/ccus/141705/hires/a1/hires/h101442/hires" method="post" rel="addHire"/> </Hire> 620 av totalt 899 tegn (69%)
  • 22. Martin Fowler om HATEOAS 22 «One obvious benefit of hypermedia controls is that it allows the server to change its URI scheme without breaking clients. As long as clients look up the “addTest” link URI then the server team can juggle all URIs other than the initial entry points.» http://martinfowler.com/articles/richardsonMaturityModel.html
  • 23. Martin Fowler om HATEOAS 23 «A further benefit is that it helps client developers explore the protocol. The links give client developers a hint as to what may be possible next. It doesn't give all the information: both the “latest” and “cancel” controls point to the same URI – they need to figure out that one is a GET and the other a DELETE. But at least it gives them a starting point as to what to think about for more information and to look for a similar URI in the protocol documentation.» http://martinfowler.com/articles/richardsonMaturityModel.html
  • 24. Kost/nytte av HATEOAS Hva endrer seg oftest? ● Oppførsel ● Innhold ● URLer Hva er vanskelig å refaktorere? ● Oppførsel ● Innhold ● URLer 24
  • 25. Eksempel: Hire i EPIM LogisticsHub 25 <Hire id="h101442"> <CcuId>141705</CcuId> <EnclosingHireIds> <EnclosingHireId distance="1">b2</EnclosingHireId> <EnclosingHireId distance="2">a1</EnclosingHireId> </EnclosingHireIds> <OrgNo>123456789</OrgNo> <GlnLocation>1234567890123</GlnLocation> <StartDate>2013-10-09</StartDate> <EndDate>2013-11-08</EndDate> <Link href="/ccus/141705/hires/a1/hires/h101442" method="get" rel="self"/> <Link href="/ccus/141705" method="get" rel="Ccu"/> <Link href="/ccus/141705/hires/a1" method="get" rel="EnclosingHire"/> <Link href="/organizations/123456789" method="get" rel="Organization"/> <Link href="/organizations/123456789/locations/1234567890123" method="get" rel="Location"/> <Link href="/ccus/141705/hires/a1/hires/h101442/documents" method="post" rel="Documents"/> <Link href="/ccus/141705/hires/a1/hires/h101442" method="put" rel="update"/> <Link href="/ccus/141705/hires/a1/hires/h101442/hires" method="post" rel="addHire"/> </Hire>
  • 26. Eksempel: Hire i EPIM LogisticsHub 26 <Hire id="h101442"> <CcuId>141705</CcuId> <EnclosingHireIds> <EnclosingHireId distance="1">b2</EnclosingHireId> <EnclosingHireId distance="2">a1</EnclosingHireId> </EnclosingHireIds> <OrgNo>123456789</OrgNo> <GlnLocation>1234567890123</GlnLocation> <StartDate>2013-10-09</StartDate> <EndDate>2013-11-08</EndDate> <Link href="/ccus/141705/hires/a1/hires/h101442" method="get" rel="self"/> <Link href="/ccus/141705" method="get" rel="Ccu"/> <Link href="/ccus/141705/hires/a1" method="get" rel="EnclosingHire"/> <Link href="/organizations/123456789" method="get" rel="Organization"/> <Link href="/organizations/123456789/locations/1234567890123" method="get" rel="Location"/> <Link href="/ccus/141705/hires/a1/hires/h101442/documents" method="post" rel="Documents"/> <Link href="/ccus/141705/hires/a1/hires/h101442" method="put" rel="update"/> <Link href="/ccus/141705/hires/a1/hires/h101442/hires" method="post" rel="addHire"/> </Hire>
  • 27. HATEOAS 27 ● Bruker mye båndbredde ● For å kunne slippe å refaktorere noe som er lett å refaktorere ● Og som nesten aldri endrer seg ● YAGNI (You aren't gonna need it)