SlideShare uma empresa Scribd logo
1 de 67
Baixar para ler offline
REST – So What’s It All About?

    CD110 @ SAP TechEd 2012
           Las Vegas
About Me

Sascha Wenninger
Integration Guy: SOA, PI, etc.

Drawer of Diagrams, Writer of Emails

@sufw
Agenda


               Applica.ons	
  
Concepts	
                            Demo	
  
               in	
  SAP-­‐land	
  
Agenda


               Applica.ons	
  
Concepts	
                            Demo	
  
               in	
  SAP-­‐land	
  
REST
REpresentational
State
Transfer
What Does That Mean?
The Client communicates with the Server

  by modifying the state of Resources

       through Representations
It’s	
  the	
  Web	
  
           	
  
  (for	
  machines)	
  
REST	
  interfaces	
  manipulate	
  the	
  state	
  of	
  resources	
  
       “Process	
  as	
  a	
  state	
  machine/data	
  flow	
  diagram”	
  
       Resource-­‐oriented	
  decomposi.on	
  of	
  business	
  processes	
  
	
  
	
  
SOA-­‐style	
  interfaces	
  perform	
  a	
  specific	
  task	
  
       “Process	
  as	
  a	
  flowchart/workflow”	
  
       Func.onal	
  decomposi.on	
  of	
  business	
  processes	
  
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 because everyone understands them:
http://saperp.BlueT.com.au/customer/12345



URLs are cheap. Use lots of them!
http://api.netflix.com/catalog/titles/movies/60021896
http://api.netflix.com/catalog/titles/movies/60021896/cast
http://api.netflix.com/catalog/titles/movies/60021896/synopsis
Why the http:// URLs?
HTTP is an Application Protocol.


     REST recognises this.
But How is that Better than SOAP?
Remember the OSI Stack?

        Layer	
            Example	
  
7	
     Applica/on	
       DNS,	
  FTP,	
  HTTP,	
  etc.	
  
6	
     Presenta.on	
      SSL	
  
5	
     Session	
          L2TP,	
  PPTP	
  
4	
     Transport	
        TCP	
  
3	
     Network	
          IP	
  
2	
     Data	
  Link	
     PPP,	
  ARP	
  
1	
     Physical	
         IEEE	
  802.11	
  
SOAP was designed
to be transport-protocol agnostic
Many bindings for SOAP:

        HTTP
        SMTP
         JMS
        AMQP
Many bindings for SOAP:

        HTTP
        SMTP
         JMS
        AMQP
HTTP	
  is	
  an	
  Applica.on	
  
           Protocol.	
  
REST recognises this.
SOAP knows nothing about it!
So What?




Well, there are benefits to knowing…
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!
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	
  
           Applica.on	
  
           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.
Applica.ons	
  
Concepts	
                            Demo	
  
               in	
  SAP-­‐land	
  
NetWeaver Gateway
RESTful OData API
   Add-On to NetWeaver 7.0*
                                                           Web          Devices                Enterprise       Social
                                                                                               Software
   Current version: 2.0 SP05
   Strategic for SAP                                                   SAP	
  NetWeaver	
  Gateway	
  



                                                                           SAP	
  Business	
  Suite	
  



                                                                 CRM     SRM        SCM         PLM       ERP




*see	
  Prerequisites	
  and	
  Deployment	
  Op.ons	
  
The Good Things
•  Exposes BAPIs, RFCs & custom ABAP classes via OData XML
   –  Specific connectors for BOL (GenIL), HANA, BW, BOR, Workflow, etc.

•  Well integrated into SAP’s roadmap
   –  Tight integration with SUP 2.1+
   –  Duet Enterprise uses Gateway internally

•  Framework provides flexible security and auditing/logging
•  Push notifications to consumers after subscription
•  Expose data & functionality from older (pre-7.0) systems
New Since Last Year
•  JSON (finally! :-)
•  Batch operations
•  “Deltas”, aka conditional requests
•  “Model Composition”, aka Mash-ups
•  New Service Builder (SEGW)
•  Idempotency Support
•  etc… (see What’s New)
2 Approaches to Development

       Generation Tools                   OData Channel

•    Quickly expose BAPIs, RFCs   •    Complete Control
     and GUI screens              •    Build custom code adhering to
•    Up & running in minutes!          a structured framework with a
                                       library of helper classes
                                  •    Since SP04: SEGW
2 Approaches to Development

       Generation Tools                   OData Channel

