SlideShare a Scribd company logo
GW100 SAP NetWeaver Gateway
Introduction to REST
May, 2012




                              INTE
                                  RNA
                                     L
Objectives



                          At the end of this chapter, you will understand:
                          Ÿ  What Representational State Transfer (REST) is
                          Ÿ  How REST has been implemented as HTTP(S)




©  2012 SAP AG. All rights reserved.                                           2
Agenda

u    REST – The Foundational Principles of the World Wide Web
u    HTTP – An Implementation of the Principles of REST




 ©  2012 SAP AG. All rights reserved.                            3
Agenda

u    REST – The Foundational Principles of the World Wide Web
u    HTTP – An Implementation of the Principles of REST




 ©  2012 SAP AG. All rights reserved.                            4
Correcting A Common Misunderstanding


                                       So, Representational State Transfer
                                        (REST) is some kind of network
                                          protocol like HTTP or SOAP?



     NO! REST is a design philosophy that defines six
                  architectural constraints.
  These constraints govern the large-scale behaviour of
  the participants within in a networked software system.


Any software system that conforms to the constraints of REST, is said to be RESTful.
The World Wide Web is the most prominent example of a software system that fully
implements the principles of REST.

©  2012 SAP AG. All rights reserved.                                             5
REST: A Software Design Philosophy – 1/6

REST defines 6 architectural constraints:
Communication between participants must:
1)  Implement the Client-Server model




The client-server model allows for the client and server software components to be
developed independently.
It further assumes that the client will take no part in long-term data storage and that
the server will take no part in the presentation of the data it supplies.
This principle is known as the “Separation of Concerns”.

©  2012 SAP AG. All rights reserved.                                                  6
REST: A Software Design Philosophy – 2/6

REST defines 6 architectural constraints:
Communication between participants must:
2)  Be layered




When the client communicates with a server, it should not ordinarily be able to
distinguish whether it has communicated with the actual end-point server that will
supply the requested information, or some intermediate server used for system
scalability or security.
©  2012 SAP AG. All rights reserved.                                                 7
REST: A Software Design Philosophy – 3/6

REST defines 6 architectural constraints:
Communication between participants must:
3)  Be stateless




A stateless interface requires the client to supply all the necessary information for
the server to process the request.
Session information must be held on the client.
There is no prohibition against the server holding client state information, only that
the state information must be known to, and addressable by the client.
©  2012 SAP AG. All rights reserved.                                                     8
REST: A Software Design Philosophy – 4/6

REST defines 6 architectural constraints:
Communication between participants must:
4)  Be Uniform (meaning that)
      a.  The server must provide the client with a representation of its resources
      b.  A means must be provided for the client to manipulate those resources (E.G. Provide
          operations such as Create, Read, Update, Delete etc)
      c.  All responses sent to the client must be self-describing
      d.  The manipulation of server-side resources may only be performed by hypermedia
          supplied by the server.*

         This constraint is generally regarded as the core concept of REST.
              A server exposes a self-describing resource that can
                be manipulated by a client via a hypermedia link.


* Known as “Hypermedia as the Engine of Application State” or HATEOAS. Remember this principle
because it is key to the success of OData!
©  2012 SAP AG. All rights reserved.                                                             9
REST: A Software Design Philosophy – 5/6

REST defines 6 architectural constraints:
5)  Server responses must define whether or not they are Cacheable




                                       Response
                                        caching




In order to improve performance and scalability, any information supplied by the
server must carry with it an indicator to denote whether or not it can be cached for
future use.
Any system within the layered architecture could act as a cache.
©  2012 SAP AG. All rights reserved.                                                   10
REST: A Software Design Philosophy – 6/6

REST defines 6 architectural constraints:
6)  The Server should be able to deliver Code-On-Demand to the client




At the request of the client, the server should be able to supply additional
executable code to extend the client’s capabilities.
This principle is used every time a browser requests a JavaScript file from a
webserver.
©  2012 SAP AG. All rights reserved.                                            11
Agenda

u    REST – The Foundational Principles of the World Wide Web
u    HTTP – An Implementation of the Principles of REST




 ©  2012 SAP AG. All rights reserved.                            12
HTTP(S) – An Implementation of the REST Constraints


HTTP(S) is the Protocol that Drives the World Wide Web
A server-side resource can be manipulated in 4 basic ways.
These four basic REST operations have given rise the the acronym CRUD.



                                REST Operation                   HTTP Method
                                Create a resource                POST
                                Retrieve one or more resources   GET
                                Update a resource                PUT
                                Delete a resource                DELETE


