• Save
NetWeaver Gateway- Introduction to REST
 

NetWeaver Gateway- Introduction to REST

on

  • 1,620 views

 

Statistics

Views

Total Views
1,620
Views on SlideShare
1,620
Embed Views
0

Actions

Likes
0
Downloads
2
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

NetWeaver Gateway- Introduction to REST NetWeaver Gateway- Introduction to REST Presentation Transcript

  • GW100 SAP NetWeaver GatewayIntroduction to RESTMay, 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
  • Agendau  REST – The Foundational Principles of the World Wide Webu  HTTP – An Implementation of the Principles of REST ©  2012 SAP AG. All rights reserved. 3
  • Agendau  REST – The Foundational Principles of the World Wide Webu  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 fullyimplements the principles of REST.©  2012 SAP AG. All rights reserved. 5
  • REST: A Software Design Philosophy – 1/6REST defines 6 architectural constraints:Communication between participants must:1)  Implement the Client-Server modelThe client-server model allows for the client and server software components to bedeveloped independently.It further assumes that the client will take no part in long-term data storage and thatthe 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/6REST defines 6 architectural constraints:Communication between participants must:2)  Be layeredWhen the client communicates with a server, it should not ordinarily be able todistinguish whether it has communicated with the actual end-point server that willsupply the requested information, or some intermediate server used for systemscalability or security.©  2012 SAP AG. All rights reserved. 7
  • REST: A Software Design Philosophy – 3/6REST defines 6 architectural constraints:Communication between participants must:3)  Be statelessA stateless interface requires the client to supply all the necessary information forthe 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 thatthe state information must be known to, and addressable by the client.©  2012 SAP AG. All rights reserved. 8
  • REST: A Software Design Philosophy – 4/6REST 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 principlebecause it is key to the success of OData!©  2012 SAP AG. All rights reserved. 9
  • REST: A Software Design Philosophy – 5/6REST defines 6 architectural constraints:5)  Server responses must define whether or not they are Cacheable Response cachingIn order to improve performance and scalability, any information supplied by theserver must carry with it an indicator to denote whether or not it can be cached forfuture 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/6REST defines 6 architectural constraints:6)  The Server should be able to deliver Code-On-Demand to the clientAt the request of the client, the server should be able to supply additionalexecutable code to extend the client’s capabilities.This principle is used every time a browser requests a JavaScript file from awebserver.©  2012 SAP AG. All rights reserved. 11
  • Agendau  REST – The Foundational Principles of the World Wide Webu  HTTP – An Implementation of the Principles of REST ©  2012 SAP AG. All rights reserved. 12
  • HTTP(S) – An Implementation of the REST ConstraintsHTTP(S) is the Protocol that Drives the World Wide WebA 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 DELETEHTTP(S) implements server-side resource manipulation by providing a set of“Methods” that correspond to REST operations.©  2012 SAP AG. All rights reserved. 13
  • Summaryu  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 reservedNo 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, Crystalwithout the express permission of SAP AG. The information contained herein may be Decisions, Web Intelligence, Xcelsius, and other Business Objects products and serviceschanged 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 proprietarysoftware components of other software vendors. Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, and other SybaseMicrosoft, 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 respectiveIBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, companies. Data contained in this document serves informational purposes only. NationalSystem 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 beOpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP, reproduced, copied, or transmitted in any form or for any purpose without the express priorRETAIN, 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 anyIBM 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 anyAdobe, 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 notOracle is a registered trademark of Oracle Corporation. warrant the accuracy or completeness of the information, text, graphics, links, or other itemsUNIX, 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 oftrademarks 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 noJavaScript 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 intechnology invented and implemented by Netscape. these materials and does not endorse your use of third-party Web pages nor provide anySAP, 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 theirrespective logos are trademarks or registered trademarks of SAP AG in Germany and othercountries. ©  2012 SAP AG. All rights reserved. 15