SlideShare a Scribd company logo
1 of 49
Smart IT Engineering Ltd. RESTful Web Services Imran M Yousuf Smart IT Engineering Ltd.
Smart IT Engineering Ltd. What's not covered ,[object Object]
Hands on tutorial on how code a RESTful WS
Details of how HTTP works
Details on various media formats
Smart IT Engineering Ltd. What to expect ,[object Object]
Discussion on its constraints
WWW ,[object Object],[object Object]
Constraints of ROA
Examples
Smart IT Engineering Ltd. What to expect ,[object Object]
Questions
Smart IT Engineering Ltd. What is REST ,[object Object]
Proposed by  Dr. Roy Thomas Fielding  in his PhD dissertation titled -  “Architectural Styles and the Design of Network-based Software Architectures”
Smart IT Engineering Ltd. What is REST ,[object Object]
REST is an architectural style composed of specific constraints.
The Constraints -  - Client-Server - Stateless - Cache - Uniform Interface - Layered System - Code-On-Demand  (Optional)
Smart IT Engineering Ltd. REST Constraints ,[object Object]
No restrictions on the  number of the clients
No restriction on  communication medium  /  protocol Client (Browser) Client (CLI – curl, wget) Client (Desktop) Network Client (Mobile) Client (Another System)
Smart IT Engineering Ltd. REST Constraints ,[object Object]
Improve user interface portability across multiple platforms
Improve scalability by simplifying server components
Components evolve independently
Smart IT Engineering Ltd. REST Constraints ,[object Object],Advantages Visibility Reliability Scalability
Smart IT Engineering Ltd. REST Constraints ,[object Object],Advantages Efficient Scalability Performance
Smart IT Engineering Ltd. REST Constraints ,[object Object],[object Object]
Smart IT Engineering Ltd. REST Constraints ,[object Object]
Manipulation of  resources  through representations
Self-descriptive messages
HATEOAS  ( H ypermedia  A s  T he  E ngine  O f  A pplication  S tate)
Smart IT Engineering Ltd. REST Constraints ,[object Object]
A resource is a  conceptual mapping  to a  set of entities , not the entity that corresponds to the mapping at any particular point in time.
If compared of Object Oriented aproach,  Object  if  referrrable  is a resource.
Examples of resources would Books, A Book, An Author, Authors, Authors of a Book, A Publisher, Categories of a Book, A Category etc.
Smart IT Engineering Ltd. REST Constraints ,[object Object]
Other  commonly used  but  less precise  names for a representation include: document, file, and HTTP message entity, instance, or variant.
Message consists of control data, metadata, messages and in some cases hyperlinks to resources.
Examples: Images (image/jpg, image/png, etc.), Markups (text/html, application/xml etc.) and more.
Smart IT Engineering Ltd. REST Constraints ,[object Object]
Therefore, dependent on the current application state, every server response describes the new actions that are available.
The server can change the range of allowable responses in a dynamic way, and a client should adapt its behavior to these changes.
A client of a RESTful application need only know a  single fixed URL  to access it.
Smart IT Engineering Ltd. REST Constraints ,[object Object]
The link  relations  should be  standardized , so that the client knows what selecting that state transition means.
Standardized media types  are also expected to be understood by any client that might use the API.
Application state  transitions are driven  by a  combination of the known processing rules  for each media type, client selection from the server-provided choices in representations received, and the user's manipulation of those representations. Thus interactions are driven by  hypermedia .
Smart IT Engineering Ltd. REST What is the biggest known RESTful System on planet Earth?
Smart IT Engineering Ltd. REST World Wide Web a.k.a Internet ,[object Object]

More Related Content

What's hot (20)

Restful web services ppt
Restful web services pptRestful web services ppt
Restful web services ppt
 
REST API Design
REST API DesignREST API Design
REST API Design
 
An Introduction To REST API
An Introduction To REST APIAn Introduction To REST API
An Introduction To REST API
 
REST API Design & Development
REST API Design & DevelopmentREST API Design & Development
REST API Design & Development
 
Facebook api
Facebook api Facebook api
Facebook api
 
02 api gateway
02 api gateway02 api gateway
02 api gateway
 
Introduction to Django Rest Framework
Introduction to Django Rest FrameworkIntroduction to Django Rest Framework
Introduction to Django Rest Framework
 
RESTful API - Best Practices
RESTful API - Best PracticesRESTful API - Best Practices
RESTful API - Best Practices
 