HTTP(S) implements server-side resource manipulation by providing a set of
“Methods” that correspond to REST operations.


©  2012 SAP AG. All rights reserved.                                           13
Summary

u    REST is a set of 6 design constraints, not a network protocol.
u    The REST design constraints are fully implemented by the HTTP
      protocol.
u    The World Wide Web is an example of a fully RESTful software system.
u    Just because an application protocol makes use of HTTP, does not
      guarantee it to be RESTful!




©  2012 SAP AG. All rights reserved.                                     14
© 2012 SAP AG. All rights reserved


No part of this publication may be reproduced or transmitted in any form or for any purpose   Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal
without the express permission of SAP AG. The information contained herein may be             Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services
changed without prior notice.                                                                 mentioned herein as well as their respective logos are trademarks or registered trademarks
                                                                                              of Business Objects Software Ltd. Business Objects is an SAP company.
Some software products marketed by SAP AG and its distributors contain proprietary
software components of other software vendors.                                                Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, and other Sybase
Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft     products and services mentioned herein as well as their respective logos are trademarks or
                                                                                              registered trademarks of Sybase, Inc. Sybase is an SAP company.
Corporation.
                                                                                              All other product and service names mentioned are the trademarks of their respective
IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x,
                                                                                              companies. Data contained in this document serves informational purposes only. National
System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries, eServer, z/
                                                                                              product specifications may vary.
VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server,
PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER,                         The information in this document is proprietary to SAP. No part of this document may be
OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP,                     reproduced, copied, or transmitted in any form or for any purpose without the express prior
RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX, Intelligent        written permission of SAP AG.
Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of   This document is a preliminary version and not subject to your license agreement or any
IBM Corporation.                                                                              other agreement with SAP. This document contains only intended strategies, developments,
Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.          and functionalities of the SAP® product and is not intended to be binding upon SAP to any
Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered    particular course of business, product strategy, and/or development. Please note that this
                                                                                              document is subject to change and may be changed by SAP at any time without notice.
trademarks of Adobe Systems Incorporated in the United States and/or other countries.
                                                                                              SAP assumes no responsibility for errors or omissions in this document. SAP does not
Oracle is a registered trademark of Oracle Corporation.
                                                                                              warrant the accuracy or completeness of the information, text, graphics, links, or other items
UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.                   contained within this material. This document is provided without a warranty of any kind,
Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are          either express or implied, including but not limited to the implied warranties of
trademarks or registered trademarks of Citrix Systems, Inc.                                   merchantability, fitness for a particular purpose, or non-infringement.
HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World               SAP shall have no liability for damages of any kind including without limitation direct, special,
Wide Web Consortium, Massachusetts Institute of Technology.                                   indirect, or consequential damages that may result from the use of these materials. This
                                                                                              limitation shall not apply in cases of intent or gross negligence.
Java is a registered trademark of Sun Microsystems, Inc.
                                                                                              The statutory liability for personal injury and defective products is not affected. SAP has no
JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for        control over the information that you may access through the use of hot links contained in
technology invented and implemented by Netscape.                                              these materials and does not endorse your use of third-party Web pages nor provide any
SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer,           warranty whatsoever relating to third-party Web pages.
StreamWork, and other SAP products and services mentioned herein as well as their
respective logos are trademarks or registered trademarks of SAP AG in Germany and other
countries.




 ©  2012 SAP AG. All rights reserved.                                                                                                                                                     15

More Related Content

What's hot (20)

PDF
NetWeaver Gateway- Service Builder
SAP PartnerEdge program for Application Development
 
PDF
SAP NetWeaver Gateway - Introduction
SAP PartnerEdge program for Application Development
 
PDF
Sap netweaver gateway_2.0_sap_net_weaver
Nagendra Babu
 
PPTX
OData and the future of business objects universes
Sumit Sarkar
 
PDF
SAP Integration with Red Hat JBoss Technologies
hwilming
 
PDF
PaaSing a Java EE 6 Application at Geecon 2012
Arun Gupta
 
PPTX
The Java EE 7 Platform: Developing for the Cloud
codemotion_es
 
PPTX
JAX-RS 2.0: RESTful Web services on steroids
codemotion_es
 
PPTX
OData Fundamental
Kamrul Hasan
 
PDF
Java EE 7 and HTML5: Developing for the Cloud
Arun Gupta
 
