SlideShare ist ein Scribd-Unternehmen logo
1 von 25
© 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L© 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L
Taming The RESTed NARWHL
Striking the Balance Between
Usability and Zealotry in REST
© 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L
2
© 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L
3
Is this RESTful?
http://api.example.com/events/query.json?id=87465
© 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L
4
What About This?
Find “Rob Zazueta” in the employee Database.
GET /countries
[
"/countries/usa/states",
"/countries/can/provinces",
...
]
GET /countries/usa/states
[
"/countries/usa/states/al",
"/countries/usa/states/ak",
...
]
GET /countries/usa/states/ca
[
"/countries/usa/states/ca/divisions",
"/countries/usa/states/ca/employees",
...
]
GET /countries/usa/states/ca/employees
[
"/countries/usa/states/ca/employees/alan_akbar",
"/countries/usa/states/ca/employees/bill_allen"
...
]
© 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L
5
“What is a REST API?”
© 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L
A design framework to build RESTful
APIs intended for consumption by
applications built by people
6
Introducing the RESTed NARWHL
© 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L
The RESTed NARWHL
http://www.narwhl.com
7
PLEASE PROVIDE YOUR FEEDBACK!
© 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L
8
© 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L
Noun
As
Resource
With
Hyper
Links
9
1. It’s how I describe intuitive APIs
© 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L
10
2. Narwhals are an awesome mashup
+ =
© 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L
11
3. Narwhals are real.
© 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L
12
Obligatory RMM Slide
Source: http://martinfowler.com/articles/richardsonMaturityModel.html
© 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L
• A customer wants to browse for products by
category.
• A customer wants to add a product to their
shopping cart.
• A store admin wants to list all customers who
bought a given product.
13
Use Cases Uncover Resources
© 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L
• A customer wants to browse for products by
category.
• A customer wants to add a product to their
shopping cart.
• A store admin wants to list all customers who
bought a given product.
14
Use Cases Uncover Resources
© 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L
• Customers
• Products
• Categories
• Shopping Cart
• Store Admin
15
Use Cases Uncover Resources
© 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L
16
Endpoint Design Matters
/{resource_name}/{resource_identifier}
© 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L
17
Endpoint Design Matters
/products/73924
© 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L
18
Endpoint Design Matters
/categories/39/products/73924
© 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L
19
Endpoint Design Matters
Link: <http://api.example.com/v1/products/73924>; rel="canonical"
© 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L
Start using specific MIME types in your
responses – even custom ones.
NO - Content-Type: text/json
YES – Content-Type:
application/vnd.example.products.json+v1
20
Saner Versioning Through Content Negotiation
© 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L
SDKs Suck Because:
• They’re one more thing to maintain
• They often assume functionality outside the API
• They get bloated
21Dynamic Client Generation Through Response Profiles
© 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L
Dynamic Code Libraries Rock Because:
• They reflect only what’s defined in the API
• They grow and change as the API iterates
• They feel more native to the developer
22Dynamic Client Generation Through Response Profiles
© 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L
23
NARWHL Maturity Model*
Level 0: Nouns as Resources With Hyperlinks
Level 1: NARWHL JSON Responses
Level 2: Content Negotiation
Level 3: Response Profiles & Definitions
Awesomeness of NARWHL
*With apologies and thanks to Martin Fowler and Leonard Richardson
© 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L
The RESTed NARWHL
http://www.narwhl.com
24
SERIOUSLY. DON’T MAKE ME BEG.
© 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L
25

Weitere ähnliche Inhalte

Ähnlich wie Taming the RESTed NARWHL: Striking the Balance Between Usability and Zealotry in REST.

Optimizing Website Performance in the Age of Mobile & Social
Optimizing Website Performance in the Age of Mobile & Social Optimizing Website Performance in the Age of Mobile & Social
Optimizing Website Performance in the Age of Mobile & Social Yottaa
 
Cloud Identity Deployed
Cloud Identity DeployedCloud Identity Deployed
Cloud Identity DeployedPablo Valarezo
 