•    Quickly expose BAPIs, RFCs   •    Complete Control
     and GUI screens              •    Build custom code adhering to
•    Up & running in minutes!          a structured framework with a
                                       library of helper classes
                                  •    New tool SEGW since SP04
The Limitations
•  Only supports OData (both XML & JSON)
   –  no custom representations (other XML/JSON, PDF, etc.)

•  Limited support for complex input parameters
•  Inherits the limitations of the backend services
More Info on Gateway at TechEd
 CD109    How the University of Mississippi Runs Better with NetWeaver Gateway

 CD160    NetWeaver Gateway Development for Beginners

 CD204    NetWeaver Gateway and OData in Detail

 CD267    Developing Applications with HTML5 Toolkit and NetWeaver Gateway

MOB107    Best Practices for Establishing and Running a Mobile Landscape

MOB204    Building SAP Applications Using NetWeaver Gateway and HTML5

MOB205    From Start to Finish - Developing an iPad App Using NW Gateway

PMC206    NetWeaver PI and Gateway - When to Use What

 TEC107   NetWeaver Gateway Overview - Roadmap and Strategy
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/api/businesspartner

http://sapcrm:8000/api/bprelationship

http://sapcrm:8000/api/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:

magic	
  keyword	
  
                       rela.onship*	
  
  “links”: {
    “self”: “http://…”,
                            custom	
  rela.onship	
                  link	
  URL	
  
    “up”: “http://…”,
    “http://auspost.com.au/api/doc/rels/tracking”: “http://…”,
    …
  }                                                   *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 Me


Sascha Wenninger
sascha@BlueT.com.au
@sufw
Get the Latest Version of this Talk!

                        http://slideshare.net/sufw