Introduction to APIs (Application Programming Interface)
Introduction to APIs (Application Programming Interface) Introduction to APIs (Application Programming Interface)
Introduction to APIs (Application Programming Interface)
 
Api gateway
Api gatewayApi gateway
Api gateway
 
Oracle API Gateway
Oracle API GatewayOracle API Gateway
Oracle API Gateway
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
3 Tier Architecture
3 Tier Architecture3 Tier Architecture
3 Tier Architecture
 
Soap vs rest
Soap vs restSoap vs rest
Soap vs rest
 
ASP.NET Web API
ASP.NET Web APIASP.NET Web API
ASP.NET Web API
 
Java design patterns
Java design patternsJava design patterns
Java design patterns
 
OAuth2 and Spring Security
OAuth2 and Spring SecurityOAuth2 and Spring Security
OAuth2 and Spring Security
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Soap web service
Soap web serviceSoap web service
Soap web service
 
Json Web Token - JWT
Json Web Token - JWTJson Web Token - JWT
Json Web Token - JWT
 

Viewers also liked

Restful web services by Sreeni Inturi
Restful web services by Sreeni InturiRestful web services by Sreeni Inturi
Restful web services by Sreeni InturiSreeni I
 
Restful Web Services
Restful Web ServicesRestful Web Services
Restful Web ServicesAngelin R
 
Design Restful Web Service, use SpringMVC as Example
Design Restful Web Service, use SpringMVC as ExampleDesign Restful Web Service, use SpringMVC as Example
Design Restful Web Service, use SpringMVC as ExampleKevingo Tsai
 
Introduction to RESTful Web Services
Introduction to RESTful Web ServicesIntroduction to RESTful Web Services
Introduction to RESTful Web ServicesFelipe Dornelas
 
RESTful Web Services with Jersey
RESTful Web Services with JerseyRESTful Web Services with Jersey
RESTful Web Services with JerseyScott Leberknight
 
Impact of Restful Web Architecture on Performance and Scalability
Impact of Restful Web Architecture on Performance and ScalabilityImpact of Restful Web Architecture on Performance and Scalability
Impact of Restful Web Architecture on Performance and ScalabilitySanchit Gera
 
Rest presentation
Rest  presentationRest  presentation
Rest presentationsrividhyau
 
Rest & RESTful WebServices
Rest & RESTful WebServicesRest & RESTful WebServices
Rest & RESTful WebServicesPrateek Tandon
 
Understanding REST
Understanding RESTUnderstanding REST
Understanding RESTNitin Pande
 

Viewers also liked (11)

Restful web services by Sreeni Inturi
Restful web services by Sreeni InturiRestful web services by Sreeni Inturi
Restful web services by Sreeni Inturi
 
Restful Web Services
Restful Web ServicesRestful Web Services
Restful Web Services
 
RESTful Web Services
RESTful Web ServicesRESTful Web Services
RESTful Web Services
 
Design Restful Web Service, use SpringMVC as Example
Design Restful Web Service, use SpringMVC as ExampleDesign Restful Web Service, use SpringMVC as Example
Design Restful Web Service, use SpringMVC as Example
 
Introduction to RESTful Web Services
Introduction to RESTful Web ServicesIntroduction to RESTful Web Services
Introduction to RESTful Web Services
 
RESTful Web Services with Jersey
RESTful Web Services with JerseyRESTful Web Services with Jersey
RESTful Web Services with Jersey
 
Impact of Restful Web Architecture on Performance and Scalability
Impact of Restful Web Architecture on Performance and ScalabilityImpact of Restful Web Architecture on Performance and Scalability
Impact of Restful Web Architecture on Performance and Scalability
 
Rest presentation
Rest  presentationRest  presentation
Rest presentation
 
Rest & RESTful WebServices
Rest & RESTful WebServicesRest & RESTful WebServices
Rest & RESTful WebServices
 
Understanding REST
Understanding RESTUnderstanding REST
Understanding REST
 
RESTful API Design, Second Edition
RESTful API Design, Second EditionRESTful API Design, Second Edition
RESTful API Design, Second Edition
 

Similar to RESTful Web Services

The Rest Architectural Style
The Rest Architectural StyleThe Rest Architectural Style
The Rest Architectural StyleRobert Wilson
 
REST & RESTful APIs: The State of Confusion
REST & RESTful APIs: The State of ConfusionREST & RESTful APIs: The State of Confusion
REST & RESTful APIs: The State of ConfusionGlenn Antoine
 