A Study In Mobile Growth: Becoming Your Customers' Ritual
A Study In Mobile Growth: Becoming Your Customers' RitualA Study In Mobile Growth: Becoming Your Customers' Ritual
A Study In Mobile Growth: Becoming Your Customers' RitualKathleen Waugh
 
Meteor - not just for rockstars
Meteor - not just for rockstarsMeteor - not just for rockstars
Meteor - not just for rockstarsStephan Hochhaus
 
The New Patterns of Innovation
The New Patterns of InnovationThe New Patterns of Innovation
The New Patterns of InnovationSushant Kumar
 
Say "Hello" to Industry 4.0: Flexible automation & the future of manufacturing
Say "Hello" to Industry 4.0: Flexible automation & the future of manufacturing Say "Hello" to Industry 4.0: Flexible automation & the future of manufacturing
Say "Hello" to Industry 4.0: Flexible automation & the future of manufacturing OTTOMotors
 
Growth Framework for Consumer Startups
Growth Framework for Consumer StartupsGrowth Framework for Consumer Startups
Growth Framework for Consumer StartupsP J
 
Benefits of Trail-Oriented Development
Benefits of Trail-Oriented Development Benefits of Trail-Oriented Development
Benefits of Trail-Oriented Development Phil Mays
 
SharePoint Saturday Redmond - Building solutions with the future in mind
SharePoint Saturday Redmond - Building solutions with the future in mindSharePoint Saturday Redmond - Building solutions with the future in mind
SharePoint Saturday Redmond - Building solutions with the future in mindChris Johnson
 
From Content Strategy to Drupal Site Building - Connecting the dots
From Content Strategy to Drupal Site Building - Connecting the dotsFrom Content Strategy to Drupal Site Building - Connecting the dots
From Content Strategy to Drupal Site Building - Connecting the dotsRonald Ashri
 
From Content Strategy to Drupal Site Building - Connecting the Dots
From Content Strategy to Drupal Site Building - Connecting the DotsFrom Content Strategy to Drupal Site Building - Connecting the Dots
From Content Strategy to Drupal Site Building - Connecting the DotsRonald Ashri
 
Puppet Camp Sydney 2014 - Evolving Design Patterns in AWS
Puppet Camp Sydney 2014 - Evolving Design Patterns in AWSPuppet Camp Sydney 2014 - Evolving Design Patterns in AWS
Puppet Camp Sydney 2014 - Evolving Design Patterns in AWSjohnpainter_id_au
 

Ähnlich wie Taming the RESTed NARWHL: Striking the Balance Between Usability and Zealotry in REST. (20)

Optimizing Website Performance in the Age of Mobile & Social
Optimizing Website Performance in the Age of Mobile & Social Optimizing Website Performance in the Age of Mobile & Social
Optimizing Website Performance in the Age of Mobile & Social
 
Cloud Identity Deployed
Cloud Identity DeployedCloud Identity Deployed
Cloud Identity Deployed
 
A Study In Mobile Growth: Becoming Your Customers' Ritual
A Study In Mobile Growth: Becoming Your Customers' RitualA Study In Mobile Growth: Becoming Your Customers' Ritual
A Study In Mobile Growth: Becoming Your Customers' Ritual
 
Meteor - not just for rockstars
Meteor - not just for rockstarsMeteor - not just for rockstars
Meteor - not just for rockstars
 
ROne
ROneROne
ROne
 
the_swft_product_overview_11072016
the_swft_product_overview_11072016the_swft_product_overview_11072016
the_swft_product_overview_11072016
 
The New Patterns of Innovation
The New Patterns of InnovationThe New Patterns of Innovation
The New Patterns of Innovation
 
Say "Hello" to Industry 4.0: Flexible automation & the future of manufacturing
Say "Hello" to Industry 4.0: Flexible automation & the future of manufacturing Say "Hello" to Industry 4.0: Flexible automation & the future of manufacturing
Say "Hello" to Industry 4.0: Flexible automation & the future of manufacturing
 