PDF
JAX-RS 2.0: RESTful Web services on steroids at Geecon 2012
Arun Gupta
 
PDF
Java EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
Arun Gupta
 
PDF
Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012
Arun Gupta
 
PDF
SAP HANA SPS09 - XS Programming Model
SAP Technology
 
PDF
GlassFish REST Administration Backend at JavaOne India 2012
Arun Gupta
 
PPTX
OData - The Universal REST API
Nishanth Kadiyala
 
PDF
Websocket 1.0
Arun Gupta
 
PDF
Oracle APEX勉強会 - 認証と認可の実装を学ぶ
Nakakoshi Yuji
 
PDF
JAX-RS 2.0: What’s New in JSR 339 ?
Arun Gupta
 
PPTX
Sap java connector / Hybris RFC
Monsif Elaissoussi
 
NetWeaver Gateway- Service Builder
SAP PartnerEdge program for Application Development
 
SAP NetWeaver Gateway - Introduction
SAP PartnerEdge program for Application Development
 
Sap netweaver gateway_2.0_sap_net_weaver
Nagendra Babu
 
OData and the future of business objects universes
Sumit Sarkar
 
SAP Integration with Red Hat JBoss Technologies
hwilming
 
PaaSing a Java EE 6 Application at Geecon 2012
Arun Gupta
 
The Java EE 7 Platform: Developing for the Cloud
codemotion_es
 
JAX-RS 2.0: RESTful Web services on steroids
codemotion_es
 
OData Fundamental
Kamrul Hasan
 
Java EE 7 and HTML5: Developing for the Cloud
Arun Gupta
 
JAX-RS 2.0: RESTful Web services on steroids at Geecon 2012
Arun Gupta
 
Java EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
Arun Gupta
 
Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012
Arun Gupta
 
SAP HANA SPS09 - XS Programming Model
SAP Technology
 
GlassFish REST Administration Backend at JavaOne India 2012
Arun Gupta
 
OData - The Universal REST API
Nishanth Kadiyala
 
Websocket 1.0
Arun Gupta
 
Oracle APEX勉強会 - 認証と認可の実装を学ぶ
Nakakoshi Yuji
 
JAX-RS 2.0: What’s New in JSR 339 ?
Arun Gupta
 
Sap java connector / Hybris RFC
Monsif Elaissoussi
 

Similar to NetWeaver Gateway- Introduction to REST (20)

PDF
Res tful web services oracle
knoxxs
 
PDF
REST - What's It All About? (SAP TechEd 2012, CD110)
Sascha Wenninger
 
PPTX
REST: So What's It All About? (SAP TechEd 2011, MOB107)
Sascha Wenninger
 
PPT
REST Introduction.ppt
KGSCSEPSGCT
 
PDF
Understanding REST-Based Services: Simple, Scalable, and Platform Independent
Charles Knight
 
PDF
Role of Rest vs. Web Services and EI
WSO2
 
PPT
Rest and beyond
Ming Yuan
 
PDF
REST - Representational state transfer
Tricode (part of Dept)
 
PDF
What are restful web services?
Aparna Sharma
 
PDF
Rest api webinar(3)
WSO2
 
PDF
REST & API Management with the WSO2 ESB
WSO2
 
PDF
ReST (Representational State Transfer) Explained
Dhananjay Nene
 
PDF
Enterprise REST
Ganesh Prasad
 
PDF
Apply API Governance to RESTful Service APIs using WSO2 Governance Registry a...
WSO2
 
PPTX
Enterprise Application Architectures by Dr. Indika Kumara
Thejan Wijesinghe
 
PDF
Keynote-Service Orientation – Why is it good for your business
WSO2
 
PDF
Understanding the WSO2 Platform and Technology
WSO2
 
PDF
If Web Services are the Answer, What's The Question
Duncan Hull
 
PDF
RESTful SOA and the Spring Framework (EMCWorld 2011)
EMC
 
PPT
EEDC SOAP vs REST
Roger Rafanell Mas
 
Res tful web services oracle
knoxxs
 
REST - What's It All About? (SAP TechEd 2012, CD110)
Sascha Wenninger
 
REST: So What's It All About? (SAP TechEd 2011, MOB107)
Sascha Wenninger
 
REST Introduction.ppt
KGSCSEPSGCT
 
Understanding REST-Based Services: Simple, Scalable, and Platform Independent
Charles Knight
 
Role of Rest vs. Web Services and EI
WSO2
 
Rest and beyond
Ming Yuan
 