REST Introduction.ppt
REST Introduction.pptREST Introduction.ppt
REST Introduction.pptKGSCSEPSGCT
 
Rest api best practices – comprehensive handbook
Rest api best practices – comprehensive handbookRest api best practices – comprehensive handbook
Rest api best practices – comprehensive handbookKaty Slemon
 
RESTfulll web services
RESTfulll web servicesRESTfulll web services
RESTfulll web servicesJuan Sandoval
 
Restful web-services
Restful web-servicesRestful web-services
Restful web-servicesrporwal
 
Modern REST API design principles and rules.pdf
Modern REST API design principles and rules.pdfModern REST API design principles and rules.pdf
Modern REST API design principles and rules.pdfAparna Sharma
 
REST: So What's It All About? (SAP TechEd 2011, MOB107)
REST: So What's It All About? (SAP TechEd 2011, MOB107)REST: So What's It All About? (SAP TechEd 2011, MOB107)
REST: So What's It All About? (SAP TechEd 2011, MOB107)Sascha Wenninger
 
Modern REST API design principles and rules.pdf
Modern REST API design principles and rules.pdfModern REST API design principles and rules.pdf
Modern REST API design principles and rules.pdfAparna Sharma
 
Rest API Automation with REST Assured
Rest API Automation with REST AssuredRest API Automation with REST Assured
Rest API Automation with REST AssuredTO THE NEW Pvt. Ltd.
 
REST - Representational State Transfer
REST - Representational State TransferREST - Representational State Transfer
REST - Representational State TransferPeter R. Egli
 

Similar to RESTful Web Services (20)

The Rest Architectural Style
The Rest Architectural StyleThe Rest Architectural Style
The Rest Architectural Style
 
Unit 2
Unit 2Unit 2
Unit 2
 
Rest surekha
Rest surekhaRest surekha
Rest surekha
 
ReSTful API Final
ReSTful API FinalReSTful API Final
ReSTful API Final
 
REST & RESTful APIs: The State of Confusion
REST & RESTful APIs: The State of ConfusionREST & RESTful APIs: The State of Confusion
REST & RESTful APIs: The State of Confusion
 
Rest web service
Rest web serviceRest web service
Rest web service
 
REST Introduction.ppt
REST Introduction.pptREST Introduction.ppt
REST Introduction.ppt
 
Rest api best practices – comprehensive handbook
Rest api best practices – comprehensive handbookRest api best practices – comprehensive handbook
Rest api best practices – comprehensive handbook
 
80068
8006880068
80068
 
RESTfulll web services
RESTfulll web servicesRESTfulll web services
RESTfulll web services
 
Restful web-services
Restful web-servicesRestful web-services
Restful web-services
 
Modern REST API design principles and rules.pdf
Modern REST API design principles and rules.pdfModern REST API design principles and rules.pdf
Modern REST API design principles and rules.pdf
 
Rest introduction
Rest introductionRest introduction
Rest introduction
 
Mini-Training: Let's have a rest
Mini-Training: Let's have a restMini-Training: Let's have a rest
Mini-Training: Let's have a rest
 
REST: So What's It All About? (SAP TechEd 2011, MOB107)
REST: So What's It All About? (SAP TechEd 2011, MOB107)REST: So What's It All About? (SAP TechEd 2011, MOB107)
REST: So What's It All About? (SAP TechEd 2011, MOB107)
 
Lab7 paper
Lab7 paperLab7 paper
Lab7 paper
 
Modern REST API design principles and rules.pdf
Modern REST API design principles and rules.pdfModern REST API design principles and rules.pdf
Modern REST API design principles and rules.pdf
 
SFDC REST API
SFDC REST APISFDC REST API
SFDC REST API
 
Rest API Automation with REST Assured
Rest API Automation with REST AssuredRest API Automation with REST Assured
Rest API Automation with REST Assured
 
REST - Representational State Transfer
REST - Representational State TransferREST - Representational State Transfer
REST - Representational State Transfer
 

Recently uploaded

The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 

Recently uploaded (20)

The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 