This	
  presenta.on	
  by	
  Sascha	
  Wenninger	
  is	
  available	
  under	
  a	
  Crea.ve	
  Commons	
  A`ribu.on-­‐ShareAlike	
  3.0	
  license	
  
Feedback

Please complete a session evaluation for this session


Session Code:   CD110
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 SCN:
     http://scn.sap.com/people/dj.adams/blog/2004/06/24/forget-soap--build-real-web-services-with-the-icf

Further blogs by DJ on implementing RESTful services via the ICF:
     http://scn.sap.com/people/dj.adams/blog/2009/09/21/a-new-rest-handler-dispatcher-for-the-icf
     http://scn.sap.com/people/dj.adams/blog/2010/01/07/representational-state-transfer-rest-and-sap
     http://scn.sap.com/people/dj.adams/blog/2009/09/30/rest-orientation-controlling-access-to-resources

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
RESTful APIs from Scratch – Lessons Learnt (so far):
    http://scn.sap.com/community/technology-innovation/blog/2012/06/03/restful-apis-from-scratch-lessons-learnt-so-far

The NetWeaver Gateway space on SCN: http://scn.sap.com/community/netweaver-gateway

HTTP: An Application-Level Protocol: http://dev.opera.com/articles/view/http-basic-introduction/
HTTP: Let’s GET It On!: http://dev.opera.com/articles/view/http-lets-get-it-on/
HTTP: Response Codes: http://dev.opera.com/articles/view/http-response-codes/

Resources are not Objects: http://ruben.verborgh.org/blog/2012/09/27/the-object-resource-impedance-mismatch/
    (a good read for OO programmers)

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! J

Mais conteúdo relacionado

Mais procurados

ADF Mythbusters UKOUG'14
ADF Mythbusters UKOUG'14ADF Mythbusters UKOUG'14
ADF Mythbusters UKOUG'14andrejusb
 
[McDermott] Configuring SharePoint Hybrid Search and Taxonomy
[McDermott] Configuring SharePoint Hybrid Search and Taxonomy[McDermott] Configuring SharePoint Hybrid Search and Taxonomy
[McDermott] Configuring SharePoint Hybrid Search and TaxonomyEuropean Collaboration Summit
 
The (not so) Dark Art of Atlassian Performance Tuning
The (not so) Dark Art of Atlassian Performance TuningThe (not so) Dark Art of Atlassian Performance Tuning
The (not so) Dark Art of Atlassian Performance Tuningcolleenfry
 
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...Vadym Kazulkin
 
Writing less code with Serverless on AWS at AWS User Group Nairobi
Writing less code with Serverless on AWS at AWS User Group NairobiWriting less code with Serverless on AWS at AWS User Group Nairobi
Writing less code with Serverless on AWS at AWS User Group NairobiVadym Kazulkin
 
ECS 19 - John White, Jason Himmelstein - Everything You Always Wanted To Know...
ECS 19 - John White, Jason Himmelstein - Everything You Always Wanted To Know...ECS 19 - John White, Jason Himmelstein - Everything You Always Wanted To Know...
ECS 19 - John White, Jason Himmelstein - Everything You Always Wanted To Know...European Collaboration Summit
 
Your Future HTML: The Evolution of Site Design with Web Components
Your Future HTML: The Evolution of Site Design with Web ComponentsYour Future HTML: The Evolution of Site Design with Web Components
Your Future HTML: The Evolution of Site Design with Web ComponentsKen Tabor
 
Ecs19 - Hans Brender - Is OneDrive Really Enterprise Ready
Ecs19 - Hans Brender -  Is OneDrive Really Enterprise ReadyEcs19 - Hans Brender -  Is OneDrive Really Enterprise Ready
Ecs19 - Hans Brender - Is OneDrive Really Enterprise ReadyEuropean Collaboration Summit
 
A Deep-Dive into Real-World SharePoint App Development
A Deep-Dive into Real-World SharePoint App DevelopmentA Deep-Dive into Real-World SharePoint App Development
A Deep-Dive into Real-World SharePoint App DevelopmentSPC Adriatics
 
ECS19 - Patrick Curran - Expanding User Profiles with Line of Business Data (...
ECS19 - Patrick Curran - Expanding User Profiles with Line of Business Data (...ECS19 - Patrick Curran - Expanding User Profiles with Line of Business Data (...
ECS19 - Patrick Curran - Expanding User Profiles with Line of Business Data (...European Collaboration Summit
 
Rapid API Development with LoopBack/StrongLoop
Rapid API Development with LoopBack/StrongLoopRapid API Development with LoopBack/StrongLoop
Rapid API Development with LoopBack/StrongLoopRaymond Camden
 
ECS19 - Tomislav Lulic - What is changed in product/service licensing with Cl...
ECS19 - Tomislav Lulic - What is changed in product/service licensing with Cl...ECS19 - Tomislav Lulic - What is changed in product/service licensing with Cl...
ECS19 - Tomislav Lulic - What is changed in product/service licensing with Cl...European Collaboration Summit
 
Adopting Java for the Serverless world at Serverless Meetup New York and Boston
Adopting Java for the Serverless world at Serverless Meetup New York and BostonAdopting Java for the Serverless world at Serverless Meetup New York and Boston
Adopting Java for the Serverless world at Serverless Meetup New York and BostonVadym Kazulkin
 
[@IndeedEng] Redundant Array of Inexpensive Datacenters
[@IndeedEng] Redundant Array of Inexpensive Datacenters[@IndeedEng] Redundant Array of Inexpensive Datacenters
[@IndeedEng] Redundant Array of Inexpensive Datacentersindeedeng
 
E fw b4rbr62uiizvvipyb_cannell_lowcodelowdown_apex_vbcs
E fw b4rbr62uiizvvipyb_cannell_lowcodelowdown_apex_vbcsE fw b4rbr62uiizvvipyb_cannell_lowcodelowdown_apex_vbcs
E fw b4rbr62uiizvvipyb_cannell_lowcodelowdown_apex_vbcsMohamedcpcbma
 
Writing less code with Serverless on AWS at AWS Community Day DACH 2021
Writing less code with Serverless on AWS at AWS Community Day DACH 2021Writing less code with Serverless on AWS at AWS Community Day DACH 2021
Writing less code with Serverless on AWS at AWS Community Day DACH 2021Vadym Kazulkin
 
WSO2Con Asia 2014 - Reinventing Enterprise Integration for Connected Business
WSO2Con Asia 2014 - Reinventing Enterprise Integration for Connected BusinessWSO2Con Asia 2014 - Reinventing Enterprise Integration for Connected Business
WSO2Con Asia 2014 - Reinventing Enterprise Integration for Connected BusinessWSO2
 
ECS19 - Michael Greth - Best Practice with Company Video on Microsoft Stream
ECS19 - Michael Greth - Best Practice with Company Video on Microsoft StreamECS19 - Michael Greth - Best Practice with Company Video on Microsoft Stream
ECS19 - Michael Greth - Best Practice with Company Video on Microsoft StreamEuropean Collaboration Summit
 

Mais procurados (20)

ADF Mythbusters UKOUG'14
ADF Mythbusters UKOUG'14ADF Mythbusters UKOUG'14
ADF Mythbusters UKOUG'14
 
[Delimon] Unraveling Teams vs Skype for Business
[Delimon] Unraveling Teams vs Skype for Business[Delimon] Unraveling Teams vs Skype for Business
[Delimon] Unraveling Teams vs Skype for Business
 
[McDermott] Configuring SharePoint Hybrid Search and Taxonomy
[McDermott] Configuring SharePoint Hybrid Search and Taxonomy[McDermott] Configuring SharePoint Hybrid Search and Taxonomy
[McDermott] Configuring SharePoint Hybrid Search and Taxonomy
 
The (not so) Dark Art of Atlassian Performance Tuning
The (not so) Dark Art of Atlassian Performance TuningThe (not so) Dark Art of Atlassian Performance Tuning
The (not so) Dark Art of Atlassian Performance Tuning
 
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...
 
Writing less code with Serverless on AWS at AWS User Group Nairobi
Writing less code with Serverless on AWS at AWS User Group NairobiWriting less code with Serverless on AWS at AWS User Group Nairobi
Writing less code with Serverless on AWS at AWS User Group Nairobi
 
ECS 19 - John White, Jason Himmelstein - Everything You Always Wanted To Know...
ECS 19 - John White, Jason Himmelstein - Everything You Always Wanted To Know...ECS 19 - John White, Jason Himmelstein - Everything You Always Wanted To Know...
ECS 19 - John White, Jason Himmelstein - Everything You Always Wanted To Know...
 
Your Future HTML: The Evolution of Site Design with Web Components
Your Future HTML: The Evolution of Site Design with Web ComponentsYour Future HTML: The Evolution of Site Design with Web Components
Your Future HTML: The Evolution of Site Design with Web Components
 
Ecs19 - Hans Brender - Is OneDrive Really Enterprise Ready
Ecs19 - Hans Brender -  Is OneDrive Really Enterprise ReadyEcs19 - Hans Brender -  Is OneDrive Really Enterprise Ready
Ecs19 - Hans Brender - Is OneDrive Really Enterprise Ready
 
A Deep-Dive into Real-World SharePoint App Development
A Deep-Dive into Real-World SharePoint App DevelopmentA Deep-Dive into Real-World SharePoint App Development
A Deep-Dive into Real-World SharePoint App Development
 
The PRPL Pattern
The PRPL PatternThe PRPL Pattern
The PRPL Pattern
 
ECS19 - Patrick Curran - Expanding User Profiles with Line of Business Data (...
ECS19 - Patrick Curran - Expanding User Profiles with Line of Business Data (...ECS19 - Patrick Curran - Expanding User Profiles with Line of Business Data (...
ECS19 - Patrick Curran - Expanding User Profiles with Line of Business Data (...
 
Rapid API Development with LoopBack/StrongLoop
Rapid API Development with LoopBack/StrongLoopRapid API Development with LoopBack/StrongLoop
Rapid API Development with LoopBack/StrongLoop
 
ECS19 - Tomislav Lulic - What is changed in product/service licensing with Cl...
ECS19 - Tomislav Lulic - What is changed in product/service licensing with Cl...ECS19 - Tomislav Lulic - What is changed in product/service licensing with Cl...
ECS19 - Tomislav Lulic - What is changed in product/service licensing with Cl...
 
Adopting Java for the Serverless world at Serverless Meetup New York and Boston
Adopting Java for the Serverless world at Serverless Meetup New York and BostonAdopting Java for the Serverless world at Serverless Meetup New York and Boston
Adopting Java for the Serverless world at Serverless Meetup New York and Boston
 
[@IndeedEng] Redundant Array of Inexpensive Datacenters
[@IndeedEng] Redundant Array of Inexpensive Datacenters[@IndeedEng] Redundant Array of Inexpensive Datacenters
[@IndeedEng] Redundant Array of Inexpensive Datacenters
 
E fw b4rbr62uiizvvipyb_cannell_lowcodelowdown_apex_vbcs
E fw b4rbr62uiizvvipyb_cannell_lowcodelowdown_apex_vbcsE fw b4rbr62uiizvvipyb_cannell_lowcodelowdown_apex_vbcs
E fw b4rbr62uiizvvipyb_cannell_lowcodelowdown_apex_vbcs
 
Writing less code with Serverless on AWS at AWS Community Day DACH 2021
Writing less code with Serverless on AWS at AWS Community Day DACH 2021Writing less code with Serverless on AWS at AWS Community Day DACH 2021
Writing less code with Serverless on AWS at AWS Community Day DACH 2021
 
WSO2Con Asia 2014 - Reinventing Enterprise Integration for Connected Business
WSO2Con Asia 2014 - Reinventing Enterprise Integration for Connected BusinessWSO2Con Asia 2014 - Reinventing Enterprise Integration for Connected Business
WSO2Con Asia 2014 - Reinventing Enterprise Integration for Connected Business
 
ECS19 - Michael Greth - Best Practice with Company Video on Microsoft Stream
ECS19 - Michael Greth - Best Practice with Company Video on Microsoft StreamECS19 - Michael Greth - Best Practice with Company Video on Microsoft Stream
ECS19 - Michael Greth - Best Practice with Company Video on Microsoft Stream
 

Semelhante a REST - What's It All About? (SAP TechEd 2012, CD110)

REST: So What's It All About? (SAP TechEd 2011, MOB107)
REST: So What's It All About? (SAP TechEd 2011, MOB107)REST: So What's It All About? (SAP TechEd 2011, MOB107)
REST: So What's It All About? (SAP TechEd 2011, MOB107)Sascha Wenninger
 
MuleSoft London Community October 2017 - Hybrid and SAP Integration
MuleSoft London Community October 2017 - Hybrid and SAP IntegrationMuleSoft London Community October 2017 - Hybrid and SAP Integration
MuleSoft London Community October 2017 - Hybrid and SAP IntegrationPace Integration
 
Semantic Web Servers
Semantic Web ServersSemantic Web Servers
Semantic Web Serverswebhostingguy
 
Role of Rest vs. Web Services and EI
Role of Rest vs. Web Services and EIRole of Rest vs. Web Services and EI
Role of Rest vs. Web Services and EIWSO2
 
(ATS6-DEV02) Web Application Strategies
(ATS6-DEV02) Web Application Strategies(ATS6-DEV02) Web Application Strategies
(ATS6-DEV02) Web Application StrategiesBIOVIA
 
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
 
Toronto node js_meetup
Toronto node js_meetupToronto node js_meetup
Toronto node js_meetupShubhra Kar
 
Sharepointarchitecturereal worldscenariofundamentals-150419043032-conversion-...
Sharepointarchitecturereal worldscenariofundamentals-150419043032-conversion-...Sharepointarchitecturereal worldscenariofundamentals-150419043032-conversion-...
Sharepointarchitecturereal worldscenariofundamentals-150419043032-conversion-...BIWUG
 
SAP Integration with Red Hat JBoss Technologies
SAP Integration with Red Hat JBoss TechnologiesSAP Integration with Red Hat JBoss Technologies
SAP Integration with Red Hat JBoss Technologieshwilming
 
Sap integration with_j_boss_technologies
Sap integration with_j_boss_technologiesSap integration with_j_boss_technologies
Sap integration with_j_boss_technologiesSerge Pagop
 
RefCard API Architecture Strategy
RefCard API Architecture StrategyRefCard API Architecture Strategy
RefCard API Architecture StrategyOCTO Technology
 
Seattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js WorkshopSeattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js WorkshopJimmy Guerrero
 
Connect js nodejs_api_shubhra
Connect js nodejs_api_shubhraConnect js nodejs_api_shubhra
Connect js nodejs_api_shubhraShubhra Kar
 
Sap Process Integration
Sap Process Integration Sap Process Integration
Sap Process Integration Tauhidul Islam
 
Rohit_Kumar_Resume
Rohit_Kumar_ResumeRohit_Kumar_Resume
Rohit_Kumar_ResumeRohit Kumar
 

Semelhante a REST - What's It All About? (SAP TechEd 2012, CD110) (20)

REST: So What's It All About? (SAP TechEd 2011, MOB107)
REST: So What's It All About? (SAP TechEd 2011, MOB107)REST: So What's It All About? (SAP TechEd 2011, MOB107)
REST: So What's It All About? (SAP TechEd 2011, MOB107)
 
MuleSoft London Community October 2017 - Hybrid and SAP Integration
MuleSoft London Community October 2017 - Hybrid and SAP IntegrationMuleSoft London Community October 2017 - Hybrid and SAP Integration
MuleSoft London Community October 2017 - Hybrid and SAP Integration
 
Semantic Web Servers
Semantic Web ServersSemantic Web Servers
Semantic Web Servers
 
Role of Rest vs. Web Services and EI
Role of Rest vs. Web Services and EIRole of Rest vs. Web Services and EI
Role of Rest vs. Web Services and EI
 
SAP PI and SOA Overview
SAP PI and SOA OverviewSAP PI and SOA Overview
SAP PI and SOA Overview
 
(ATS6-DEV02) Web Application Strategies
(ATS6-DEV02) Web Application Strategies(ATS6-DEV02) Web Application Strategies
(ATS6-DEV02) Web Application Strategies
 
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
 
Toronto node js_meetup
Toronto node js_meetupToronto node js_meetup
Toronto node js_meetup
 
tonyz
tonyztonyz
tonyz
 
Sharepointarchitecturereal worldscenariofundamentals-150419043032-conversion-...
Sharepointarchitecturereal worldscenariofundamentals-150419043032-conversion-...Sharepointarchitecturereal worldscenariofundamentals-150419043032-conversion-...
Sharepointarchitecturereal worldscenariofundamentals-150419043032-conversion-...
 
SAP Integration with Red Hat JBoss Technologies
SAP Integration with Red Hat JBoss TechnologiesSAP Integration with Red Hat JBoss Technologies
SAP Integration with Red Hat JBoss Technologies
 
Databasecentricapisonthecloudusingplsqlandnodejscon3153oow2016 160922021655
Databasecentricapisonthecloudusingplsqlandnodejscon3153oow2016 160922021655Databasecentricapisonthecloudusingplsqlandnodejscon3153oow2016 160922021655
Databasecentricapisonthecloudusingplsqlandnodejscon3153oow2016 160922021655
 
Sap integration with_j_boss_technologies
Sap integration with_j_boss_technologiesSap integration with_j_boss_technologies
Sap integration with_j_boss_technologies
 
RefCard API Architecture Strategy
RefCard API Architecture StrategyRefCard API Architecture Strategy
RefCard API Architecture Strategy
 
REST full API Design
REST full API DesignREST full API Design
REST full API Design
 
Seattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js WorkshopSeattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js Workshop
 
Connect js nodejs_api_shubhra
Connect js nodejs_api_shubhraConnect js nodejs_api_shubhra
Connect js nodejs_api_shubhra
 
Sap Process Integration
Sap Process Integration Sap Process Integration
Sap Process Integration
 
Rohit_Kumar_Resume
Rohit_Kumar_ResumeRohit_Kumar_Resume
Rohit_Kumar_Resume
 

Mais de Sascha Wenninger

Build your Own Technology Roadmap!
Build your Own Technology Roadmap!Build your Own Technology Roadmap!
Build your Own Technology Roadmap!Sascha Wenninger
 
A Look at the Performance of SAP's Modern UIs
A Look at the Performance of SAP's Modern UIsA Look at the Performance of SAP's Modern UIs
A Look at the Performance of SAP's Modern UIsSascha Wenninger
 
Recipes for the Perfect PI v2.0
Recipes for the Perfect PI v2.0Recipes for the Perfect PI v2.0
Recipes for the Perfect PI v2.0Sascha Wenninger
 
Navigating SAP’s Integration Options (Mastering SAP Technologies 2013)
Navigating SAP’s Integration Options (Mastering SAP Technologies 2013)Navigating SAP’s Integration Options (Mastering SAP Technologies 2013)
Navigating SAP’s Integration Options (Mastering SAP Technologies 2013)Sascha 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
 
REST - A Super Quick Intro
REST - A Super Quick IntroREST - A Super Quick Intro
REST - A Super Quick IntroSascha Wenninger
 
SAP TechEd 2010 highlights
SAP TechEd 2010 highlightsSAP TechEd 2010 highlights
SAP TechEd 2010 highlightsSascha Wenninger
 

Mais de Sascha Wenninger (8)

HTTP/2 and SAP Fiori
HTTP/2 and SAP FioriHTTP/2 and SAP Fiori
HTTP/2 and SAP Fiori
 
Build your Own Technology Roadmap!
Build your Own Technology Roadmap!Build your Own Technology Roadmap!
Build your Own Technology Roadmap!
 
A Look at the Performance of SAP's Modern UIs
A Look at the Performance of SAP's Modern UIsA Look at the Performance of SAP's Modern UIs
A Look at the Performance of SAP's Modern UIs
 
Recipes for the Perfect PI v2.0
Recipes for the Perfect PI v2.0Recipes for the Perfect PI v2.0
Recipes for the Perfect PI v2.0
 
Navigating SAP’s Integration Options (Mastering SAP Technologies 2013)
Navigating SAP’s Integration Options (Mastering SAP Technologies 2013)Navigating SAP’s Integration Options (Mastering SAP Technologies 2013)
Navigating SAP’s Integration Options (Mastering SAP Technologies 2013)
 
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
 
REST - A Super Quick Intro
REST - A Super Quick IntroREST - A Super Quick Intro
REST - A Super Quick Intro
 
SAP TechEd 2010 highlights
SAP TechEd 2010 highlightsSAP TechEd 2010 highlights
SAP TechEd 2010 highlights
 

Último

Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
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
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
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
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
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
 
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
 
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
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
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
 
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
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 

Último (20)

Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
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...
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
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
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
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
 
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
 
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
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
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
 
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...
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 

REST - What's It All About? (SAP TechEd 2012, CD110)

  • 1. REST – So What’s It All About? CD110 @ SAP TechEd 2012 Las Vegas
  • 2. About Me Sascha Wenninger Integration Guy: SOA, PI, etc. Drawer of Diagrams, Writer of Emails @sufw
  • 3. Agenda Applica.ons   Concepts   Demo   in  SAP-­‐land  
  • 4. Agenda Applica.ons   Concepts   Demo   in  SAP-­‐land  
  • 8. The Client communicates with the Server by modifying the state of Resources through Representations
  • 9. It’s  the  Web     (for  machines)  
  • 10. REST  interfaces  manipulate  the  state  of  resources   “Process  as  a  state  machine/data  flow  diagram”   Resource-­‐oriented  decomposi.on  of  business  processes       SOA-­‐style  interfaces  perform  a  specific  task   “Process  as  a  flowchart/workflow”   Func.onal  decomposi.on  of  business  processes  
  • 11. 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!
  • 13. URLs because everyone understands them: http://saperp.BlueT.com.au/customer/12345 URLs are cheap. Use lots of them! http://api.netflix.com/catalog/titles/movies/60021896 http://api.netflix.com/catalog/titles/movies/60021896/cast http://api.netflix.com/catalog/titles/movies/60021896/synopsis
  • 15. HTTP is an Application Protocol. REST recognises this.
  • 16. But How is that Better than SOAP?
  • 17. Remember the OSI Stack? Layer   Example   7   Applica/on   DNS,  FTP,  HTTP,  etc.   6   Presenta.on   SSL   5   Session   L2TP,  PPTP   4   Transport   TCP   3   Network   IP   2   Data  Link   PPP,  ARP   1   Physical   IEEE  802.11  
  • 18. SOAP was designed to be transport-protocol agnostic
  • 19. Many bindings for SOAP: HTTP SMTP JMS AMQP
  • 20. Many bindings for SOAP: HTTP SMTP JMS AMQP
  • 21. HTTP  is  an  Applica.on   Protocol.   REST recognises this.
  • 22. SOAP knows nothing about it!
  • 23. So What? Well, there are benefits to knowing…
  • 24. Reliable Communication (as long as the client knows how to handle errors and retries) Free* Caching! *provided by commodity infrastructure!
  • 25. Easy Metadata exchange via HTTP Headers! Accept Content-Type If-Modified-Since Last-Modified
  • 26. …and last but not least… A Universally-Understood Protocol!
  • 27. HTTP has Standard Verbs GET PUT POST DELETE HEAD OPTIONS PATCH TRACE
  • 28. HTTP has Standard Verbs Standard Meaning à Constraints = scope for optimization Widely Implemented à Everybody knows how to behave
  • 30. HTTP has Standard Responses 200 OK 302 Moved Permanently 404 Not Found 406 Method Not Allowed 409 Conflict 418 I’m a Teapot …
  • 32. One last principle before we move on: HATEOAS  
  • 33. One last principle before we move on: Hypertext   As   The   Engine   Of   Applica.on   State  
  • 34. 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
  • 35. 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!
  • 36. 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.
  • 37. Applica.ons   Concepts   Demo   in  SAP-­‐land  
  • 39. RESTful OData API Add-On to NetWeaver 7.0* Web Devices Enterprise Social Software Current version: 2.0 SP05 Strategic for SAP SAP  NetWeaver  Gateway   SAP  Business  Suite   CRM SRM SCM PLM ERP *see  Prerequisites  and  Deployment  Op.ons  
  • 40. The Good Things •  Exposes BAPIs, RFCs & custom ABAP classes via OData XML –  Specific connectors for BOL (GenIL), HANA, BW, BOR, Workflow, etc. •  Well integrated into SAP’s roadmap –  Tight integration with SUP 2.1+ –  Duet Enterprise uses Gateway internally •  Framework provides flexible security and auditing/logging •  Push notifications to consumers after subscription •  Expose data & functionality from older (pre-7.0) systems
  • 41. New Since Last Year •  JSON (finally! :-) •  Batch operations •  “Deltas”, aka conditional requests •  “Model Composition”, aka Mash-ups •  New Service Builder (SEGW) •  Idempotency Support •  etc… (see What’s New)
  • 42. 2 Approaches to Development Generation Tools OData Channel •  Quickly expose BAPIs, RFCs •  Complete Control and GUI screens •  Build custom code adhering to •  Up & running in minutes! a structured framework with a library of helper classes •  Since SP04: SEGW
  • 43. 2 Approaches to Development Generation Tools OData Channel •  Quickly expose BAPIs, RFCs •  Complete Control and GUI screens •  Build custom code adhering to •  Up & running in minutes! a structured framework with a library of helper classes •  New tool SEGW since SP04
  • 44. The Limitations •  Only supports OData (both XML & JSON) –  no custom representations (other XML/JSON, PDF, etc.) •  Limited support for complex input parameters •  Inherits the limitations of the backend services
  • 45. More Info on Gateway at TechEd CD109 How the University of Mississippi Runs Better with NetWeaver Gateway CD160 NetWeaver Gateway Development for Beginners CD204 NetWeaver Gateway and OData in Detail CD267 Developing Applications with HTML5 Toolkit and NetWeaver Gateway MOB107 Best Practices for Establishing and Running a Mobile Landscape MOB204 Building SAP Applications Using NetWeaver Gateway and HTML5 MOB205 From Start to Finish - Developing an iPad App Using NW Gateway PMC206 NetWeaver PI and Gateway - When to Use What TEC107 NetWeaver Gateway Overview - Roadmap and Strategy
  • 47. DJ Adams Started It All!
  • 48. 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
  • 50. 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!
  • 52. Sidebar: Hyperlinks in JSON No one standard to show hyperlinks à We chose the simplest option we found: magic  keyword   rela.onship*   “links”: { “self”: “http://…”, custom  rela.onship   link  URL   “up”: “http://…”, “http://auspost.com.au/api/doc/rels/tracking”: “http://…”, … } *as  per  IANA  standard  
  • 53. ICF Configuration in SAP CRM Create  a  public  class    
  • 54. ICF Configuration in SAP CRM Assign interface IF_HTTP_EXTENSION
  • 56.
  • 57.
  • 58.
  • 59.
  • 60. Demo
  • 61. 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!
  • 63. Get the Latest Version of this Talk! http://slideshare.net/sufw This  presenta.on  by  Sascha  Wenninger  is  available  under  a  Crea.ve  Commons  A`ribu.on-­‐ShareAlike  3.0  license  
  • 64. Feedback Please complete a session evaluation for this session Session Code: CD110
  • 65. 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 SCN: http://scn.sap.com/people/dj.adams/blog/2004/06/24/forget-soap--build-real-web-services-with-the-icf Further blogs by DJ on implementing RESTful services via the ICF: http://scn.sap.com/people/dj.adams/blog/2009/09/21/a-new-rest-handler-dispatcher-for-the-icf http://scn.sap.com/people/dj.adams/blog/2010/01/07/representational-state-transfer-rest-and-sap http://scn.sap.com/people/dj.adams/blog/2009/09/30/rest-orientation-controlling-access-to-resources 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/
  • 66. Resources & Further Reading RESTful APIs from Scratch – Lessons Learnt (so far): http://scn.sap.com/community/technology-innovation/blog/2012/06/03/restful-apis-from-scratch-lessons-learnt-so-far The NetWeaver Gateway space on SCN: http://scn.sap.com/community/netweaver-gateway HTTP: An Application-Level Protocol: http://dev.opera.com/articles/view/http-basic-introduction/ HTTP: Let’s GET It On!: http://dev.opera.com/articles/view/http-lets-get-it-on/ HTTP: Response Codes: http://dev.opera.com/articles/view/http-response-codes/ Resources are not Objects: http://ruben.verborgh.org/blog/2012/09/27/the-object-resource-impedance-mismatch/ (a good read for OO programmers) Known Limitations of SAP NetWeaver Gateway: SAP Note 1574568
  • 67. 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! J