REST - Representational state transfer
Tricode (part of Dept)
 
What are restful web services?
Aparna Sharma
 
Rest api webinar(3)
WSO2
 
REST & API Management with the WSO2 ESB
WSO2
 
ReST (Representational State Transfer) Explained
Dhananjay Nene
 
Enterprise REST
Ganesh Prasad
 
Apply API Governance to RESTful Service APIs using WSO2 Governance Registry a...
WSO2
 
Enterprise Application Architectures by Dr. Indika Kumara
Thejan Wijesinghe
 
Keynote-Service Orientation – Why is it good for your business
WSO2
 
Understanding the WSO2 Platform and Technology
WSO2
 
If Web Services are the Answer, What's The Question
Duncan Hull
 
RESTful SOA and the Spring Framework (EMCWorld 2011)
EMC
 
EEDC SOAP vs REST
Roger Rafanell Mas
 
Ad

More from SAP PartnerEdge program for Application Development (20)

PDF
SAP HANA Cloud Platform Expert Session - SAP HANA Cloud Platform Analytics
SAP PartnerEdge program for Application Development
 
PDF
SUSE Technical Webinar – Get started with creating Lumira CVOM extensions -- ...
SAP PartnerEdge program for Application Development
 
PDF
SUSE Technical Webinar – Get started with creating Design Studio extensions -...
SAP PartnerEdge program for Application Development
 
PDF
SUSE Technical Webinar: Build HANA Apps in the Framework of the SAP and SUSE ...
SAP PartnerEdge program for Application Development
 