RESTful Web Services

  • 1. Smart IT Engineering Ltd. RESTful Web Services Imran M Yousuf Smart IT Engineering Ltd.
  • 2.
  • 3. Hands on tutorial on how code a RESTful WS
  • 4. Details of how HTTP works
  • 5. Details on various media formats
  • 6.
  • 7. Discussion on its constraints
  • 8.
  • 11.
  • 13.
  • 14. Proposed by Dr. Roy Thomas Fielding in his PhD dissertation titled - “Architectural Styles and the Design of Network-based Software Architectures”
  • 15.
  • 16. REST is an architectural style composed of specific constraints.
  • 17. The Constraints - - Client-Server - Stateless - Cache - Uniform Interface - Layered System - Code-On-Demand (Optional)
  • 18.
  • 19. No restrictions on the number of the clients
  • 20. No restriction on communication medium / protocol Client (Browser) Client (CLI – curl, wget) Client (Desktop) Network Client (Mobile) Client (Another System)
  • 21.
  • 22. Improve user interface portability across multiple platforms
  • 23. Improve scalability by simplifying server components
  • 25.
  • 26.
  • 27.
  • 28.
  • 29. Manipulation of resources through representations
  • 31. HATEOAS ( H ypermedia A s T he E ngine O f A pplication S tate)
  • 32.
  • 33. A resource is a conceptual mapping to a set of entities , not the entity that corresponds to the mapping at any particular point in time.
  • 34. If compared of Object Oriented aproach, Object if referrrable is a resource.
  • 35. Examples of resources would Books, A Book, An Author, Authors, Authors of a Book, A Publisher, Categories of a Book, A Category etc.
  • 36.
  • 37. Other commonly used but less precise names for a representation include: document, file, and HTTP message entity, instance, or variant.
  • 38. Message consists of control data, metadata, messages and in some cases hyperlinks to resources.
  • 39. Examples: Images (image/jpg, image/png, etc.), Markups (text/html, application/xml etc.) and more.
  • 40.
  • 41. Therefore, dependent on the current application state, every server response describes the new actions that are available.
  • 42. The server can change the range of allowable responses in a dynamic way, and a client should adapt its behavior to these changes.
  • 43. A client of a RESTful application need only know a single fixed URL to access it.
  • 44.
  • 45. The link relations should be standardized , so that the client knows what selecting that state transition means.
  • 46. Standardized media types are also expected to be understood by any client that might use the API.
  • 47. Application state transitions are driven by a combination of the known processing rules for each media type, client selection from the server-provided choices in representations received, and the user's manipulation of those representations. Thus interactions are driven by hypermedia .
  • 48. Smart IT Engineering Ltd. REST What is the biggest known RESTful System on planet Earth?
  • 49.
  • 50. Feeds
  • 51.
  • 52.
  • 54. Smart IT Engineering Ltd. REST Questions?
  • 55. Smart IT Engineering Ltd. RESTful Web Service What is RESTful Web Service or API? Any system following fulfilling the constraints, thus definition, of REST is a RESTful Web Service.
  • 56.
  • 57. RESTful Web Service design and architecture grows around resource .
  • 58. All WWW sites are inherently REST-like and can easily be RESTful hence RESTful Web Service; e.g. Google Search Engine.
  • 59. Web Service not only consists of either HTML markups, CSS and JavaScript, or other media formats, but may consist both
  • 60.
  • 61. Resource-Oriented Architecture is about REST-ful system with the technologies of the Web
  • 62.
  • 63. A URI is a name and address of a resource.
  • 64. A Resource may have many URIs but needs to have at least one .
  • 65. A Resource may have one or more representations; i.e. it may not have any representations at all.
  • 66.
  • 67. It does not hurt to have readable URIs
  • 68. If Resource has multiple variants, i.e. combination of media format (atom xml, html etc.), encoding (ASCII, UTF-8 etc.) and language (en-US, bn etc.), besides supporting content negotiation, URI for each variant is beneficial for external linking.
  • 69.
  • 70. Use Vary header in response in case a URI support multiple representations
  • 71. Use Location header in response to specify the exact URI to the variant in case of nice URIs.
  • 72.
  • 73.
  • 74.
  • 76.
  • 77. IOW an addressable application exposes URI for every bit of information it can conceivably serve
  • 78. This usually refers to infinite URIs
  • 79. Consider a search resource, e.g. Google Search, A paginated atom feed of all books of a bookstore etc.
  • 80.
  • 81. Introducing Application State and Resource State.
  • 82. Application State resides on client side ensuring every request can be treated individually by the server without considering the past requests from the client
  • 83. Resource State is data that makes up the resource. It resides server side and in case of write-able resource can be modified through its representation
  • 84.
  • 85. Book has name, ISBN only. (ignoring publisher, author(s) and categories for now).
  • 86. It has 2 representations HTML and WWW URL Encoded.
  • 87. Client can track how it reached the book in its client application state. Note different apps may reach to the same resource in different ways. E.g., one from Google Search another from a Facebook app.
  • 88. The resource state, i.e. the current name and ISBN resides on the server side and is indifferent for any client.
  • 89. Clients receive the representations of the resource and provides the server with the same to edit its information.
  • 90.
  • 91. So for every book resource there would be at least 5 related, i.e. Connected/Linked resource. They are the book's authors resource , the book's categories resource , the book's publisher resource , an author of the book (from first resource), a category of the book (from the 3 rd resource).
  • 92. Smart IT Engineering Ltd. ROA – Resources /books /books/A /books/B /books/C /books/A/authors /books/A/publishers /pubs/A /authors/A /pubs/A/books /authors/A/books /pubs /authors /
  • 93. Smart IT Engineering Ltd. ROA – Resource Templates /books /books/{id} /books/{id} /books/{id} /books/{id}/authors /books/{id}/publishers /pubs/{id} /authors/{id} /pubs/{id}/books /authors/{id}/books /pubs /authors /
  • 94.
  • 95. The specifics are in context to HTTP
  • 96. It basically follows the HTTP specification, does not change any definition but restricts on some of the operations usually performed
  • 97. IMPORTANT – It remains same across all RESTful WS Providers, reducing learning curve.
  • 98.
  • 99. PUT – To create a resource if the URI is known or replace (completely) the current state of the resource
  • 100. DELETE – Delete the current resource. Might not actually physically delete the data just change the state.
  • 101.
  • 102. Append state data to current resource, i.e. partially update the state of the resource
  • 103.
  • 104. In overloading POST with 2 ops one should consider breaking the resource to avoid overloading.
  • 105.
  • 106. Last Modified Date – Last-Modified & If-Unmodified-Since
  • 107.
  • 108. Cache-Control header for controlling cache
  • 109.
  • 110.
  • 111. 201 Created for returning that resource is created, in conjunction with Location header pointing to the created resource.
  • 112. 202 Accepted for returning that request accepted but will process at a later time without any guarantee.
  • 113. 204 No Content for specifying no message entity
  • 114.
  • 115. 303 See Other for redirecting using the Location header pointing to the actual resource.
  • 116. 304 Not Modified for conditional GET when condition is unmet, i.e. client can server from client cache.
  • 117. 301 Move Permanently If a resource URI has been changed, e.g. the template for books changed to /r/books from /books.
  • 118.
  • 119. 401 Unauthorized and 403 Forbidden for authentication and authorization failures respectively.
  • 120. 404 Not Found for not being able to resolve the URI to a resuorce.
  • 121. 406 Not Acceptable If none variants requested can be served by the server
  • 122. 412 Preconditioned Failed if the conditions in request not met. Useful lock like feature in case of updates.
  • 123. 415 Unsupported Media Type when request entity is not recognized by server for processing.
  • 124.
  • 125. Safety – refers to GET and HEAD not changing any state of the resources concerned, but might have side effects, e.g. hit counters.
  • 126. Idempotence – Repeating any one of PUT, POST, DELETE on a resource any number of will yield the same result.
  • 127.
  • 128. Not realizing HATEOAS, i.e. Linked and Connectedness
  • 129. Not realizing the strength of content negotiation, i.e. variant support
  • 130. Not realizing strength of conditional requests
  • 131. Not realizing the power of HTTP Cache
  • 132. Smart IT Engineering Ltd. RESTful Web Services & ROA Questions?
  • 133.
  • 134. Use of URI to address resources
  • 135.
  • 136. Support of different media formats
  • 138.
  • 140. Identify resource templates from objects and their cardinal relations
  • 141. Design uri templates for resource templates
  • 142. Specify Entity tag generation algorithm for resources as applicable
  • 143. Specify cache directives for resources
  • 144. Choose supporting media types for resources
  • 145.
  • 146. Contents can be separated logically in a boundary such that their definition and data can easily identified. Contents should extensively searchable, that is, by the logical partition definition type, free text etc. Contents and their fields can have multiple user configurable representations. All logical partitions should have featured contents.
  • 147.
  • 148. Variation Template - /w/{workspaceId}/vars(/{varId})?
  • 149.
  • 150.
  • 151.
  • 152.
  • 154.
  • 155.
  • 156.
  • 158. Open Search Description (my only preference)
  • 159. Smart IT Engineering Ltd. Design Questions? [email_address]