HPMC 2014 - The value of analytics - SAS
HPMC 2014 - The value of analytics - SASHPMC 2014 - The value of analytics - SAS
HPMC 2014 - The value of analytics - SAS
 
Croosing
Croosing Croosing
Croosing
 
Vb & asp
Vb & aspVb & asp
Vb & asp
 
Growth Framework for Consumer Startups
Growth Framework for Consumer StartupsGrowth Framework for Consumer Startups
Growth Framework for Consumer Startups
 
The Digital Transformation: A New World Order
The Digital Transformation: A New World OrderThe Digital Transformation: A New World Order
The Digital Transformation: A New World Order
 
Benefits of Trail-Oriented Development
Benefits of Trail-Oriented Development Benefits of Trail-Oriented Development
Benefits of Trail-Oriented Development
 
Cloud benefits
Cloud benefitsCloud benefits
Cloud benefits
 
SharePoint Saturday Redmond - Building solutions with the future in mind
SharePoint Saturday Redmond - Building solutions with the future in mindSharePoint Saturday Redmond - Building solutions with the future in mind
SharePoint Saturday Redmond - Building solutions with the future in mind
 
From Content Strategy to Drupal Site Building - Connecting the dots
From Content Strategy to Drupal Site Building - Connecting the dotsFrom Content Strategy to Drupal Site Building - Connecting the dots
From Content Strategy to Drupal Site Building - Connecting the dots
 
From Content Strategy to Drupal Site Building - Connecting the Dots
From Content Strategy to Drupal Site Building - Connecting the DotsFrom Content Strategy to Drupal Site Building - Connecting the Dots
From Content Strategy to Drupal Site Building - Connecting the Dots
 
BS portfolio
BS portfolioBS portfolio
BS portfolio
 
Puppet Camp Sydney 2014 - Evolving Design Patterns in AWS
Puppet Camp Sydney 2014 - Evolving Design Patterns in AWSPuppet Camp Sydney 2014 - Evolving Design Patterns in AWS
Puppet Camp Sydney 2014 - Evolving Design Patterns in AWS
 

Kürzlich hochgeladen

Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Call Girls in Nagpur High Profile
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceDelhi Call girls
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Servicesexy call girls service in goa
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...tanu pandey
 
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$kojalkojal131
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663Call Girls Mumbai
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445ruhi
 
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.soniya singh
 
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...Escorts Call Girls
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGAPNIC
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girladitipandeya
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersDamian Radcliffe
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableSeo
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...APNIC
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.soniya singh
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)Delhi Call girls
 

Kürzlich hochgeladen (20)

Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
 
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
 
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
 
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
 
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
 
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOG
 
@9999965857 🫦 Sexy Desi Call Girls Laxmi Nagar 💓 High Profile Escorts Delhi 🫶
@9999965857 🫦 Sexy Desi Call Girls Laxmi Nagar 💓 High Profile Escorts Delhi 🫶@9999965857 🫦 Sexy Desi Call Girls Laxmi Nagar 💓 High Profile Escorts Delhi 🫶
@9999965857 🫦 Sexy Desi Call Girls Laxmi Nagar 💓 High Profile Escorts Delhi 🫶
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
 
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
 