PDF
SUSE Technical Webinar: Developing Fiori & GWPAM Apps on HANA (SAP and SUSE C...
SAP PartnerEdge program for Application Development
 
PDF
SUSE Technical Webinar: Developing Fiori & GWPAM Apps on HANA (SAP and SUSE C...
SAP PartnerEdge program for Application Development
 
PDF
SUSE Technical Webinar: Build B1 apps in the Framework of the SAP and SUSE Ca...
SAP PartnerEdge program for Application Development
 
PDF
Google Technical Webinar - Building Mashups with Google Apps and SAP, using S...
SAP PartnerEdge program for Application Development
 
PDF
Google Technical Webinar - Building Mashups with Google Apps and SAP, using S...
SAP PartnerEdge program for Application Development
 
PDF
SUSE Technical Webinar: Introduction to Business Intelligence - the SAP and S...
SAP PartnerEdge program for Application Development
 
PDF
SUSE Technical Webinar: Build Cloud Apps with SAP HANA Cloud Platform
SAP PartnerEdge program for Application Development
 
PDF
Partner with SAP to Develop Mobile apps and capture the Mobile Market Opportu...
SAP PartnerEdge program for Application Development
 
PDF
Microsoft Technical Webinar: SAP Mobile Platform for Windows 8 and Windows Ph...
SAP PartnerEdge program for Application Development
 
PDF
Microsoft Technical Webinar - New devices for Windows 8 and Windows Phone 8, ...
SAP PartnerEdge program for Application Development
 
PDF
Autodesk Technical Webinar: SAP Business One
SAP PartnerEdge program for Application Development
 
PDF
Microsoft Technical Webinar: Doing more with MS Office, SharePoint and Visual...
SAP PartnerEdge program for Application Development
 
PDF
Microsoft Technical Webinar: UX/UI Design for Windows 8 & Windows Phone 8 - S...
SAP PartnerEdge program for Application Development
 
PDF
Microsoft Technical Webinar: UX/UI Design for Windows 8 & Windows Phone 8 - P...
SAP PartnerEdge program for Application Development
 
PDF
Autodesk Technical Webinar: SAP HANA in-memory database
SAP PartnerEdge program for Application Development
 
SAP HANA Cloud Platform Expert Session - SAP HANA Cloud Platform Analytics
SAP PartnerEdge program for Application Development
 
SUSE Technical Webinar – Get started with creating Lumira CVOM extensions -- ...
SAP PartnerEdge program for Application Development
 
SUSE Technical Webinar – Get started with creating Design Studio extensions -...
SAP PartnerEdge program for Application Development
 
SUSE Technical Webinar: Build HANA Apps in the Framework of the SAP and SUSE ...
SAP PartnerEdge program for Application Development
 
SUSE Technical Webinar: Developing Fiori & GWPAM Apps on HANA (SAP and SUSE C...
SAP PartnerEdge program for Application Development
 
SUSE Technical Webinar: Developing Fiori & GWPAM Apps on HANA (SAP and SUSE C...
SAP PartnerEdge program for Application Development
 
SUSE Technical Webinar: Build B1 apps in the Framework of the SAP and SUSE Ca...
SAP PartnerEdge program for Application Development
 
Google Technical Webinar - Building Mashups with Google Apps and SAP, using S...
SAP PartnerEdge program for Application Development
 
Google Technical Webinar - Building Mashups with Google Apps and SAP, using S...
SAP PartnerEdge program for Application Development
 
SUSE Technical Webinar: Introduction to Business Intelligence - the SAP and S...
SAP PartnerEdge program for Application Development
 
SUSE Technical Webinar: Build Cloud Apps with SAP HANA Cloud Platform
SAP PartnerEdge program for Application Development
 
Partner with SAP to Develop Mobile apps and capture the Mobile Market Opportu...
SAP PartnerEdge program for Application Development
 
Microsoft Technical Webinar: SAP Mobile Platform for Windows 8 and Windows Ph...
SAP PartnerEdge program for Application Development
 
Microsoft Technical Webinar - New devices for Windows 8 and Windows Phone 8, ...
SAP PartnerEdge program for Application Development
 
Autodesk Technical Webinar: SAP Business One
SAP PartnerEdge program for Application Development
 
Microsoft Technical Webinar: Doing more with MS Office, SharePoint and Visual...
SAP PartnerEdge program for Application Development
 
Microsoft Technical Webinar: UX/UI Design for Windows 8 & Windows Phone 8 - S...
SAP PartnerEdge program for Application Development
 
Microsoft Technical Webinar: UX/UI Design for Windows 8 & Windows Phone 8 - P...
SAP PartnerEdge program for Application Development
 
Autodesk Technical Webinar: SAP HANA in-memory database
SAP PartnerEdge program for Application Development
 
Ad

Recently uploaded (20)

PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PPTX
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 

NetWeaver Gateway- Introduction to REST

  • 1. GW100 SAP NetWeaver Gateway Introduction to REST May, 2012 INTE RNA L
  • 2. Objectives At the end of this chapter, you will understand: Ÿ  What Representational State Transfer (REST) is Ÿ  How REST has been implemented as HTTP(S) ©  2012 SAP AG. All rights reserved. 2
  • 3. Agenda u  REST – The Foundational Principles of the World Wide Web u  HTTP – An Implementation of the Principles of REST ©  2012 SAP AG. All rights reserved. 3
  • 4. Agenda u  REST – The Foundational Principles of the World Wide Web u  HTTP – An Implementation of the Principles of REST ©  2012 SAP AG. All rights reserved. 4
  • 5. Correcting A Common Misunderstanding So, Representational State Transfer (REST) is some kind of network protocol like HTTP or SOAP? NO! REST is a design philosophy that defines six architectural constraints. These constraints govern the large-scale behaviour of the participants within in a networked software system. Any software system that conforms to the constraints of REST, is said to be RESTful. The World Wide Web is the most prominent example of a software system that fully implements the principles of REST. ©  2012 SAP AG. All rights reserved. 5
  • 6. REST: A Software Design Philosophy – 1/6 REST defines 6 architectural constraints: Communication between participants must: 1)  Implement the Client-Server model The client-server model allows for the client and server software components to be developed independently. It further assumes that the client will take no part in long-term data storage and that the server will take no part in the presentation of the data it supplies. This principle is known as the “Separation of Concerns”. ©  2012 SAP AG. All rights reserved. 6
  • 7. REST: A Software Design Philosophy – 2/6 REST defines 6 architectural constraints: Communication between participants must: 2)  Be layered When the client communicates with a server, it should not ordinarily be able to distinguish whether it has communicated with the actual end-point server that will supply the requested information, or some intermediate server used for system scalability or security. ©  2012 SAP AG. All rights reserved. 7
  • 8. REST: A Software Design Philosophy – 3/6 REST defines 6 architectural constraints: Communication between participants must: 3)  Be stateless A stateless interface requires the client to supply all the necessary information for the server to process the request. Session information must be held on the client. There is no prohibition against the server holding client state information, only that the state information must be known to, and addressable by the client. ©  2012 SAP AG. All rights reserved. 8
  • 9. REST: A Software Design Philosophy – 4/6 REST defines 6 architectural constraints: Communication between participants must: 4)  Be Uniform (meaning that) a.  The server must provide the client with a representation of its resources b.  A means must be provided for the client to manipulate those resources (E.G. Provide operations such as Create, Read, Update, Delete etc) c.  All responses sent to the client must be self-describing d.  The manipulation of server-side resources may only be performed by hypermedia supplied by the server.* This constraint is generally regarded as the core concept of REST. A server exposes a self-describing resource that can be manipulated by a client via a hypermedia link. * Known as “Hypermedia as the Engine of Application State” or HATEOAS. Remember this principle because it is key to the success of OData! ©  2012 SAP AG. All rights reserved. 9
  • 10. REST: A Software Design Philosophy – 5/6 REST defines 6 architectural constraints: 5)  Server responses must define whether or not they are Cacheable Response caching In order to improve performance and scalability, any information supplied by the server must carry with it an indicator to denote whether or not it can be cached for future use. Any system within the layered architecture could act as a cache. ©  2012 SAP AG. All rights reserved. 10
  • 11. REST: A Software Design Philosophy – 6/6 REST defines 6 architectural constraints: 6)  The Server should be able to deliver Code-On-Demand to the client At the request of the client, the server should be able to supply additional executable code to extend the client’s capabilities. This principle is used every time a browser requests a JavaScript file from a webserver. ©  2012 SAP AG. All rights reserved. 11
  • 12. Agenda u  REST – The Foundational Principles of the World Wide Web u  HTTP – An Implementation of the Principles of REST ©  2012 SAP AG. All rights reserved. 12
  • 13. HTTP(S) – An Implementation of the REST Constraints HTTP(S) is the Protocol that Drives the World Wide Web A server-side resource can be manipulated in 4 basic ways. These four basic REST operations have given rise the the acronym CRUD. REST Operation HTTP Method Create a resource POST Retrieve one or more resources GET Update a resource PUT Delete a resource DELETE HTTP(S) implements server-side resource manipulation by providing a set of “Methods” that correspond to REST operations. ©  2012 SAP AG. All rights reserved. 13
  • 14. Summary u  REST is a set of 6 design constraints, not a network protocol. u  The REST design constraints are fully implemented by the HTTP protocol. u  The World Wide Web is an example of a fully RESTful software system. u  Just because an application protocol makes use of HTTP, does not guarantee it to be RESTful! ©  2012 SAP AG. All rights reserved. 14
  • 15. © 2012 SAP AG. All rights reserved No part of this publication may be reproduced or transmitted in any form or for any purpose Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal without the express permission of SAP AG. The information contained herein may be Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services changed without prior notice. mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects Software Ltd. Business Objects is an SAP company. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, and other Sybase Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Sybase, Inc. Sybase is an SAP company. Corporation. All other product and service names mentioned are the trademarks of their respective IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, companies. Data contained in this document serves informational purposes only. National System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries, eServer, z/ product specifications may vary. VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server, PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, The information in this document is proprietary to SAP. No part of this document may be OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP, reproduced, copied, or transmitted in any form or for any purpose without the express prior RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX, Intelligent written permission of SAP AG. Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of This document is a preliminary version and not subject to your license agreement or any IBM Corporation. other agreement with SAP. This document contains only intended strategies, developments, Linux is the registered trademark of Linus Torvalds in the U.S. and other countries. and functionalities of the SAP® product and is not intended to be binding upon SAP to any Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered particular course of business, product strategy, and/or development. Please note that this document is subject to change and may be changed by SAP at any time without notice. trademarks of Adobe Systems Incorporated in the United States and/or other countries. SAP assumes no responsibility for errors or omissions in this document. SAP does not Oracle is a registered trademark of Oracle Corporation. warrant the accuracy or completeness of the information, text, graphics, links, or other items UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. contained within this material. This document is provided without a warranty of any kind, Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are either express or implied, including but not limited to the implied warranties of trademarks or registered trademarks of Citrix Systems, Inc. merchantability, fitness for a particular purpose, or non-infringement. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World SAP shall have no liability for damages of any kind including without limitation direct, special, Wide Web Consortium, Massachusetts Institute of Technology. indirect, or consequential damages that may result from the use of these materials. This limitation shall not apply in cases of intent or gross negligence. Java is a registered trademark of Sun Microsystems, Inc. The statutory liability for personal injury and defective products is not affected. SAP has no JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for control over the information that you may access through the use of hot links contained in technology invented and implemented by Netscape. these materials and does not endorse your use of third-party Web pages nor provide any SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer, warranty whatsoever relating to third-party Web pages. StreamWork, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries. ©  2012 SAP AG. All rights reserved. 15