SlideShare ist ein Scribd-Unternehmen logo
1 von 57
REST – So What’s It All About? MOB107 @ SAP TechEd 2011 Las Vegas
Agenda Concepts Applications in SAP-land Demo
Agenda Concepts Applications in SAP-land Demo
REST
REpresentationalStateTransfer
What Does That Mean?
The Client communicates with the Server by modifying the state of Resourcesthrough Representations
Representations? The server can store its data in whatever way it likes The client is unaware of this, and can store the same things differently Each party serialises its internal state into Representations This provides loose coupling!
Everything has a URL
URLs Identify Resources REST interfaces manipulate the state of resources “Process as a state machine/data flow diagram” Resource-oriented decomposition of business processes SOA-style interfaces perform a specific task “Process as a flowchart/workflow” Functional decomposition of business processes
HTTP is an Application Protocol. REST recognises this.
Remember the OSI Stack?
This has a number of benefits…
Reliable Communication (as long as the client knows how to handle errors and retries) Free* Caching! *provided by commodity infrastructure!
Easy Metadata exchange via HTTP Headers! Accept Content-Type If-Modified-Since Last-Modified
…and last but not least… A Universally-Understood Protocol!
But How is that Better than SOAP?
HTTP has Standard Verbs GET PUT POST DELETE HEAD OPTIONS PATCH TRACE
HTTP has Standard Verbs Standard Meaning  Constraints = scope for optimization Widely Implemented Everybody knows how to behave
SOAP Doesn’t. getAccountCustomerByInternalId searchCustomerByBasicData updateSalesProspectStatusByPartnerSalesRepresentativeBasicData_sync And everything works via HTTP POST (i.e. it uses HTTP as the dumb transport)
HTTP has Standard Responses 200 OK 302 Moved Permanently 404 Not Found 406 Method Not Allowed 409 Conflict 418 I’m a Teapot …
SOAP Doesn’t.
One last principle before we move on: HATEOAS
One last principle before we move on: Hypertext As The Engine Of Application State
An Example Client requests Shopping Cart Server sends HTML page with items and links Client’s move Client clicks the “Check Out” link Server sends HTML page with Total Amount Client’s move Client clicks the “Pay” link Server sends HTML page with “Thank You” message
Notice Something? The Client is responsible for moving forward in a process The server guides the client forward 	(with ‘Check Out’, ‘Pay’ links) The client is responsible for completing the process 	If the client stops, the server doesn’t care!
Notice Something? The server doesn’t maintain session/application state. 	It does maintain resource state! Every request modifies the state of a resource In the example, the client causes the state of the “Shopping Cart” resource to be modified.
Concepts Applications in SAP-land Demo
NetWeaver Gateway
The Good Things Exposes BAPIs, RFCs & custom ABAP classes via OData XML Well integrated into SAP’s roadmap Tight integration with v2.1 of SUP – Sybase Unwired Platform Duet Enterprise Standard content and pre-built integration will be delivered by SAP Framework provides flexible security and auditing/logging Push notifications to consumers after subscription Expose data & functionality from older (pre-7.02) systems
2 Approaches to Development Generation Tools Complete Control Allows custom code adhering to a structured framework with a library ofhelper classes Quickly expose BAPIs, RFCs and GUI screens Up & running in minutes! OData Channel
The Limitations Only supports OData (Open, but Microsoft-centric XML) no custom representations (other XML, JSON, PDF, etc.)* Limited support for complex input parameters* The Generation tools don’t: Allow modification of HTTP headers for caching, CORS, etc. Created linked resources (e.g. navigate Customer  Order  Item) Use of the OData Channel when developing Gateway Services makes this possible! *In development CORS is a method for working around browser-based cross-domain scripting security measures which can hamper JSON or AJAX-based browser applications.
Mapping to a BAPI BAPI Field Defaults OData XML Field
More Info on Gateway at TechEd
Custom Development
DJ Adams Started It All!
A Simple RESTful API for SAP CRM BusinessPartners everywhere BPs have roles (e.g. Customer, Contact Person, Employee…) BPs have relationships with other BPs Relationships have attributes Relationships lead to Opportunities Target consumer: Mobile app built with HTML5 + jQuery Mobile
3 Resources http://sapcrm:8000/auspost/businesspartner http://sapcrm:8000/auspost/bprelationship http://sapcrm:8000/auspost/opportunity plus any sub-resources we need
Design Principles JSON as the default format Roles & Relationships via hyperlinks Client must only know the ‘entry point’ URL to its own BP All other client interaction driven by hyperlinks There is a great ABAP  JSON library on CodeExchange!
Sidebar: Hyperlinks in JSON
Sidebar: Hyperlinks in JSON No one standard to show hyperlinks  We chose the simplest option we found: “links”: {   “self”: “http://…”,   “up”: “http://…”,   “http://auspost.com.au/api/doc/rels/tracking”: “http://…”,   … } magic keyword relationship* custom relationship link URL *as per IANA standard
ICF Configuration in SAP CRM Create a public class
ICF Configuration in SAP CRM Assign interface IF_HTTP_EXTENSION
Insert Code Here…
Demo
Summary REST is an architectural style Apply web principles to A2A integration Promotes true loose coupling via hyperlinks Based on Resources rather than functionality or tasks  NetWeaver Gateway can expose SAP data & functionality in a RESTful way.  More specific requirements can be met with Z code Most mobile frameworks rely on RESTful integration But the REST style is equally valid for A2A and non-mobile scenarios!
About Us SaschaWenninger sascha.wenninger@auspost.com.au @sufw John Moy john.moy@auspost.com.au @jhmoy
Feedback Please complete a session evaluation for this session Session Code: MOB107
Resources & Further Reading A free eBook on REST, by InfoQ: http://www.infoq.com/minibooks/emag-03-2010-rest Other interesting blogs and articles on InfoQ: http://www.infoq.com/articles/RESTSOAFuture The Richardson Maturity Model, explained by Martin Fowler: http://martinfowler.com/articles/richardsonMaturityModel.html 	...and by Leonard Richardson himself: http://www.crummy.com/writing/speaking/2008-QCon/act3.html DJ Adams’ original blog on REST on SDN: http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/584 Further blogs by DJ on implementing RESTful services via the ICF:  http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/15899 http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/17375 http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/16014 A Simple Intro to JSON: http://json.org CORS – Cross-Origin Resource Sharing, by the Mozilla Developer Network: http://hacks.mozilla.org/2009/07/cross-site-xmlhttprequest-with-cors/
Resources & Further Reading The NetWeaver Gateway page on SDN: http://www.sdn.sap.com/irj/sdn/gateway How to Create Gateway Services Using the OData Channel API: http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/90f79f1c-d274-2e10-be9e-9dbffea99a5d Remote-Enabled Function Module to Gateway Service in 7 Minutes: http://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/a016451c-f47e-2e10-febe-ec719fe62e4f Known Limitations of SAP NetWeaver Gateway: SAP Note 1574568
Attributions Images by Geek & Poke (Oliver Widder): http://geekandpoke.typepad.com/.a/6a00d8341d3df553ef0133f3e30a99970b-pi http://geekandpoke.typepad.com/.a/6a00d8341d3df553ef0105362b2664970c-pi http://geekandpoke.typepad.com/.a/6a00d8341d3df553ef015390312d9f970b-pi ‘Standards’ by xkcd (Randall Munroe): http://xkcd.com/927/ ‘Permanent State’ by Gaping Void (Hugh MacLeod): http://gapingvoid.com/2011/07/28/permanent-state/ Many thanks to all for providing their work under a Creative Commons license! 

Weitere ähnliche Inhalte

Was ist angesagt?

AWS 201 Webinar Series - Rightsizing and Cost Optimizing your Deployment
AWS 201 Webinar Series - Rightsizing and Cost Optimizing your DeploymentAWS 201 Webinar Series - Rightsizing and Cost Optimizing your Deployment
AWS 201 Webinar Series - Rightsizing and Cost Optimizing your DeploymentAmazon Web Services
 
ADF Development Survival Kit
ADF Development Survival KitADF Development Survival Kit
ADF Development Survival Kitandrejusb
 
Data Caching Strategies for Oracle Mobile Application Framework
Data Caching Strategies for Oracle Mobile Application FrameworkData Caching Strategies for Oracle Mobile Application Framework
Data Caching Strategies for Oracle Mobile Application Frameworkandrejusb
 
API Management, Meet Event Management
API Management, Meet Event ManagementAPI Management, Meet Event Management
API Management, Meet Event ManagementSolace
 
ADF Anti-Patterns: Dangerous Tutorials
ADF Anti-Patterns: Dangerous TutorialsADF Anti-Patterns: Dangerous Tutorials
ADF Anti-Patterns: Dangerous Tutorialsandrejusb
 
Events and microservices
Events and microservicesEvents and microservices
Events and microservicesSaul Caganoff
 
Overview of azure microservices and the impact on integration
Overview of azure microservices and the impact on integrationOverview of azure microservices and the impact on integration
Overview of azure microservices and the impact on integrationBizTalk360
 
The simplest cloud migration in the world by Webscale
The simplest cloud migration in the world by WebscaleThe simplest cloud migration in the world by Webscale
The simplest cloud migration in the world by WebscaleWebscale Networks
 
AWS Summit Sydney 2014 | Opening Keynote - Dr Werner Vogels, VP & CTO, Amazon...
AWS Summit Sydney 2014 | Opening Keynote - Dr Werner Vogels, VP & CTO, Amazon...AWS Summit Sydney 2014 | Opening Keynote - Dr Werner Vogels, VP & CTO, Amazon...
AWS Summit Sydney 2014 | Opening Keynote - Dr Werner Vogels, VP & CTO, Amazon...Amazon Web Services
 
State of the Union: Database & Analytics
State of the Union: Database & AnalyticsState of the Union: Database & Analytics
State of the Union: Database & AnalyticsAmazon Web Services
 
A Multi-Company Perspective: Enterprise Cloud and PaaS
A Multi-Company Perspective: Enterprise Cloud and PaaSA Multi-Company Perspective: Enterprise Cloud and PaaS
A Multi-Company Perspective: Enterprise Cloud and PaaSThoughtworks
 
SAP on AWS: SAPPHIRE NOW 2018 Recap
SAP on AWS: SAPPHIRE NOW 2018 RecapSAP on AWS: SAPPHIRE NOW 2018 Recap
SAP on AWS: SAPPHIRE NOW 2018 RecapAmazon Web Services
 
Enterprise Integration Patterns Revisited (EIP, Apache Camel, Talend ESB)
Enterprise Integration Patterns Revisited (EIP, Apache Camel, Talend ESB)Enterprise Integration Patterns Revisited (EIP, Apache Camel, Talend ESB)
Enterprise Integration Patterns Revisited (EIP, Apache Camel, Talend ESB)Kai Wähner
 
OpenSource Node.js API Framework and Server for Enterprise
OpenSource Node.js API Framework and Server for EnterpriseOpenSource Node.js API Framework and Server for Enterprise
OpenSource Node.js API Framework and Server for EnterpriseShubhra Kar
 
Track 5 Session 6_ BLC01 透過 Amazon Managed Blockchain 與 Amazon QLDB 打造區塊鍊應用.pptx
Track 5 Session 6_ BLC01 透過 Amazon Managed Blockchain 與 Amazon QLDB 打造區塊鍊應用.pptxTrack 5 Session 6_ BLC01 透過 Amazon Managed Blockchain 與 Amazon QLDB 打造區塊鍊應用.pptx
Track 5 Session 6_ BLC01 透過 Amazon Managed Blockchain 與 Amazon QLDB 打造區塊鍊應用.pptxAmazon Web Services
 
Pragmatic Enterprise Application Migration to AWS
Pragmatic Enterprise Application Migration to AWSPragmatic Enterprise Application Migration to AWS
Pragmatic Enterprise Application Migration to AWSKacy Clarke
 
Microservices on AWS: Architectural Patterns and Best Practices | AWS Summit ...
Microservices on AWS: Architectural Patterns and Best Practices | AWS Summit ...Microservices on AWS: Architectural Patterns and Best Practices | AWS Summit ...
Microservices on AWS: Architectural Patterns and Best Practices | AWS Summit ...AWS Summits
 
Node.js Frameworks & Design Patterns Webinar
Node.js Frameworks & Design Patterns WebinarNode.js Frameworks & Design Patterns Webinar
Node.js Frameworks & Design Patterns WebinarShubhra Kar
 

Was ist angesagt? (20)

Restful Services
Restful ServicesRestful Services
Restful Services
 
AWS 201 Webinar Series - Rightsizing and Cost Optimizing your Deployment
AWS 201 Webinar Series - Rightsizing and Cost Optimizing your DeploymentAWS 201 Webinar Series - Rightsizing and Cost Optimizing your Deployment
AWS 201 Webinar Series - Rightsizing and Cost Optimizing your Deployment
 
ADF Development Survival Kit
ADF Development Survival KitADF Development Survival Kit
ADF Development Survival Kit
 
Data Caching Strategies for Oracle Mobile Application Framework
Data Caching Strategies for Oracle Mobile Application FrameworkData Caching Strategies for Oracle Mobile Application Framework
Data Caching Strategies for Oracle Mobile Application Framework
 
AWS Summit Keynote
AWS Summit KeynoteAWS Summit Keynote
AWS Summit Keynote
 
API Management, Meet Event Management
API Management, Meet Event ManagementAPI Management, Meet Event Management
API Management, Meet Event Management
 
ADF Anti-Patterns: Dangerous Tutorials
ADF Anti-Patterns: Dangerous TutorialsADF Anti-Patterns: Dangerous Tutorials
ADF Anti-Patterns: Dangerous Tutorials
 
Events and microservices
Events and microservicesEvents and microservices
Events and microservices
 
Overview of azure microservices and the impact on integration
Overview of azure microservices and the impact on integrationOverview of azure microservices and the impact on integration
Overview of azure microservices and the impact on integration
 
The simplest cloud migration in the world by Webscale
The simplest cloud migration in the world by WebscaleThe simplest cloud migration in the world by Webscale
The simplest cloud migration in the world by Webscale
 
AWS Summit Sydney 2014 | Opening Keynote - Dr Werner Vogels, VP & CTO, Amazon...
AWS Summit Sydney 2014 | Opening Keynote - Dr Werner Vogels, VP & CTO, Amazon...AWS Summit Sydney 2014 | Opening Keynote - Dr Werner Vogels, VP & CTO, Amazon...
AWS Summit Sydney 2014 | Opening Keynote - Dr Werner Vogels, VP & CTO, Amazon...
 
State of the Union: Database & Analytics
State of the Union: Database & AnalyticsState of the Union: Database & Analytics
State of the Union: Database & Analytics
 
A Multi-Company Perspective: Enterprise Cloud and PaaS
A Multi-Company Perspective: Enterprise Cloud and PaaSA Multi-Company Perspective: Enterprise Cloud and PaaS
A Multi-Company Perspective: Enterprise Cloud and PaaS
 
SAP on AWS: SAPPHIRE NOW 2018 Recap
SAP on AWS: SAPPHIRE NOW 2018 RecapSAP on AWS: SAPPHIRE NOW 2018 Recap
SAP on AWS: SAPPHIRE NOW 2018 Recap
 
Enterprise Integration Patterns Revisited (EIP, Apache Camel, Talend ESB)
Enterprise Integration Patterns Revisited (EIP, Apache Camel, Talend ESB)Enterprise Integration Patterns Revisited (EIP, Apache Camel, Talend ESB)
Enterprise Integration Patterns Revisited (EIP, Apache Camel, Talend ESB)
 
OpenSource Node.js API Framework and Server for Enterprise
OpenSource Node.js API Framework and Server for EnterpriseOpenSource Node.js API Framework and Server for Enterprise
OpenSource Node.js API Framework and Server for Enterprise
 
Track 5 Session 6_ BLC01 透過 Amazon Managed Blockchain 與 Amazon QLDB 打造區塊鍊應用.pptx
Track 5 Session 6_ BLC01 透過 Amazon Managed Blockchain 與 Amazon QLDB 打造區塊鍊應用.pptxTrack 5 Session 6_ BLC01 透過 Amazon Managed Blockchain 與 Amazon QLDB 打造區塊鍊應用.pptx
Track 5 Session 6_ BLC01 透過 Amazon Managed Blockchain 與 Amazon QLDB 打造區塊鍊應用.pptx
 
Pragmatic Enterprise Application Migration to AWS
Pragmatic Enterprise Application Migration to AWSPragmatic Enterprise Application Migration to AWS
Pragmatic Enterprise Application Migration to AWS
 
Microservices on AWS: Architectural Patterns and Best Practices | AWS Summit ...
Microservices on AWS: Architectural Patterns and Best Practices | AWS Summit ...Microservices on AWS: Architectural Patterns and Best Practices | AWS Summit ...
Microservices on AWS: Architectural Patterns and Best Practices | AWS Summit ...
 
Node.js Frameworks & Design Patterns Webinar
Node.js Frameworks & Design Patterns WebinarNode.js Frameworks & Design Patterns Webinar
Node.js Frameworks & Design Patterns Webinar
 

Andere mochten auch

SAP TechEd 2010 highlights
SAP TechEd 2010 highlightsSAP TechEd 2010 highlights
SAP TechEd 2010 highlightsSascha Wenninger
 
REST - A Super Quick Intro
REST - A Super Quick IntroREST - A Super Quick Intro
REST - A Super Quick IntroSascha Wenninger
 
Lessons Learnt Implementing High-Performance Integration using SAP PI
Lessons Learnt Implementing High-Performance Integration using SAP PILessons Learnt Implementing High-Performance Integration using SAP PI
Lessons Learnt Implementing High-Performance Integration using SAP PISascha Wenninger
 
Sap pi overview
Sap pi overviewSap pi overview
Sap pi overviewsmavachee
 
Build your Own Technology Roadmap!
Build your Own Technology Roadmap!Build your Own Technology Roadmap!
Build your Own Technology Roadmap!Sascha Wenninger
 
SAP Systems Integration by SAP PI (XI)
SAP Systems Integration by SAP PI (XI)SAP Systems Integration by SAP PI (XI)
SAP Systems Integration by SAP PI (XI)alpercelk
 
Getting started with SAP PI/PO an overview presentation
Getting started with SAP PI/PO an overview presentationGetting started with SAP PI/PO an overview presentation
Getting started with SAP PI/PO an overview presentationFigaf.com
 

Andere mochten auch (9)

SAP TechEd 2010 highlights
SAP TechEd 2010 highlightsSAP TechEd 2010 highlights
SAP TechEd 2010 highlights
 
REST - A Super Quick Intro
REST - A Super Quick IntroREST - A Super Quick Intro
REST - A Super Quick Intro
 
Lessons Learnt Implementing High-Performance Integration using SAP PI
Lessons Learnt Implementing High-Performance Integration using SAP PILessons Learnt Implementing High-Performance Integration using SAP PI
Lessons Learnt Implementing High-Performance Integration using SAP PI
 
The CSV File Strikes Back
The CSV File Strikes BackThe CSV File Strikes Back
The CSV File Strikes Back
 
Sap pi overview
Sap pi overviewSap pi overview
Sap pi overview
 
Build your Own Technology Roadmap!
Build your Own Technology Roadmap!Build your Own Technology Roadmap!
Build your Own Technology Roadmap!
 
SAP Systems Integration by SAP PI (XI)
SAP Systems Integration by SAP PI (XI)SAP Systems Integration by SAP PI (XI)
SAP Systems Integration by SAP PI (XI)
 
Getting started with SAP PI/PO an overview presentation
Getting started with SAP PI/PO an overview presentationGetting started with SAP PI/PO an overview presentation
Getting started with SAP PI/PO an overview presentation
 
SAP PI and SOA Overview
SAP PI and SOA OverviewSAP PI and SOA Overview
SAP PI and SOA Overview
 

Ähnlich wie REST: So What's It All About? (SAP TechEd 2011, MOB107)

Web services soap and rest by mandakini for TechGig
Web services soap and rest by mandakini for TechGigWeb services soap and rest by mandakini for TechGig
Web services soap and rest by mandakini for TechGigMandakini Kumari
 
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 best practices – comprehensive handbook
Rest api best practices – comprehensive handbookRest api best practices – comprehensive handbook
Rest api best practices – comprehensive handbookKaty Slemon
 
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
 
Semantic Web Servers
Semantic Web ServersSemantic Web Servers
Semantic Web Serverswebhostingguy
 
Web API or WCF - An Architectural Comparison
Web API or WCF - An Architectural ComparisonWeb API or WCF - An Architectural Comparison
Web API or WCF - An Architectural ComparisonAdnan Masood
 
Castle in the Clouds: SaaS Enabling JavaServer™ Faces Applications (JavaOne 2...
Castle in the Clouds: SaaS Enabling JavaServer™ Faces Applications (JavaOne 2...Castle in the Clouds: SaaS Enabling JavaServer™ Faces Applications (JavaOne 2...
Castle in the Clouds: SaaS Enabling JavaServer™ Faces Applications (JavaOne 2...Lucas Jellema
 
APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013Jerome Louvel
 
From Web APIs to Cross-Device Web Sites
From Web APIs to Cross-Device Web SitesFrom Web APIs to Cross-Device Web Sites
From Web APIs to Cross-Device Web SitesRestlet
 
Web Services Foundation Technologies
Web Services Foundation TechnologiesWeb Services Foundation Technologies
Web Services Foundation TechnologiesPankaj Saharan
 
Overview of Rest Service and ASP.NET WEB API
Overview of Rest Service and ASP.NET WEB APIOverview of Rest Service and ASP.NET WEB API
Overview of Rest Service and ASP.NET WEB APIPankaj Bajaj
 
Enterprise Software Architecture
Enterprise Software ArchitectureEnterprise Software Architecture
Enterprise Software Architecturerahmed_sct
 
REST vs WS-*: Myths Facts and Lies
REST vs WS-*: Myths Facts and LiesREST vs WS-*: Myths Facts and Lies
REST vs WS-*: Myths Facts and LiesPaul Fremantle
 
Web2 0 Incredibles
Web2 0 IncrediblesWeb2 0 Incredibles
Web2 0 Incrediblesanjeshdubey
 
Introduction to Service Oriented Architecture
Introduction to Service Oriented ArchitectureIntroduction to Service Oriented Architecture
Introduction to Service Oriented ArchitectureDATA Inc.
 
RefCard API Architecture Strategy
RefCard API Architecture StrategyRefCard API Architecture Strategy
RefCard API Architecture StrategyOCTO Technology
 
Experiences with Oracle WebCenter 11g: Implementing SOA with a User Interface
Experiences with Oracle WebCenter 11g: Implementing SOA with a User InterfaceExperiences with Oracle WebCenter 11g: Implementing SOA with a User Interface
Experiences with Oracle WebCenter 11g: Implementing SOA with a User InterfaceLucas Jellema
 

Ähnlich wie REST: So What's It All About? (SAP TechEd 2011, MOB107) (20)

Web services soap and rest by mandakini for TechGig
Web services soap and rest by mandakini for TechGigWeb services soap and rest by mandakini for TechGig
Web services soap and rest by mandakini for TechGig
 
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
 
Web 2 0 Tools
Web 2 0 ToolsWeb 2 0 Tools
Web 2 0 Tools
 
REST full API Design
REST full API DesignREST full API Design
REST full API Design
 
sMash_for_zOS-users
sMash_for_zOS-userssMash_for_zOS-users
sMash_for_zOS-users
 
Rest api best practices – comprehensive handbook
Rest api best practices – comprehensive handbookRest api best practices – comprehensive handbook
Rest api best practices – comprehensive handbook
 
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
 
Semantic Web Servers
Semantic Web ServersSemantic Web Servers
Semantic Web Servers
 
Web API or WCF - An Architectural Comparison
Web API or WCF - An Architectural ComparisonWeb API or WCF - An Architectural Comparison
Web API or WCF - An Architectural Comparison
 
Castle in the Clouds: SaaS Enabling JavaServer™ Faces Applications (JavaOne 2...
Castle in the Clouds: SaaS Enabling JavaServer™ Faces Applications (JavaOne 2...Castle in the Clouds: SaaS Enabling JavaServer™ Faces Applications (JavaOne 2...
Castle in the Clouds: SaaS Enabling JavaServer™ Faces Applications (JavaOne 2...
 
APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013
 
From Web APIs to Cross-Device Web Sites
From Web APIs to Cross-Device Web SitesFrom Web APIs to Cross-Device Web Sites
From Web APIs to Cross-Device Web Sites
 
Web Services Foundation Technologies
Web Services Foundation TechnologiesWeb Services Foundation Technologies
Web Services Foundation Technologies
 
Overview of Rest Service and ASP.NET WEB API
Overview of Rest Service and ASP.NET WEB APIOverview of Rest Service and ASP.NET WEB API
Overview of Rest Service and ASP.NET WEB API
 
Enterprise Software Architecture
Enterprise Software ArchitectureEnterprise Software Architecture
Enterprise Software Architecture
 
REST vs WS-*: Myths Facts and Lies
REST vs WS-*: Myths Facts and LiesREST vs WS-*: Myths Facts and Lies
REST vs WS-*: Myths Facts and Lies
 
Web2 0 Incredibles
Web2 0 IncrediblesWeb2 0 Incredibles
Web2 0 Incredibles
 
Introduction to Service Oriented Architecture
Introduction to Service Oriented ArchitectureIntroduction to Service Oriented Architecture
Introduction to Service Oriented Architecture
 
RefCard API Architecture Strategy
RefCard API Architecture StrategyRefCard API Architecture Strategy
RefCard API Architecture Strategy
 
Experiences with Oracle WebCenter 11g: Implementing SOA with a User Interface
Experiences with Oracle WebCenter 11g: Implementing SOA with a User InterfaceExperiences with Oracle WebCenter 11g: Implementing SOA with a User Interface
Experiences with Oracle WebCenter 11g: Implementing SOA with a User Interface
 

Kürzlich hochgeladen

Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
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
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
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
 
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
 
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
 
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
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 
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
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
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
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 

Kürzlich hochgeladen (20)

Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
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
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
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
 
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
 
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
 
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...
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
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.
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
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
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 

REST: So What's It All About? (SAP TechEd 2011, MOB107)

  • 1. REST – So What’s It All About? MOB107 @ SAP TechEd 2011 Las Vegas
  • 2. Agenda Concepts Applications in SAP-land Demo
  • 3. Agenda Concepts Applications in SAP-land Demo
  • 7. The Client communicates with the Server by modifying the state of Resourcesthrough Representations
  • 8. Representations? The server can store its data in whatever way it likes The client is unaware of this, and can store the same things differently Each party serialises its internal state into Representations This provides loose coupling!
  • 10. URLs Identify Resources REST interfaces manipulate the state of resources “Process as a state machine/data flow diagram” Resource-oriented decomposition of business processes SOA-style interfaces perform a specific task “Process as a flowchart/workflow” Functional decomposition of business processes
  • 11. HTTP is an Application Protocol. REST recognises this.
  • 13. This has a number of benefits…
  • 14. Reliable Communication (as long as the client knows how to handle errors and retries) Free* Caching! *provided by commodity infrastructure!
  • 15. Easy Metadata exchange via HTTP Headers! Accept Content-Type If-Modified-Since Last-Modified
  • 16. …and last but not least… A Universally-Understood Protocol!
  • 17. But How is that Better than SOAP?
  • 18. HTTP has Standard Verbs GET PUT POST DELETE HEAD OPTIONS PATCH TRACE
  • 19. HTTP has Standard Verbs Standard Meaning  Constraints = scope for optimization Widely Implemented Everybody knows how to behave
  • 20. SOAP Doesn’t. getAccountCustomerByInternalId searchCustomerByBasicData updateSalesProspectStatusByPartnerSalesRepresentativeBasicData_sync And everything works via HTTP POST (i.e. it uses HTTP as the dumb transport)
  • 21. HTTP has Standard Responses 200 OK 302 Moved Permanently 404 Not Found 406 Method Not Allowed 409 Conflict 418 I’m a Teapot …
  • 23. One last principle before we move on: HATEOAS
  • 24. One last principle before we move on: Hypertext As The Engine Of Application State
  • 25. An Example Client requests Shopping Cart Server sends HTML page with items and links Client’s move Client clicks the “Check Out” link Server sends HTML page with Total Amount Client’s move Client clicks the “Pay” link Server sends HTML page with “Thank You” message
  • 26. Notice Something? The Client is responsible for moving forward in a process The server guides the client forward (with ‘Check Out’, ‘Pay’ links) The client is responsible for completing the process If the client stops, the server doesn’t care!
  • 27. Notice Something? The server doesn’t maintain session/application state. It does maintain resource state! Every request modifies the state of a resource In the example, the client causes the state of the “Shopping Cart” resource to be modified.
  • 28. Concepts Applications in SAP-land Demo
  • 30. The Good Things Exposes BAPIs, RFCs & custom ABAP classes via OData XML Well integrated into SAP’s roadmap Tight integration with v2.1 of SUP – Sybase Unwired Platform Duet Enterprise Standard content and pre-built integration will be delivered by SAP Framework provides flexible security and auditing/logging Push notifications to consumers after subscription Expose data & functionality from older (pre-7.02) systems
  • 31. 2 Approaches to Development Generation Tools Complete Control Allows custom code adhering to a structured framework with a library ofhelper classes Quickly expose BAPIs, RFCs and GUI screens Up & running in minutes! OData Channel
  • 32. The Limitations Only supports OData (Open, but Microsoft-centric XML) no custom representations (other XML, JSON, PDF, etc.)* Limited support for complex input parameters* The Generation tools don’t: Allow modification of HTTP headers for caching, CORS, etc. Created linked resources (e.g. navigate Customer  Order  Item) Use of the OData Channel when developing Gateway Services makes this possible! *In development CORS is a method for working around browser-based cross-domain scripting security measures which can hamper JSON or AJAX-based browser applications.
  • 33. Mapping to a BAPI BAPI Field Defaults OData XML Field
  • 34.
  • 35.
  • 36. More Info on Gateway at TechEd
  • 38. DJ Adams Started It All!
  • 39. A Simple RESTful API for SAP CRM BusinessPartners everywhere BPs have roles (e.g. Customer, Contact Person, Employee…) BPs have relationships with other BPs Relationships have attributes Relationships lead to Opportunities Target consumer: Mobile app built with HTML5 + jQuery Mobile
  • 40. 3 Resources http://sapcrm:8000/auspost/businesspartner http://sapcrm:8000/auspost/bprelationship http://sapcrm:8000/auspost/opportunity plus any sub-resources we need
  • 41. Design Principles JSON as the default format Roles & Relationships via hyperlinks Client must only know the ‘entry point’ URL to its own BP All other client interaction driven by hyperlinks There is a great ABAP  JSON library on CodeExchange!
  • 43. Sidebar: Hyperlinks in JSON No one standard to show hyperlinks  We chose the simplest option we found: “links”: { “self”: “http://…”, “up”: “http://…”, “http://auspost.com.au/api/doc/rels/tracking”: “http://…”, … } magic keyword relationship* custom relationship link URL *as per IANA standard
  • 44. ICF Configuration in SAP CRM Create a public class
  • 45. ICF Configuration in SAP CRM Assign interface IF_HTTP_EXTENSION
  • 47.
  • 48.
  • 49.
  • 50.
  • 51. Demo
  • 52. Summary REST is an architectural style Apply web principles to A2A integration Promotes true loose coupling via hyperlinks Based on Resources rather than functionality or tasks NetWeaver Gateway can expose SAP data & functionality in a RESTful way. More specific requirements can be met with Z code Most mobile frameworks rely on RESTful integration But the REST style is equally valid for A2A and non-mobile scenarios!
  • 53. About Us SaschaWenninger sascha.wenninger@auspost.com.au @sufw John Moy john.moy@auspost.com.au @jhmoy
  • 54. Feedback Please complete a session evaluation for this session Session Code: MOB107
  • 55. Resources & Further Reading A free eBook on REST, by InfoQ: http://www.infoq.com/minibooks/emag-03-2010-rest Other interesting blogs and articles on InfoQ: http://www.infoq.com/articles/RESTSOAFuture The Richardson Maturity Model, explained by Martin Fowler: http://martinfowler.com/articles/richardsonMaturityModel.html ...and by Leonard Richardson himself: http://www.crummy.com/writing/speaking/2008-QCon/act3.html DJ Adams’ original blog on REST on SDN: http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/584 Further blogs by DJ on implementing RESTful services via the ICF: http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/15899 http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/17375 http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/16014 A Simple Intro to JSON: http://json.org CORS – Cross-Origin Resource Sharing, by the Mozilla Developer Network: http://hacks.mozilla.org/2009/07/cross-site-xmlhttprequest-with-cors/
  • 56. Resources & Further Reading The NetWeaver Gateway page on SDN: http://www.sdn.sap.com/irj/sdn/gateway How to Create Gateway Services Using the OData Channel API: http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/90f79f1c-d274-2e10-be9e-9dbffea99a5d Remote-Enabled Function Module to Gateway Service in 7 Minutes: http://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/a016451c-f47e-2e10-febe-ec719fe62e4f Known Limitations of SAP NetWeaver Gateway: SAP Note 1574568
  • 57. Attributions Images by Geek & Poke (Oliver Widder): http://geekandpoke.typepad.com/.a/6a00d8341d3df553ef0133f3e30a99970b-pi http://geekandpoke.typepad.com/.a/6a00d8341d3df553ef0105362b2664970c-pi http://geekandpoke.typepad.com/.a/6a00d8341d3df553ef015390312d9f970b-pi ‘Standards’ by xkcd (Randall Munroe): http://xkcd.com/927/ ‘Permanent State’ by Gaping Void (Hugh MacLeod): http://gapingvoid.com/2011/07/28/permanent-state/ Many thanks to all for providing their work under a Creative Commons license! 

Hinweis der Redaktion

  1. This implies the client is the active party in the driving seat!The client doesn’t have to know or care about the server’s implementation – it only sees representations of internal (to the server) resources.
  2. Example: a web page is just a representation of data held in the server’s database. Most sites don’t store the HTML in a file system but serialise their internal data and objects from a database into HTML using code!
  3. By contrast SOAP uses HTTP is the dumb transport protocol. In fact, SOAP was designed to be transport-protocol agnostic – it is possible to use SOAP over SMTP or JMS! This means SOAP can’t assume that the transport protocol will do things reliably, so it doesn’t try. This leads to the need of yet another layer: WS-RM, and further complexity added to the whole stack!
  4. This means there is not standard way for a client to know what service requests are idempotent, safe or cacheable!
  5. Notice how the client is responsible for driving the process through to completion? The server simply responds to each request with some information and provides guidance on the next steps in the process which are available to the client. The client can choose to follow one of these, but doesn’t have to. This is practically identical to stateless web pages (e.g. stateless BSPs), and the opposite for transactional (stateful) applications such as Web Dynpro where the server maintains a session for each user and knows exactly what state each user is in.
  6. Resource state != Application stateRequests from the client effect the transition of a resource from one state to anotherThe server uses a resource’s current state to determine what state transitions are available, and lets the client choose which one to effect.This is done through hyperlinks
  7. The generation tools also allow creation of Gateway services from RFCs, BOR objects and even GUI screens.
  8. Highlight that the Odata channel is really the preferred way of building Gateway services as it allows more complex use cases to be satisfied.
  9. This is the Generation tool in Gateway 1.0 which will get you going very quickly from existing BAPIs or RFCs.
  10. These payloads were generated by a Gateway 1.0 system. 2.0 may have introduced changes to the structure of these XML documents.
  11. These payloads were generated by a Gateway 1.0 system. 2.0 may have introduced changes to the structure of these XML documents.
  12. This is basically the same structure that Facebook implemented in their Graph API; there are more complex structures with more functionality but this was sufficient for our requirements.