Taming the RESTed NARWHL: Striking the Balance Between Usability and Zealotry in REST.

  • 1. © 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L© 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L Taming The RESTed NARWHL Striking the Balance Between Usability and Zealotry in REST
  • 2. © 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L 2
  • 3. © 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L 3 Is this RESTful? http://api.example.com/events/query.json?id=87465
  • 4. © 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L 4 What About This? Find “Rob Zazueta” in the employee Database. GET /countries [ "/countries/usa/states", "/countries/can/provinces", ... ] GET /countries/usa/states [ "/countries/usa/states/al", "/countries/usa/states/ak", ... ] GET /countries/usa/states/ca [ "/countries/usa/states/ca/divisions", "/countries/usa/states/ca/employees", ... ] GET /countries/usa/states/ca/employees [ "/countries/usa/states/ca/employees/alan_akbar", "/countries/usa/states/ca/employees/bill_allen" ... ]
  • 5. © 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L 5 “What is a REST API?”
  • 6. © 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L A design framework to build RESTful APIs intended for consumption by applications built by people 6 Introducing the RESTed NARWHL
  • 7. © 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L The RESTed NARWHL http://www.narwhl.com 7 PLEASE PROVIDE YOUR FEEDBACK!
  • 8. © 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L 8
  • 9. © 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L Noun As Resource With Hyper Links 9 1. It’s how I describe intuitive APIs
  • 10. © 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L 10 2. Narwhals are an awesome mashup + =
  • 11. © 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L 11 3. Narwhals are real.
  • 12. © 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L 12 Obligatory RMM Slide Source: http://martinfowler.com/articles/richardsonMaturityModel.html
  • 13. © 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L • A customer wants to browse for products by category. • A customer wants to add a product to their shopping cart. • A store admin wants to list all customers who bought a given product. 13 Use Cases Uncover Resources
  • 14. © 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L • A customer wants to browse for products by category. • A customer wants to add a product to their shopping cart. • A store admin wants to list all customers who bought a given product. 14 Use Cases Uncover Resources
  • 15. © 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L • Customers • Products • Categories • Shopping Cart • Store Admin 15 Use Cases Uncover Resources
  • 16. © 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L 16 Endpoint Design Matters /{resource_name}/{resource_identifier}
  • 17. © 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L 17 Endpoint Design Matters /products/73924
  • 18. © 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L 18 Endpoint Design Matters /categories/39/products/73924
  • 19. © 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L 19 Endpoint Design Matters Link: <http://api.example.com/v1/products/73924>; rel="canonical"
  • 20. © 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L Start using specific MIME types in your responses – even custom ones. NO - Content-Type: text/json YES – Content-Type: application/vnd.example.products.json+v1 20 Saner Versioning Through Content Negotiation
  • 21. © 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L SDKs Suck Because: • They’re one more thing to maintain • They often assume functionality outside the API • They get bloated 21Dynamic Client Generation Through Response Profiles
  • 22. © 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L Dynamic Code Libraries Rock Because: • They reflect only what’s defined in the API • They grow and change as the API iterates • They feel more native to the developer 22Dynamic Client Generation Through Response Profiles
  • 23. © 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L 23 NARWHL Maturity Model* Level 0: Nouns as Resources With Hyperlinks Level 1: NARWHL JSON Responses Level 2: Content Negotiation Level 3: Response Profiles & Definitions Awesomeness of NARWHL *With apologies and thanks to Martin Fowler and Leonard Richardson
  • 24. © 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L The RESTed NARWHL http://www.narwhl.com 24 SERIOUSLY. DON’T MAKE ME BEG.
  • 25. © 2 0 1 4 M a s h e r y , I n c . — P R O P R I E T A R Y A N D C O N F I D E N T I A L 25

Hinweis der Redaktion

  1. Thank you for listening to me yammer for the next 30 minutes. I love the API community. There are incredibly smart and passionate people who are eager to connect us to the future. I have a great deal of respect for all of them and their ideas and I love jumping into the fray on the API Craft group, at conferences like RESTfest and, of course, right here at Gluecon.
  2. I can not stand peoplewho identify problems without suggesting solutions. I tend to believe you become part of the problem at that point.
  3. Don’t let your API’s design surprise your developer customers; surprise them, instead, with the cool things you can do with it.
  4. This is perhaps the most important point. APIs can not live in the abstract and expect to survive – they need to get out there and be used. NARWHL is intended for teams who need to get past the debate and build an API today.
  5. No talk about RESTful APIs can be legally delivered without mentioning both Roy Fielding’s 2000 thesis and the Richardson Maturity Model. IF you leave it out, expect to get a ticket in the mail. NARWHL starts where the RMM ends. It is by default intended to be RMM Level 3 compliant, but to add some additional structure based on best practices that are already in the wild and that are recommended. I’m not talking about anything revolutionary here – this should look familiar to you. And that’s the point.