SlideShare a Scribd company logo
1 of 85
BP204 Take a REST and put your data
                    to work with APIs
                    Craig Schumann | Inner Ring Solutions




© 2013 IBM Corporation
Agenda

       Background

       Practical Examples from real life

       Designing guidelines for creating your own APIs

       How to create your own APIs and free your data




2         © 2013 IBM Corporation
House keeping

 IBM Lotus Domino®

 IBM Domino®

 IBM Lotus Notes®

 IBM Notes®

 IBM Lotus Designer®

 IBM Designer®




3
4
So much data….

 What this talk is about is freeing your data




5
Public data….

 What this talk is about is freeing your data




6
Enterprise data….

 What this talk is about is freeing your data




7
Bring it together…

 What this talk is about is freeing your data




8
All in one app

 What this talk is about is freeing your data




9
How about sharing?

 What this talk is about is freeing your data




10
What are APIs

    APIs are a way to get access to data and functionality of your application without
     providing UI.
    They can be implemented in almost every way imaginable
       ─ Android apps use public java packages, etc.
       ─ Developing an iOS application, you use the iOS API via C header files.
       ─ Web applications also have APIs in the form of Web services, or even just URLS. A
         permalink is a form of web API.



 Bottom line - An API makes it easier for other people or
  applications to access your data or features.




11     © 2013 IBM Corporation
What are APIs

    APIs have been around a long time, and it gives others access to your system via
     a public, documented interface.
    Provides public paths to into more proprietary systems.
      -     WIN32
      -     Notes BE Objects
      -     NotesCAPI
      -     iOS, Android
    They give you the ability to create new applications on top of existing data /
     platforms.


 This is not to hide all your secret sauce (though it could be)! It is more to keep things
   simple for your users. To give people access to the good stuff without burdening
   them with the details of how the back end works.


12        © 2013 IBM Corporation
What is a WEB API?

A web API is nothing more that an API (access to your stuff) that people use over
 HTTP - AKA web services

Yesterday when you talked about web services, you were talking about SOAP
 Simple Object access protocol.



Today the trend these days is to build web services around REST (REpresentational
 State Transfer). REST is literally what the wide web is based on.




13
Web Applications with public APIs

 Tell people what you had for lunch or the product you are about to launch:
     – Connections / Facebook / Twitter (https://dev.twitter.com/docs/api)

 Show your sales for the month:
     – Google Charts (https://developers.google.com/chart/)

 Send a text message from your web app
     – Twillio (http://www.twilio.com/docs/api/rest)

 Find pictures for your presentation?
     – Flickr (http://www.flickr.com/services/api/)

 Blog about your new product
     – WordPress.com REST API (http://developer.wordpress.com/docs/api/)

 Netflix
     – Pick a movie to watch now your app is launched! (http://developer.netflix.com/docs)


14     © 2013 IBM Corporation
Why create an API?

 Break apart your application and the data.

By providing an API:
     – You don't have to expose the nitty-gritty of how your app stores data.
     – You create a common way to access your data.
     – APIs force you to separate your client related code from your data related code. Then by
       doing this, anyone can create a client. And the client can be anything - mobile, desktop,
       web, native, anything.
     – If you are thinking about creating mobile versions of your applications, having an API to
       access the data will be huge.




15
Why create an API?

 Don't get caught in the idea that XPages are the only way to access Domino data.
  API access to your data can free you from a lot of constraints.
 A simple document focused API for example will make it easy to create any sort of
  mobile app you want. Want to create native iOS app? Great! Want to create a
  mobile web app? Fantastic! Do you need a desktop application? Right on! In all
  these cases, the server side has not changed at all. Your client app is merely a
  wrapper around your API!




16
17
Example - Performance

So lets say I have a web page with this
Embedded in page
Embedded in page




20
Working with data

How about this?
22
Working with data

 Start with a basic Notes view in XPages

 Add an onclick event that ties into a client side JavaScript event




23
Working with data

 Start with a basic Notes view in XPages

 Add an onclick event that ties into a client side JavaScript event
     <xp:viewPanel var="rowData" rows="10" id="viewPanel1"
     viewStyleClass="viewPanel" rowClasses="viewPanelRow">
        <xp:this.facets>
               <xp:pager partialRefresh="true" layout="Previous Group Next"
                          xp:key="headerPager" id="pager1" for="viewPanel1">
               </xp:pager>
        </xp:this.facets>
        <xp:this.data>
               <xp:dominoView var="view1"
                          databaseName="ls13irsbikes_inventory.nsf" viewName="demoView">
               </xp:dominoView>
        </xp:this.data>
        <xp:this.rowAttrs>
               <xp:attr
                   value="javascript:loadDocument('#{javascript:rowData.getUniversalID()}')"
                   name="onclick">
               </xp:attr>
        </xp:this.rowAttrs>
     [……]
     </xp:viewPanel>




24
Working with data

 The onclick event then triggers 3 things to happen
      – The full document is fetched in JSON format
      – One of the Google charts is updated with the sales for that brand of bike
      – Flickr is searched for images tagged with the brand and model of bike selected


     function loadDocument(unid){
         // get the document we have selected
         getNotesDocument( unid, "ls13/irsbikes_inventory.nsf", function(doc){
              // get related flickr images
              flickerAPIImages(doc.getItem("brand")+","+doc.getItem("model"));
              // update sales data
              googleChartsAPI(doc.getItem("brand"));
         })
     }




25
Working with data

      Step one is to get the document…

      Domino can do this for you, but it’s
       better to have a little more control
       over what you get.



     function getNotesDocument( docid, db, callback ){
         var url = './apiv1.xsp?f=document';
         url += "&db=" + db;
         url += "&documentId=" + docid;
         $.getJSON(url,function(data){
             var doc = new NotesDocument(data);
             callback(doc);
         });
     }



26
Working with data
      When you control the API, you control the data and how it is
       represented.



     function getDocument(){
         var db:NotesDatabase = session.getDatabase("", param['db']);
         var doc:NotesDocument = db.getDocumentByUNID(param['documentId']);

         try{
           var docXML = doc.generateXML();
           var writer = facesContext.getResponseWriter();
           var excon = facesContext.getExternalContext();
           excon.getResponse().setContentType("application/json");
           writer.write( org.json.XML.toJSONObject(docXML).toString());
         }
         catch(e){
             print(e.toString())
         }
     }




27
Working with data

      The chart is updated with an API call
       to get the data needed
      The chart is drawn with the Google
       charts engine using the data that is
       returned

     function googleChartsAPI(brand){
         var url = "./apiv1.xsp?f=sales&k=months";
         if( null != brand && "" != brand ){
             url += "&brand=" + brand;
         }

          $.getJSON(url, function(d) {
            [Google charts code]
          })

     }


28
Working with data

 The flicker search is done the same way.




29
Working with data

 The flicker search is done the same way…
     function flickerAPIImages(search){
     /*
      * Flickr Photo API
      * http://www.flickr.com/services/api/flickr.photos.search.html
      */

         search = search.replace(/,/g,"+");
         //
         var URL = "http://api.flickr.com/services/rest/?method=flickr.photos.search";
         url += "&api_key=<your api key goes here>";
         url += "&tags=cycling%2C+mountain&text="+search+"+%20bikes";
         url += "&per_page=5&format=json&nojsoncallback=1";
         $.getJSON( URL, function(d) {
                var source   = $("#entry-template").html();
                var template = Handlebars.compile(source);
                var context = d.photos;
                var html    = template(context);
                $('#imageInner').html(html);
         })
     }




30
Working with data

 XPages - server side is not the place to do it
    – Rendering a page should not wait for a response from some other site.
    – Things get messy quick with a mix of server side and client side code updating
      the page

 In general don't fill your page with tons of data
    – Valuable data is trapped and mixed in with the rest of the UI
    – There is a lot of different kinds of data here, from multiple sources.

 Partial refresh is not always the answer either.
    – Hard to chain things together so one value affects many others
    – could render the whole page
Data trapped in the UI???

 What happens when the client isn’t always a browser?

 Other clients might not want HTML



 Example - XSnippets




32
Example - XSnippets

 XSnippets – OpenNTF.org project
     – http://openntf.org/XSnippets.nsf/home.xsp
     – Template can be downloaded and customized at http://xsnippets.openntf.org/


 Currently there is only a web interface




33
XSnippets – browser client




                             That is enough
                                 Right?




34
XSnippets API




35
XSnippets – Designer client!




36
37
Options

    SOAP
      ─   ‘Classic’ Web services, Strong "object model"
      ─   Message based / transactional
      ─   Hard to do simple things like getting a list of things
      ─   been there done that....
    REST
      ─ resources / Object model based
      ─ resources can be anything you can create a URI for.
      ─ path oriented
          ─ database/collection (like a view)
          ─ database/collection/entity (like a document)




38    © 2013 IBM Corporation
REST

REST is not a standard. REST is a style, a way to build a web application.

That being said, REST does make use of standards. HTTP, XML, URLs

REST works with resources as collections and objects. A resource can be anything
 you are interested in. For example:

www.example.com/customers/IBM

Would be a request for the IBM customer resource. A web server can respond with a
 representation of the resource IBM.html for example, an XPage customer.xsp, or
 just an XML or JSON document with the IBM specific data.



Notice there is no “VERB” in the resource URI….




39   © 2013 IBM Corporation
REST and URLs

The key difference with a RESTfull service and a SOAP service is the way you use
 the HTTP verbs.

SOAP encourages the method to define the verb - getCustomers.

REST uses the HTTP methods* to define the operation

            GET /customers




* http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html



40   © 2013 IBM Corporation
REST - GET

You have probably head about HTTP GET. GET is the most basic action a client can
 do. With GET the client is requesting a read only copy of a resource.




41   © 2013 IBM Corporation
REST - POST

 You are also probably familiar with POST. This the most common thing to do when
  sending data back to the server - submitting a form for example.
 POST is should be used when creating or updating resources when the resulting
  URI is not known.
 RESTfull services will also make use of PUT and DELETE, and this is where a true
  RESTfull service will diverge a bit from the common use of POST.




42   © 2013 IBM Corporation
REST - PUT

 PUT is used when you are updating an existing resource.
     – PUT is used when you know the path to the resource.
     – PUT can create resources if one does not already exist



 POST vs PUT
     – POST in form submission because you don’t know what the URL to the new resource is
       going to be.
     – PUT requires the URL to resource to be known
     – HTML FORMs only support GET and POST




43     © 2013 IBM Corporation
REST - DELETE

DELETE does what it says on the tin - deletes a resource.




44   © 2013 IBM Corporation
REST verbs

 Client side JavaScript with Dojo
     dojo.xhrPut ({
         url: '/api_v1.xsp',
         putData: ‘data to send to server',
         handleAs: ‘text’,
         error: function(result) {
            // Whoops
          }
     });
 Java
     URL url;
     try {
        url = new URL(uri);
        HttpsURLConnection conn = (HttpsURLConnection)url.openConnection();
        conn.setDoInput(true);
        conn.setDoOutput(true);
        conn.setRequestMethod(“PUT");
     }

45
REST verbs – XPages example
     <?xml version="1.0" encoding="UTF-8"?>
     <xp:view xmlns:xp="http://www.ibm.com/xsp/core" rendered='false'>

      <xp:this.afterRenderResponse><![CDATA[#{javascript:

             var request = facesContext.getExternalContext().getRequest();
             var writer = facesContext.getResponseWriter();

             var method = request.getMethod();
             if( method === "GET" ){
                writer.write("You did a "GET"");
             }
             else if( method === "POST" ){
                writer.write("You did a "POST"");
             }
             else if( method === "PUT" ){
                writer.write("You did a "PUT"");
             }
             else if( method === "DELETE" ){
                writer.write("You did a "DELETE"");
             }

       }]]></xp:this.afterRenderResponse>

     </xp:view>

46
REST verbs – XPages example




47
REST verbs – XPages example

 DEV-HTTP-CLIENT (Chrome App) http://bit.ly/Wj8U67




48
REST - resources

    REST uses HTTP to provide the VERB to the resource
    Since the verb (get,post,etc) is part of the request, you shouldn't use verbs in the
     URL to the resource, only nouns.
    If your data has Objects like customers, projects, meetings, etc. the REST API
     should use the same object names



                                   www.example.com/customers?id=IBM

                                                  vs

                                www.example.com/getCustomer?customer=IBM




49     © 2013 IBM Corporation
REST

URLs should point to logical resources, not physical.

                                www.example.com/customers/IBM

                                              vs

                              www.example.com/customers/IBM.html



                                       These kinds of URLs are not easy in
                                       Domino. Luckily REST is a design
                                       principle, and not a standard!
                                       You can still design a RESTfull api with
                                       Domino.




50   © 2013 IBM Corporation
RESTful data

 RESTful APIs typically don't deal in HTML. HTML is UI, Your REST API shouldn't be
  worrying about or injecting UI
    Don’t include HTML in your RESTful data
    Strictly speaking, the format for data can be anything, but it’s usually:
           XML
           JSON/JSONP (AKA XML with curly braces).




51        © 2013 IBM Corporation
REST and errors

 Use error codes in the response
     ─ 2xx == all good
     ─ 4xx == client messed something up
     ─ 5xx == server messed something up




52   © 2013 IBM Corporation
RESTful errors




53   © 2013 IBM Corporation
API Versioning

You must version your API!
 Versioning your API means that you don't need to update all your clients
 immediately, if at all, when you add or change your API**.

     Make the version part of the resource, not a parameter. Make it explicit.

                                 www.example.com/v1/customers/IBM

                                                   vs

                                 www.example.com/customers/IBM?v=1




**You will change it, so just get it out of the way and design it into V1


54      © 2013 IBM Corporation
API Versioning




55   © 2013 IBM Corporation
API Authentication

 A RESTfull application should also be stateless. So this means that you should not
   be storing session information server side. This is Domino so you don't have much
   control over this, but in general you shouldn't be using appScope or sessionScope
   variables to store anything.
    Public / No authorization needed
    HTTP Authentication
      ─ Server handles the login
      ─ All HTTP requests must contain the login info via Authorization header
      ─ Database ACL is set to require authentication (Anonymous=No Access)
    Token Authentication
      ─ You handle the login
      ─ an API key is generated for client access. That key is used as the login credentials. Not
        really security, but limits access to the data to a known set of users and gives
        application control over who has access without having to manage the ACL
      ─ Database ACL is more open

56    © 2013 IBM Corporation
57
Old school

 &ReadViewEntries

 Supported since R6

 Gives you a dump of a view in XML or JSON format

      Pros                                       Cons
        – Built in so performance is good          – No control over the output
        – No coding needed                         – Does not support JSONP
        – XML is a little more useful than the     – There are a few bugs that can cause
          JSON version                               the JSON output to be invalid
                                                   – There is no equiv for docs so
                                                     everything you need must be in the
                                                     view
                                                   – Not really an API..




58
Old School

 demoView?readviewentries




59
Old School

 demoView?readviewentries&outputformat=json




60
POA (Plain old Agents)

 These don’t require anything special and can do all the same things we talked
  about previously.
 Can use Java or LotusScript.




61
POA (Plain old Agents)
     Sub Initialize
         Dim s As New NotesSession

         Dim db As New NotesDatabase("", "ls13/irsbikes_inventory.nsf")

         Dim docs As NotesDocumentCollection
         Set docs = db.AllDocuments
         Dim d As NotesDocument
         Set d = docs.getfirstdocument
         Print "Content-Type:application/xml"
         Print |<?xml version="1.0" encoding="UTF-8"?>|
         Print |<bikes>|
         while Not d Is Nothing
              Print "<bike>"
              Print "<brand>" + d.brand(0) + "</brand>"
              Print "<model>" + d.model(0) + "</model>"
              Print "</bike>"
              Set d = docs.Getnextdocument(d)
         Wend
         Print |</bikes>|
     End Sub




62
POA (Plain old Agents)




63
POA (Plain old Agents)
     public class JavaAgent extends AgentBase {

          public void NotesMain() {

             try {
                 Session session = getSession();
                 AgentContext agentContext = session.getAgentContext();

                 Database db = session.getDatabase("", "ls13/irsbikes_inventory.nsf");
                 DocumentCollection docs = db.getAllDocuments();
                 Document doc = docs.getFirstDocument();

                 java.io.Writer sw = new java.io.StringWriter();
                 PrintWriter ao = getAgentOutput();
                 ao.println("Content-type: text/xml");
                 ao.println("<bikes>");
                 while(null!=doc){
                    // write the document out
                    doc.generateXML(sw);
                    doc = docs.getNextDocument(doc);
                 }
                 sw.flush();
                 ao.print(sw.toString());
                 ao.println("</bikes>");

             } catch(Exception e) {
                 e.printStackTrace();
              }
         }
     }

64
Domino and REST

 Introduced in 8.5.3



 4 built in options
     – Domino Data Service
     – XPages REST Services Control
     – Custom Database Servlet
     – Custom Wink Servlet




65
Domino and REST

 Pros                                           Cons
     – Built in so support and performance is     – DDS Needs to be enabled on the
       good                                         server (admins need to be involved)
     – No coding needed                           – Very granular – database, view
     – Very granular                                properties
                                                  – URLs are not app specific. This is
                                                    Domino’s API = views and documents
                                                  – No coding – can’t really expose logical
                                                    application objects
                                                  – Not documented very well (yet)




66
Domino and REST – Domino Data Services




67
Domino and REST




68
Domino and REST – Domino Data Services




69
Domino and REST – Domino Data Services
      http://{host}/api/data
     [

         {

              "@title":"Activity Trends (MADER)",

              "@filepath":"activity.nsf",

              "@replicaid":"852578220B751506",

              "@template":"StdActivityTrendsDatabase",

              "@href":"http://localhost:80/activity.nsf/API/data/collections"

         },

         {

              "@title":"Administration Requests",

              "@filepath":"admin4.nsf",

              "@replicaid":"8525782203751506",

              "@template":"StdR4AdminRequests",

              "@href":"http://localhost:80/admin4.nsf/API/data/collections"

         },

         ……

     ]




70
Domino and REST – Domino Data Services
      http://{host}/{path}/api/data/collections
     [

         {

              "@title":"By Type",

              "@folder":false,

              "@private":false,

              "@modified":"2012-12-19T20:27:13Z",

              "@unid":"0AC52D85954AB7E785257AD9005D6E35",

              "@href":"http://localhost:80/ls13/irsbikes_inventory.nsf/API/data/collections/unid/0AC52D85954AB7E785257AD9005D6E35"

         },

         {

              "@title":"By Size",

              "@folder":false,

              "@private":false,

              "@modified":"2012-12-19T20:27:13Z",

              "@unid":"66ED263FEEC2CF7485257AD9005D3342",

              "@href":"http://localhost:80/ls13/irsbikes_inventory.nsf/API/data/collections/unid/66ED263FEEC2CF7485257AD9005D3342"

         }, ……

     ]




71
Domino and REST – Domino Data Services
      http://{host}/{path}/api/data/collections/name/{view name}
      http://{host}/{path}/api/data/collections/unid/{view unid}

     [

         {

              "@href":"http://localhost:80/ls13/irsbikes_inventory.nsf/API/data/collections/name/demoView/unid/6783AB7D38FACE2A85257AD9005BDC35",

              "@link":

              {

                   "rel":"document",

                   "href":"http://localhost:80/ls13/irsbikes_inventory.nsf/API/data/documents/unid/6783AB7D38FACE2A85257AD9005BDC35"

              },

              "@entryid":"1-6783AB7D38FACE2A85257AD9005BDC35",

              "@unid":"6783AB7D38FACE2A85257AD9005BDC35",

              "@noteid":"906",

              "@position":"1",

              "@siblings":22,

              "@form":"inventory",

              ….

         },

     …..

     ]

72
Domino and REST – REST Services Control

 The REST Services Custom Control comes with the Extension Library.

 No Coding!

 Add to an XPage and set the ‘pathInfo’ paramter.

 Different types of resources can be retrieved
     – databaseCollectionJsonService - Read the list of databases on the server.
     – viewCollectionJsonService - Read the list of views and folders in a database.
     – viewJsonService - Read the entries in a view or folder.
     – documentJsonService - Create, read, update and delete documents.

 Adds to the path for the XPage for specific resources




73
Domino and REST – REST Services Control




74
Domino and REST – REST Services Control




75
Domino and REST – REST Services Control
     http://localhost/ls13/irsbikes_web.nsf/restControl.xsp/bikes




76
Domino and REST – Domino Data Services


 More on OpenNTF
     – Niklas Heidloff - http://www.openntf.org/blogs/openntf.nsf/d6plinks/NHEF-8JGGPE
         • Documentation
         • Examples
         • Video




77
“XAgents”

 XPages with rendered=‘false’

 Can write your API in Java or Server Side JavaScript

 Keeps you in the same frame of mind as the rest of your XPages development.




78
“XAgents”

     <?xml version="1.0" encoding="UTF-8"?>
     <xp:view xmlns:xp="http://www.ibm.com/xsp/core" rendered='false'>

     <xp:this.afterRenderResponse><![CDATA[#{javascript:
         var externalContext = facesContext.getExternalContext();
         var response = externalContext.getResponse();
         var request = externalContext.getRequest();

         if( !param.containsKey("p") ){
           response.setStatus(400);
           response.setContentType("application/json");
           var writer = facesContext.getResponseWriter();
           writer.write("{ "code":400, "text":"Bad Parameter",
           "message":"Missing method call parameter 'p'" }");
           return;
         }

         var s = new org.openntf.api.snippet();
         s.service( request, response);
     }]]>
     </xp:this.afterRenderResponse>
     </xp:view>



79
“Xagents” + JAVA = Happy

     <?xml version="1.0" encoding="UTF-8"?>
     <xp:view xmlns:xp="http://www.ibm.com/xsp/core" rendered='false'>

     <xp:this.afterRenderResponse><![CDATA[#{javascript:
         var externalContext = facesContext.getExternalContext();
         var response = externalContext.getResponse();
         var request = externalContext.getRequest();

         if( !param.containsKey("p") ){
           response.setStatus(400);
           response.setContentType("application/json");
           var writer = facesContext.getResponseWriter();
           writer.write("{ "code":400, "text":"Bad Parameter",
                     "message":"Missing method call parameter
         'p'" }");
           return;
         }

         var s = new org.openntf.api.snippet();
         s.service( request, response);
     }]]>
     </xp:this.afterRenderResponse>
     </xp:view>


80
Demo Time – Custom App!

 Inner Ring Bike shop.
     – Using Notes for inventory and sales

     – Wants to add a web interface, and also add some pizzazz with graphs and photos.




81
For more…

 Presentation download
     – http://www.innerringsolutions.com/Connect2013/bp204.pdf


 Demo database download
     – http://www.innerringsolutions.com/Connect2013/bp204_demo.zip




82
Thanks!!

     Craig Schumann
     I nner Ri ng Sol ut i ons, LLC
     http://blog.innerringsolutions.com
          @ZOPEFF
              www. l i nkedi n. com i n/ cr ai gschum
                                   /                 an
              n/




83      © 2013 IBM Corporation
84
Legal disclaimer
     © IBM Corporation 2013. All Rights Reserved.
     The information contained in this publication is provided for informational purposes only. While efforts were made to verify the completeness and accuracy of the information contained in this publication, it is provided
              AS IS without warranty of any kind, express or implied. In addition, this information is based on IBM’s current product plans and strategy, which are subject to change by IBM without notice. IBM shall not be
              responsible for any damages arising out of the use of, or otherwise related to, this publication or any other materials. Nothing contained in this publication is intended to, nor shall have the effect of, creating
              any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software.
     References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced in this
             presentation may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way.
             Nothing contained in these materials is intended to, nor shall have the effect of, stating or implying that any activities undertaken by you will result in any specific sales, revenue growth or other results.
     Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.
     Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other countries, or both.
     Flickr is a trademarks of Yahoo Inc. in the United States, other countries, or both.
     Google is a trademarks of Google Inc. in the United States, other countries, or both.
     All references to Inner Ring Bike Shop refer to a fictitious company and are used for illustration purposes only.




85           © 2013 IBM Corporation

More Related Content

What's hot

Domino policies deep dive
Domino policies deep diveDomino policies deep dive
Domino policies deep diveMartijn de Jong
 
What is new in Notes & Domino Deleopment V10.x
What is new in Notes & Domino Deleopment V10.xWhat is new in Notes & Domino Deleopment V10.x
What is new in Notes & Domino Deleopment V10.xUlrich Krause
 
HCL Sametime V11 installation - tips
HCL Sametime V11 installation - tipsHCL Sametime V11 installation - tips
HCL Sametime V11 installation - tipsAles Lichtenberg
 
How to use the new Domino Query Language
How to use the new Domino Query LanguageHow to use the new Domino Query Language
How to use the new Domino Query LanguageTim Davis
 
Domino OSGi Development
Domino OSGi DevelopmentDomino OSGi Development
Domino OSGi DevelopmentPaul Fiore
 
DNUG HCL Domino 11 First Look
DNUG HCL Domino 11 First LookDNUG HCL Domino 11 First Look
DNUG HCL Domino 11 First Lookdaniel_nashed
 
MES102 - Verse on Premises 2.0 Best Practices
MES102 - Verse on Premises 2.0 Best PracticesMES102 - Verse on Premises 2.0 Best Practices
MES102 - Verse on Premises 2.0 Best PracticesDylan Redfield
 
June OpenNTF Webinar - Domino V12 Certification Manager
June OpenNTF Webinar - Domino V12 Certification ManagerJune OpenNTF Webinar - Domino V12 Certification Manager
June OpenNTF Webinar - Domino V12 Certification ManagerHoward Greenberg
 
dominocamp2022.t1s1.dde.pptx
dominocamp2022.t1s1.dde.pptxdominocamp2022.t1s1.dde.pptx
dominocamp2022.t1s1.dde.pptxUlrich Krause
 
The View - Lotusscript coding best practices
The View - Lotusscript coding best practicesThe View - Lotusscript coding best practices
The View - Lotusscript coding best practicesBill Buchan
 
RNUG - HCL Notes V11 Performance Boost
RNUG - HCL Notes V11 Performance BoostRNUG - HCL Notes V11 Performance Boost
RNUG - HCL Notes V11 Performance BoostChristoph Adler
 
Introduction to ansible
Introduction to ansibleIntroduction to ansible
Introduction to ansibleOmid Vahdaty
 
Important tips on Router and SMTP mail routing
Important tips on Router and SMTP mail routingImportant tips on Router and SMTP mail routing
Important tips on Router and SMTP mail routingjayeshpar2006
 
Ugprade HCL Sametime V11.5 to V11.6 - Step by Step
Ugprade HCL Sametime V11.5 to V11.6 - Step by StepUgprade HCL Sametime V11.5 to V11.6 - Step by Step
Ugprade HCL Sametime V11.5 to V11.6 - Step by StepAles Lichtenberg
 
Engage 2015 - 10 Mistakes You and Every XPages Developer Make. Yes, I said YOU!
Engage 2015 - 10 Mistakes You and Every XPages Developer Make. Yes, I said YOU!Engage 2015 - 10 Mistakes You and Every XPages Developer Make. Yes, I said YOU!
Engage 2015 - 10 Mistakes You and Every XPages Developer Make. Yes, I said YOU!Serdar Basegmez
 
INF104 - HCL Domino AppDev Pack – The Future of Domino App Dev Nobody Knows A...
INF104 - HCL Domino AppDev Pack – The Future of Domino App Dev Nobody Knows A...INF104 - HCL Domino AppDev Pack – The Future of Domino App Dev Nobody Knows A...
INF104 - HCL Domino AppDev Pack – The Future of Domino App Dev Nobody Knows A...Heiko Voigt
 
Getting started with Ansible
Getting started with AnsibleGetting started with Ansible
Getting started with AnsibleIvan Serdyuk
 
IBM Domino / IBM Notes Performance Tuning
IBM Domino / IBM Notes Performance Tuning IBM Domino / IBM Notes Performance Tuning
IBM Domino / IBM Notes Performance Tuning Vladislav Tatarincev
 
NGINX: Basics and Best Practices
NGINX: Basics and Best PracticesNGINX: Basics and Best Practices
NGINX: Basics and Best PracticesNGINX, Inc.
 
HCL Domino V12 Key Security Features Overview
HCL Domino V12 Key Security Features Overview HCL Domino V12 Key Security Features Overview
HCL Domino V12 Key Security Features Overview hemantnaik
 

What's hot (20)

Domino policies deep dive
Domino policies deep diveDomino policies deep dive
Domino policies deep dive
 
What is new in Notes & Domino Deleopment V10.x
What is new in Notes & Domino Deleopment V10.xWhat is new in Notes & Domino Deleopment V10.x
What is new in Notes & Domino Deleopment V10.x
 
HCL Sametime V11 installation - tips
HCL Sametime V11 installation - tipsHCL Sametime V11 installation - tips
HCL Sametime V11 installation - tips
 
How to use the new Domino Query Language
How to use the new Domino Query LanguageHow to use the new Domino Query Language
How to use the new Domino Query Language
 
Domino OSGi Development
Domino OSGi DevelopmentDomino OSGi Development
Domino OSGi Development
 
DNUG HCL Domino 11 First Look
DNUG HCL Domino 11 First LookDNUG HCL Domino 11 First Look
DNUG HCL Domino 11 First Look
 
MES102 - Verse on Premises 2.0 Best Practices
MES102 - Verse on Premises 2.0 Best PracticesMES102 - Verse on Premises 2.0 Best Practices
MES102 - Verse on Premises 2.0 Best Practices
 
June OpenNTF Webinar - Domino V12 Certification Manager
June OpenNTF Webinar - Domino V12 Certification ManagerJune OpenNTF Webinar - Domino V12 Certification Manager
June OpenNTF Webinar - Domino V12 Certification Manager
 
dominocamp2022.t1s1.dde.pptx
dominocamp2022.t1s1.dde.pptxdominocamp2022.t1s1.dde.pptx
dominocamp2022.t1s1.dde.pptx
 
The View - Lotusscript coding best practices
The View - Lotusscript coding best practicesThe View - Lotusscript coding best practices
The View - Lotusscript coding best practices
 
RNUG - HCL Notes V11 Performance Boost
RNUG - HCL Notes V11 Performance BoostRNUG - HCL Notes V11 Performance Boost
RNUG - HCL Notes V11 Performance Boost
 
Introduction to ansible
Introduction to ansibleIntroduction to ansible
Introduction to ansible
 
Important tips on Router and SMTP mail routing
Important tips on Router and SMTP mail routingImportant tips on Router and SMTP mail routing
Important tips on Router and SMTP mail routing
 
Ugprade HCL Sametime V11.5 to V11.6 - Step by Step
Ugprade HCL Sametime V11.5 to V11.6 - Step by StepUgprade HCL Sametime V11.5 to V11.6 - Step by Step
Ugprade HCL Sametime V11.5 to V11.6 - Step by Step
 
Engage 2015 - 10 Mistakes You and Every XPages Developer Make. Yes, I said YOU!
Engage 2015 - 10 Mistakes You and Every XPages Developer Make. Yes, I said YOU!Engage 2015 - 10 Mistakes You and Every XPages Developer Make. Yes, I said YOU!
Engage 2015 - 10 Mistakes You and Every XPages Developer Make. Yes, I said YOU!
 
INF104 - HCL Domino AppDev Pack – The Future of Domino App Dev Nobody Knows A...
INF104 - HCL Domino AppDev Pack – The Future of Domino App Dev Nobody Knows A...INF104 - HCL Domino AppDev Pack – The Future of Domino App Dev Nobody Knows A...
INF104 - HCL Domino AppDev Pack – The Future of Domino App Dev Nobody Knows A...
 
Getting started with Ansible
Getting started with AnsibleGetting started with Ansible
Getting started with Ansible
 
IBM Domino / IBM Notes Performance Tuning
IBM Domino / IBM Notes Performance Tuning IBM Domino / IBM Notes Performance Tuning
IBM Domino / IBM Notes Performance Tuning
 
NGINX: Basics and Best Practices
NGINX: Basics and Best PracticesNGINX: Basics and Best Practices
NGINX: Basics and Best Practices
 
HCL Domino V12 Key Security Features Overview
HCL Domino V12 Key Security Features Overview HCL Domino V12 Key Security Features Overview
HCL Domino V12 Key Security Features Overview
 

Viewers also liked

REST services and IBM Domino/XWork - DanNotes 19-20. november 2014
REST services and IBM Domino/XWork - DanNotes 19-20. november 2014REST services and IBM Domino/XWork - DanNotes 19-20. november 2014
REST services and IBM Domino/XWork - DanNotes 19-20. november 2014John Dalsgaard
 
Connect 2014 - EXTJS in XPages: Modernizing IBM Notes Views Without Sacrifici...
Connect 2014 - EXTJS in XPages: Modernizing IBM Notes Views Without Sacrifici...Connect 2014 - EXTJS in XPages: Modernizing IBM Notes Views Without Sacrifici...
Connect 2014 - EXTJS in XPages: Modernizing IBM Notes Views Without Sacrifici...Mark Roden
 
MWLUG 2015 - AD114 Take Your XPages Development to the Next Level
MWLUG 2015 - AD114 Take Your XPages Development to the Next LevelMWLUG 2015 - AD114 Take Your XPages Development to the Next Level
MWLUG 2015 - AD114 Take Your XPages Development to the Next Levelbalassaitis
 
HTTP - The Other Face Of Domino
HTTP - The Other Face Of DominoHTTP - The Other Face Of Domino
HTTP - The Other Face Of DominoGabriella Davis
 
ConnectED2015: IBM Domino Applications in Bluemix
ConnectED2015: 	IBM Domino Applications in BluemixConnectED2015: 	IBM Domino Applications in Bluemix
ConnectED2015: IBM Domino Applications in BluemixMartin Donnelly
 
Building mobile applications with Vaadin TouchKit
Building mobile applications with Vaadin TouchKitBuilding mobile applications with Vaadin TouchKit
Building mobile applications with Vaadin TouchKitSami Ekblad
 
Fun With SHA2 Certificates
Fun With SHA2 CertificatesFun With SHA2 Certificates
Fun With SHA2 CertificatesGabriella Davis
 
IBM Presents the IBM Notes and Domino Roadmap
IBM Presents the IBM Notes and Domino RoadmapIBM Presents the IBM Notes and Domino Roadmap
IBM Presents the IBM Notes and Domino RoadmapTeamstudio
 
Jak zlepšit zabezpečení čtvrtiny celého webu
Jak zlepšit zabezpečení čtvrtiny celého webuJak zlepšit zabezpečení čtvrtiny celého webu
Jak zlepšit zabezpečení čtvrtiny celého webuMichal Špaček
 
Types and components of computer system
Types and components of computer systemTypes and components of computer system
Types and components of computer systemmkhisalg
 
Introduction to Basic Computer Concepts Presentation
Introduction to Basic Computer Concepts PresentationIntroduction to Basic Computer Concepts Presentation
Introduction to Basic Computer Concepts PresentationAna Tan
 
Computer Basics 101 Slide Show Presentation
Computer Basics 101 Slide Show PresentationComputer Basics 101 Slide Show Presentation
Computer Basics 101 Slide Show Presentationsluget
 
Components of a computer system
Components of a computer systemComponents of a computer system
Components of a computer systemlistergc
 

Viewers also liked (14)

REST services and IBM Domino/XWork - DanNotes 19-20. november 2014
REST services and IBM Domino/XWork - DanNotes 19-20. november 2014REST services and IBM Domino/XWork - DanNotes 19-20. november 2014
REST services and IBM Domino/XWork - DanNotes 19-20. november 2014
 
Connect 2014 - EXTJS in XPages: Modernizing IBM Notes Views Without Sacrifici...
Connect 2014 - EXTJS in XPages: Modernizing IBM Notes Views Without Sacrifici...Connect 2014 - EXTJS in XPages: Modernizing IBM Notes Views Without Sacrifici...
Connect 2014 - EXTJS in XPages: Modernizing IBM Notes Views Without Sacrifici...
 
MWLUG 2015 - AD114 Take Your XPages Development to the Next Level
MWLUG 2015 - AD114 Take Your XPages Development to the Next LevelMWLUG 2015 - AD114 Take Your XPages Development to the Next Level
MWLUG 2015 - AD114 Take Your XPages Development to the Next Level
 
HTTP - The Other Face Of Domino
HTTP - The Other Face Of DominoHTTP - The Other Face Of Domino
HTTP - The Other Face Of Domino
 
ConnectED2015: IBM Domino Applications in Bluemix
ConnectED2015: 	IBM Domino Applications in BluemixConnectED2015: 	IBM Domino Applications in Bluemix
ConnectED2015: IBM Domino Applications in Bluemix
 
Building mobile applications with Vaadin TouchKit
Building mobile applications with Vaadin TouchKitBuilding mobile applications with Vaadin TouchKit
Building mobile applications with Vaadin TouchKit
 
Fun With SHA2 Certificates
Fun With SHA2 CertificatesFun With SHA2 Certificates
Fun With SHA2 Certificates
 
Basic Computer Skills Seminar
Basic Computer Skills Seminar Basic Computer Skills Seminar
Basic Computer Skills Seminar
 
IBM Presents the IBM Notes and Domino Roadmap
IBM Presents the IBM Notes and Domino RoadmapIBM Presents the IBM Notes and Domino Roadmap
IBM Presents the IBM Notes and Domino Roadmap
 
Jak zlepšit zabezpečení čtvrtiny celého webu
Jak zlepšit zabezpečení čtvrtiny celého webuJak zlepšit zabezpečení čtvrtiny celého webu
Jak zlepšit zabezpečení čtvrtiny celého webu
 
Types and components of computer system
Types and components of computer systemTypes and components of computer system
Types and components of computer system
 
Introduction to Basic Computer Concepts Presentation
Introduction to Basic Computer Concepts PresentationIntroduction to Basic Computer Concepts Presentation
Introduction to Basic Computer Concepts Presentation
 
Computer Basics 101 Slide Show Presentation
Computer Basics 101 Slide Show PresentationComputer Basics 101 Slide Show Presentation
Computer Basics 101 Slide Show Presentation
 
Components of a computer system
Components of a computer systemComponents of a computer system
Components of a computer system
 

Similar to BP204 - Take a REST and put your data to work with APIs!

Advanced Web Development
Advanced Web DevelopmentAdvanced Web Development
Advanced Web DevelopmentRobert J. Stein
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...Fabio Franzini
 
Google Cloud lightning talk @MHacks
Google Cloud lightning talk @MHacksGoogle Cloud lightning talk @MHacks
Google Cloud lightning talk @MHackswesley chun
 
Serverless ML Workshop with Hopsworks at PyData Seattle
Serverless ML Workshop with Hopsworks at PyData SeattleServerless ML Workshop with Hopsworks at PyData Seattle
Serverless ML Workshop with Hopsworks at PyData SeattleJim Dowling
 
Ajaxworld Opensocial Presentation
Ajaxworld Opensocial PresentationAjaxworld Opensocial Presentation
Ajaxworld Opensocial PresentationChris Schalk
 
Getting Started with DrupalGap
Getting Started with DrupalGapGetting Started with DrupalGap
Getting Started with DrupalGapAlex S
 
Having Fun Building Web Applications (Day 1 Slides)
Having Fun Building Web Applications (Day 1 Slides)Having Fun Building Web Applications (Day 1 Slides)
Having Fun Building Web Applications (Day 1 Slides)Clarence Ngoh
 
Semantic technologies in practice - KULeuven 2016
Semantic technologies in practice - KULeuven 2016Semantic technologies in practice - KULeuven 2016
Semantic technologies in practice - KULeuven 2016Aad Versteden
 
Opensocial Haifa Seminar - 2008.04.08
Opensocial Haifa Seminar - 2008.04.08Opensocial Haifa Seminar - 2008.04.08
Opensocial Haifa Seminar - 2008.04.08Ari Leichtberg
 
From Knowledge Graphs to AI-powered SEO: Using taxonomies, schemas and knowle...
From Knowledge Graphs to AI-powered SEO: Using taxonomies, schemas and knowle...From Knowledge Graphs to AI-powered SEO: Using taxonomies, schemas and knowle...
From Knowledge Graphs to AI-powered SEO: Using taxonomies, schemas and knowle...Connected Data World
 
Entrepreneurship Tips With HTML5 & App Engine Startup Weekend (June 2012)
Entrepreneurship Tips With HTML5 & App Engine Startup Weekend (June 2012)Entrepreneurship Tips With HTML5 & App Engine Startup Weekend (June 2012)
Entrepreneurship Tips With HTML5 & App Engine Startup Weekend (June 2012)Ido Green
 
Rits Brown Bag - Salesforce Lightning
Rits Brown Bag - Salesforce LightningRits Brown Bag - Salesforce Lightning
Rits Brown Bag - Salesforce LightningRight IT Services
 
Microsoft Graph: Connect to essential data every app needs
Microsoft Graph: Connect to essential data every app needsMicrosoft Graph: Connect to essential data every app needs
Microsoft Graph: Connect to essential data every app needsMicrosoft Tech Community
 
Microsoft Graph: Connect to essential data every app needs
Microsoft Graph: Connect to essential data every app needsMicrosoft Graph: Connect to essential data every app needs
Microsoft Graph: Connect to essential data every app needsMicrosoft Tech Community
 
Serverless GraphQL for Product Developers
Serverless GraphQL for Product DevelopersServerless GraphQL for Product Developers
Serverless GraphQL for Product DevelopersSashko Stubailo
 
Intro to jQuery @ Startup Institute
Intro to jQuery @ Startup InstituteIntro to jQuery @ Startup Institute
Intro to jQuery @ Startup InstituteRafael Gonzaque
 
Build a notepad application with PHP, MongoDB, and IBM Bluemix - by Vikram Va...
Build a notepad application with PHP, MongoDB, and IBM Bluemix - by Vikram Va...Build a notepad application with PHP, MongoDB, and IBM Bluemix - by Vikram Va...
Build a notepad application with PHP, MongoDB, and IBM Bluemix - by Vikram Va...Carlos Tomas
 

Similar to BP204 - Take a REST and put your data to work with APIs! (20)

Advanced Web Development
Advanced Web DevelopmentAdvanced Web Development
Advanced Web Development
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
 
Google Cloud lightning talk @MHacks
Google Cloud lightning talk @MHacksGoogle Cloud lightning talk @MHacks
Google Cloud lightning talk @MHacks
 
Uma SunilKumar Resume
Uma SunilKumar ResumeUma SunilKumar Resume
Uma SunilKumar Resume
 
Serverless ML Workshop with Hopsworks at PyData Seattle
Serverless ML Workshop with Hopsworks at PyData SeattleServerless ML Workshop with Hopsworks at PyData Seattle
Serverless ML Workshop with Hopsworks at PyData Seattle
 
Ajaxworld Opensocial Presentation
Ajaxworld Opensocial PresentationAjaxworld Opensocial Presentation
Ajaxworld Opensocial Presentation
 
Xamarin microsoft graph
Xamarin microsoft graphXamarin microsoft graph
Xamarin microsoft graph
 
Mobile optimization
Mobile optimizationMobile optimization
Mobile optimization
 
Getting Started with DrupalGap
Getting Started with DrupalGapGetting Started with DrupalGap
Getting Started with DrupalGap
 
Having Fun Building Web Applications (Day 1 Slides)
Having Fun Building Web Applications (Day 1 Slides)Having Fun Building Web Applications (Day 1 Slides)
Having Fun Building Web Applications (Day 1 Slides)
 
Semantic technologies in practice - KULeuven 2016
Semantic technologies in practice - KULeuven 2016Semantic technologies in practice - KULeuven 2016
Semantic technologies in practice - KULeuven 2016
 
Opensocial Haifa Seminar - 2008.04.08
Opensocial Haifa Seminar - 2008.04.08Opensocial Haifa Seminar - 2008.04.08
Opensocial Haifa Seminar - 2008.04.08
 
From Knowledge Graphs to AI-powered SEO: Using taxonomies, schemas and knowle...
From Knowledge Graphs to AI-powered SEO: Using taxonomies, schemas and knowle...From Knowledge Graphs to AI-powered SEO: Using taxonomies, schemas and knowle...
From Knowledge Graphs to AI-powered SEO: Using taxonomies, schemas and knowle...
 
Entrepreneurship Tips With HTML5 & App Engine Startup Weekend (June 2012)
Entrepreneurship Tips With HTML5 & App Engine Startup Weekend (June 2012)Entrepreneurship Tips With HTML5 & App Engine Startup Weekend (June 2012)
Entrepreneurship Tips With HTML5 & App Engine Startup Weekend (June 2012)
 
Rits Brown Bag - Salesforce Lightning
Rits Brown Bag - Salesforce LightningRits Brown Bag - Salesforce Lightning
Rits Brown Bag - Salesforce Lightning
 
Microsoft Graph: Connect to essential data every app needs
Microsoft Graph: Connect to essential data every app needsMicrosoft Graph: Connect to essential data every app needs
Microsoft Graph: Connect to essential data every app needs
 
Microsoft Graph: Connect to essential data every app needs
Microsoft Graph: Connect to essential data every app needsMicrosoft Graph: Connect to essential data every app needs
Microsoft Graph: Connect to essential data every app needs
 
Serverless GraphQL for Product Developers
Serverless GraphQL for Product DevelopersServerless GraphQL for Product Developers
Serverless GraphQL for Product Developers
 
Intro to jQuery @ Startup Institute
Intro to jQuery @ Startup InstituteIntro to jQuery @ Startup Institute
Intro to jQuery @ Startup Institute
 
Build a notepad application with PHP, MongoDB, and IBM Bluemix - by Vikram Va...
Build a notepad application with PHP, MongoDB, and IBM Bluemix - by Vikram Va...Build a notepad application with PHP, MongoDB, and IBM Bluemix - by Vikram Va...
Build a notepad application with PHP, MongoDB, and IBM Bluemix - by Vikram Va...
 

Recently uploaded

Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 

Recently uploaded (20)

Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 

BP204 - Take a REST and put your data to work with APIs!

  • 1. BP204 Take a REST and put your data to work with APIs Craig Schumann | Inner Ring Solutions © 2013 IBM Corporation
  • 2. Agenda  Background  Practical Examples from real life  Designing guidelines for creating your own APIs  How to create your own APIs and free your data 2 © 2013 IBM Corporation
  • 3. House keeping  IBM Lotus Domino®  IBM Domino®  IBM Lotus Notes®  IBM Notes®  IBM Lotus Designer®  IBM Designer® 3
  • 4. 4
  • 5. So much data….  What this talk is about is freeing your data 5
  • 6. Public data….  What this talk is about is freeing your data 6
  • 7. Enterprise data….  What this talk is about is freeing your data 7
  • 8. Bring it together…  What this talk is about is freeing your data 8
  • 9. All in one app  What this talk is about is freeing your data 9
  • 10. How about sharing?  What this talk is about is freeing your data 10
  • 11. What are APIs  APIs are a way to get access to data and functionality of your application without providing UI.  They can be implemented in almost every way imaginable ─ Android apps use public java packages, etc. ─ Developing an iOS application, you use the iOS API via C header files. ─ Web applications also have APIs in the form of Web services, or even just URLS. A permalink is a form of web API. Bottom line - An API makes it easier for other people or applications to access your data or features. 11 © 2013 IBM Corporation
  • 12. What are APIs  APIs have been around a long time, and it gives others access to your system via a public, documented interface.  Provides public paths to into more proprietary systems. - WIN32 - Notes BE Objects - NotesCAPI - iOS, Android  They give you the ability to create new applications on top of existing data / platforms. This is not to hide all your secret sauce (though it could be)! It is more to keep things simple for your users. To give people access to the good stuff without burdening them with the details of how the back end works. 12 © 2013 IBM Corporation
  • 13. What is a WEB API? A web API is nothing more that an API (access to your stuff) that people use over HTTP - AKA web services Yesterday when you talked about web services, you were talking about SOAP Simple Object access protocol. Today the trend these days is to build web services around REST (REpresentational State Transfer). REST is literally what the wide web is based on. 13
  • 14. Web Applications with public APIs  Tell people what you had for lunch or the product you are about to launch: – Connections / Facebook / Twitter (https://dev.twitter.com/docs/api)  Show your sales for the month: – Google Charts (https://developers.google.com/chart/)  Send a text message from your web app – Twillio (http://www.twilio.com/docs/api/rest)  Find pictures for your presentation? – Flickr (http://www.flickr.com/services/api/)  Blog about your new product – WordPress.com REST API (http://developer.wordpress.com/docs/api/)  Netflix – Pick a movie to watch now your app is launched! (http://developer.netflix.com/docs) 14 © 2013 IBM Corporation
  • 15. Why create an API?  Break apart your application and the data. By providing an API: – You don't have to expose the nitty-gritty of how your app stores data. – You create a common way to access your data. – APIs force you to separate your client related code from your data related code. Then by doing this, anyone can create a client. And the client can be anything - mobile, desktop, web, native, anything. – If you are thinking about creating mobile versions of your applications, having an API to access the data will be huge. 15
  • 16. Why create an API?  Don't get caught in the idea that XPages are the only way to access Domino data. API access to your data can free you from a lot of constraints.  A simple document focused API for example will make it easy to create any sort of mobile app you want. Want to create native iOS app? Great! Want to create a mobile web app? Fantastic! Do you need a desktop application? Right on! In all these cases, the server side has not changed at all. Your client app is merely a wrapper around your API! 16
  • 17. 17
  • 18. Example - Performance So lets say I have a web page with this
  • 21. Working with data How about this?
  • 22. 22
  • 23. Working with data  Start with a basic Notes view in XPages  Add an onclick event that ties into a client side JavaScript event 23
  • 24. Working with data  Start with a basic Notes view in XPages  Add an onclick event that ties into a client side JavaScript event <xp:viewPanel var="rowData" rows="10" id="viewPanel1" viewStyleClass="viewPanel" rowClasses="viewPanelRow"> <xp:this.facets> <xp:pager partialRefresh="true" layout="Previous Group Next" xp:key="headerPager" id="pager1" for="viewPanel1"> </xp:pager> </xp:this.facets> <xp:this.data> <xp:dominoView var="view1" databaseName="ls13irsbikes_inventory.nsf" viewName="demoView"> </xp:dominoView> </xp:this.data> <xp:this.rowAttrs> <xp:attr value="javascript:loadDocument('#{javascript:rowData.getUniversalID()}')" name="onclick"> </xp:attr> </xp:this.rowAttrs> [……] </xp:viewPanel> 24
  • 25. Working with data  The onclick event then triggers 3 things to happen – The full document is fetched in JSON format – One of the Google charts is updated with the sales for that brand of bike – Flickr is searched for images tagged with the brand and model of bike selected function loadDocument(unid){ // get the document we have selected getNotesDocument( unid, "ls13/irsbikes_inventory.nsf", function(doc){ // get related flickr images flickerAPIImages(doc.getItem("brand")+","+doc.getItem("model")); // update sales data googleChartsAPI(doc.getItem("brand")); }) } 25
  • 26. Working with data  Step one is to get the document…  Domino can do this for you, but it’s better to have a little more control over what you get. function getNotesDocument( docid, db, callback ){ var url = './apiv1.xsp?f=document'; url += "&db=" + db; url += "&documentId=" + docid; $.getJSON(url,function(data){ var doc = new NotesDocument(data); callback(doc); }); } 26
  • 27. Working with data  When you control the API, you control the data and how it is represented. function getDocument(){ var db:NotesDatabase = session.getDatabase("", param['db']); var doc:NotesDocument = db.getDocumentByUNID(param['documentId']); try{ var docXML = doc.generateXML(); var writer = facesContext.getResponseWriter(); var excon = facesContext.getExternalContext(); excon.getResponse().setContentType("application/json"); writer.write( org.json.XML.toJSONObject(docXML).toString()); } catch(e){ print(e.toString()) } } 27
  • 28. Working with data  The chart is updated with an API call to get the data needed  The chart is drawn with the Google charts engine using the data that is returned function googleChartsAPI(brand){ var url = "./apiv1.xsp?f=sales&k=months"; if( null != brand && "" != brand ){ url += "&brand=" + brand; } $.getJSON(url, function(d) { [Google charts code] }) } 28
  • 29. Working with data  The flicker search is done the same way. 29
  • 30. Working with data  The flicker search is done the same way… function flickerAPIImages(search){ /* * Flickr Photo API * http://www.flickr.com/services/api/flickr.photos.search.html */ search = search.replace(/,/g,"+"); // var URL = "http://api.flickr.com/services/rest/?method=flickr.photos.search"; url += "&api_key=<your api key goes here>"; url += "&tags=cycling%2C+mountain&text="+search+"+%20bikes"; url += "&per_page=5&format=json&nojsoncallback=1"; $.getJSON( URL, function(d) { var source = $("#entry-template").html(); var template = Handlebars.compile(source); var context = d.photos; var html = template(context); $('#imageInner').html(html); }) } 30
  • 31. Working with data  XPages - server side is not the place to do it – Rendering a page should not wait for a response from some other site. – Things get messy quick with a mix of server side and client side code updating the page  In general don't fill your page with tons of data – Valuable data is trapped and mixed in with the rest of the UI – There is a lot of different kinds of data here, from multiple sources.  Partial refresh is not always the answer either. – Hard to chain things together so one value affects many others – could render the whole page
  • 32. Data trapped in the UI???  What happens when the client isn’t always a browser?  Other clients might not want HTML  Example - XSnippets 32
  • 33. Example - XSnippets  XSnippets – OpenNTF.org project – http://openntf.org/XSnippets.nsf/home.xsp – Template can be downloaded and customized at http://xsnippets.openntf.org/  Currently there is only a web interface 33
  • 34. XSnippets – browser client That is enough Right? 34
  • 37. 37
  • 38. Options  SOAP ─ ‘Classic’ Web services, Strong "object model" ─ Message based / transactional ─ Hard to do simple things like getting a list of things ─ been there done that....  REST ─ resources / Object model based ─ resources can be anything you can create a URI for. ─ path oriented ─ database/collection (like a view) ─ database/collection/entity (like a document) 38 © 2013 IBM Corporation
  • 39. REST REST is not a standard. REST is a style, a way to build a web application. That being said, REST does make use of standards. HTTP, XML, URLs REST works with resources as collections and objects. A resource can be anything you are interested in. For example: www.example.com/customers/IBM Would be a request for the IBM customer resource. A web server can respond with a representation of the resource IBM.html for example, an XPage customer.xsp, or just an XML or JSON document with the IBM specific data. Notice there is no “VERB” in the resource URI…. 39 © 2013 IBM Corporation
  • 40. REST and URLs The key difference with a RESTfull service and a SOAP service is the way you use the HTTP verbs. SOAP encourages the method to define the verb - getCustomers. REST uses the HTTP methods* to define the operation GET /customers * http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html 40 © 2013 IBM Corporation
  • 41. REST - GET You have probably head about HTTP GET. GET is the most basic action a client can do. With GET the client is requesting a read only copy of a resource. 41 © 2013 IBM Corporation
  • 42. REST - POST  You are also probably familiar with POST. This the most common thing to do when sending data back to the server - submitting a form for example.  POST is should be used when creating or updating resources when the resulting URI is not known.  RESTfull services will also make use of PUT and DELETE, and this is where a true RESTfull service will diverge a bit from the common use of POST. 42 © 2013 IBM Corporation
  • 43. REST - PUT  PUT is used when you are updating an existing resource. – PUT is used when you know the path to the resource. – PUT can create resources if one does not already exist  POST vs PUT – POST in form submission because you don’t know what the URL to the new resource is going to be. – PUT requires the URL to resource to be known – HTML FORMs only support GET and POST 43 © 2013 IBM Corporation
  • 44. REST - DELETE DELETE does what it says on the tin - deletes a resource. 44 © 2013 IBM Corporation
  • 45. REST verbs  Client side JavaScript with Dojo dojo.xhrPut ({ url: '/api_v1.xsp', putData: ‘data to send to server', handleAs: ‘text’, error: function(result) { // Whoops } });  Java URL url; try { url = new URL(uri); HttpsURLConnection conn = (HttpsURLConnection)url.openConnection(); conn.setDoInput(true); conn.setDoOutput(true); conn.setRequestMethod(“PUT"); } 45
  • 46. REST verbs – XPages example <?xml version="1.0" encoding="UTF-8"?> <xp:view xmlns:xp="http://www.ibm.com/xsp/core" rendered='false'> <xp:this.afterRenderResponse><![CDATA[#{javascript: var request = facesContext.getExternalContext().getRequest(); var writer = facesContext.getResponseWriter(); var method = request.getMethod(); if( method === "GET" ){ writer.write("You did a "GET""); } else if( method === "POST" ){ writer.write("You did a "POST""); } else if( method === "PUT" ){ writer.write("You did a "PUT""); } else if( method === "DELETE" ){ writer.write("You did a "DELETE""); } }]]></xp:this.afterRenderResponse> </xp:view> 46
  • 47. REST verbs – XPages example 47
  • 48. REST verbs – XPages example DEV-HTTP-CLIENT (Chrome App) http://bit.ly/Wj8U67 48
  • 49. REST - resources  REST uses HTTP to provide the VERB to the resource  Since the verb (get,post,etc) is part of the request, you shouldn't use verbs in the URL to the resource, only nouns.  If your data has Objects like customers, projects, meetings, etc. the REST API should use the same object names www.example.com/customers?id=IBM vs www.example.com/getCustomer?customer=IBM 49 © 2013 IBM Corporation
  • 50. REST URLs should point to logical resources, not physical. www.example.com/customers/IBM vs www.example.com/customers/IBM.html These kinds of URLs are not easy in Domino. Luckily REST is a design principle, and not a standard! You can still design a RESTfull api with Domino. 50 © 2013 IBM Corporation
  • 51. RESTful data RESTful APIs typically don't deal in HTML. HTML is UI, Your REST API shouldn't be worrying about or injecting UI  Don’t include HTML in your RESTful data  Strictly speaking, the format for data can be anything, but it’s usually:  XML  JSON/JSONP (AKA XML with curly braces). 51 © 2013 IBM Corporation
  • 52. REST and errors Use error codes in the response ─ 2xx == all good ─ 4xx == client messed something up ─ 5xx == server messed something up 52 © 2013 IBM Corporation
  • 53. RESTful errors 53 © 2013 IBM Corporation
  • 54. API Versioning You must version your API! Versioning your API means that you don't need to update all your clients immediately, if at all, when you add or change your API**. Make the version part of the resource, not a parameter. Make it explicit. www.example.com/v1/customers/IBM vs www.example.com/customers/IBM?v=1 **You will change it, so just get it out of the way and design it into V1 54 © 2013 IBM Corporation
  • 55. API Versioning 55 © 2013 IBM Corporation
  • 56. API Authentication A RESTfull application should also be stateless. So this means that you should not be storing session information server side. This is Domino so you don't have much control over this, but in general you shouldn't be using appScope or sessionScope variables to store anything.  Public / No authorization needed  HTTP Authentication ─ Server handles the login ─ All HTTP requests must contain the login info via Authorization header ─ Database ACL is set to require authentication (Anonymous=No Access)  Token Authentication ─ You handle the login ─ an API key is generated for client access. That key is used as the login credentials. Not really security, but limits access to the data to a known set of users and gives application control over who has access without having to manage the ACL ─ Database ACL is more open 56 © 2013 IBM Corporation
  • 57. 57
  • 58. Old school  &ReadViewEntries  Supported since R6  Gives you a dump of a view in XML or JSON format  Pros  Cons – Built in so performance is good – No control over the output – No coding needed – Does not support JSONP – XML is a little more useful than the – There are a few bugs that can cause JSON version the JSON output to be invalid – There is no equiv for docs so everything you need must be in the view – Not really an API.. 58
  • 61. POA (Plain old Agents)  These don’t require anything special and can do all the same things we talked about previously.  Can use Java or LotusScript. 61
  • 62. POA (Plain old Agents) Sub Initialize Dim s As New NotesSession Dim db As New NotesDatabase("", "ls13/irsbikes_inventory.nsf") Dim docs As NotesDocumentCollection Set docs = db.AllDocuments Dim d As NotesDocument Set d = docs.getfirstdocument Print "Content-Type:application/xml" Print |<?xml version="1.0" encoding="UTF-8"?>| Print |<bikes>| while Not d Is Nothing Print "<bike>" Print "<brand>" + d.brand(0) + "</brand>" Print "<model>" + d.model(0) + "</model>" Print "</bike>" Set d = docs.Getnextdocument(d) Wend Print |</bikes>| End Sub 62
  • 63. POA (Plain old Agents) 63
  • 64. POA (Plain old Agents) public class JavaAgent extends AgentBase { public void NotesMain() { try { Session session = getSession(); AgentContext agentContext = session.getAgentContext(); Database db = session.getDatabase("", "ls13/irsbikes_inventory.nsf"); DocumentCollection docs = db.getAllDocuments(); Document doc = docs.getFirstDocument(); java.io.Writer sw = new java.io.StringWriter(); PrintWriter ao = getAgentOutput(); ao.println("Content-type: text/xml"); ao.println("<bikes>"); while(null!=doc){ // write the document out doc.generateXML(sw); doc = docs.getNextDocument(doc); } sw.flush(); ao.print(sw.toString()); ao.println("</bikes>"); } catch(Exception e) { e.printStackTrace(); } } } 64
  • 65. Domino and REST  Introduced in 8.5.3  4 built in options – Domino Data Service – XPages REST Services Control – Custom Database Servlet – Custom Wink Servlet 65
  • 66. Domino and REST  Pros  Cons – Built in so support and performance is – DDS Needs to be enabled on the good server (admins need to be involved) – No coding needed – Very granular – database, view – Very granular properties – URLs are not app specific. This is Domino’s API = views and documents – No coding – can’t really expose logical application objects – Not documented very well (yet) 66
  • 67. Domino and REST – Domino Data Services 67
  • 69. Domino and REST – Domino Data Services 69
  • 70. Domino and REST – Domino Data Services  http://{host}/api/data [ { "@title":"Activity Trends (MADER)", "@filepath":"activity.nsf", "@replicaid":"852578220B751506", "@template":"StdActivityTrendsDatabase", "@href":"http://localhost:80/activity.nsf/API/data/collections" }, { "@title":"Administration Requests", "@filepath":"admin4.nsf", "@replicaid":"8525782203751506", "@template":"StdR4AdminRequests", "@href":"http://localhost:80/admin4.nsf/API/data/collections" }, …… ] 70
  • 71. Domino and REST – Domino Data Services  http://{host}/{path}/api/data/collections [ { "@title":"By Type", "@folder":false, "@private":false, "@modified":"2012-12-19T20:27:13Z", "@unid":"0AC52D85954AB7E785257AD9005D6E35", "@href":"http://localhost:80/ls13/irsbikes_inventory.nsf/API/data/collections/unid/0AC52D85954AB7E785257AD9005D6E35" }, { "@title":"By Size", "@folder":false, "@private":false, "@modified":"2012-12-19T20:27:13Z", "@unid":"66ED263FEEC2CF7485257AD9005D3342", "@href":"http://localhost:80/ls13/irsbikes_inventory.nsf/API/data/collections/unid/66ED263FEEC2CF7485257AD9005D3342" }, …… ] 71
  • 72. Domino and REST – Domino Data Services  http://{host}/{path}/api/data/collections/name/{view name}  http://{host}/{path}/api/data/collections/unid/{view unid} [ { "@href":"http://localhost:80/ls13/irsbikes_inventory.nsf/API/data/collections/name/demoView/unid/6783AB7D38FACE2A85257AD9005BDC35", "@link": { "rel":"document", "href":"http://localhost:80/ls13/irsbikes_inventory.nsf/API/data/documents/unid/6783AB7D38FACE2A85257AD9005BDC35" }, "@entryid":"1-6783AB7D38FACE2A85257AD9005BDC35", "@unid":"6783AB7D38FACE2A85257AD9005BDC35", "@noteid":"906", "@position":"1", "@siblings":22, "@form":"inventory", …. }, ….. ] 72
  • 73. Domino and REST – REST Services Control  The REST Services Custom Control comes with the Extension Library.  No Coding!  Add to an XPage and set the ‘pathInfo’ paramter.  Different types of resources can be retrieved – databaseCollectionJsonService - Read the list of databases on the server. – viewCollectionJsonService - Read the list of views and folders in a database. – viewJsonService - Read the entries in a view or folder. – documentJsonService - Create, read, update and delete documents.  Adds to the path for the XPage for specific resources 73
  • 74. Domino and REST – REST Services Control 74
  • 75. Domino and REST – REST Services Control 75
  • 76. Domino and REST – REST Services Control http://localhost/ls13/irsbikes_web.nsf/restControl.xsp/bikes 76
  • 77. Domino and REST – Domino Data Services  More on OpenNTF – Niklas Heidloff - http://www.openntf.org/blogs/openntf.nsf/d6plinks/NHEF-8JGGPE • Documentation • Examples • Video 77
  • 78. “XAgents”  XPages with rendered=‘false’  Can write your API in Java or Server Side JavaScript  Keeps you in the same frame of mind as the rest of your XPages development. 78
  • 79. “XAgents” <?xml version="1.0" encoding="UTF-8"?> <xp:view xmlns:xp="http://www.ibm.com/xsp/core" rendered='false'> <xp:this.afterRenderResponse><![CDATA[#{javascript: var externalContext = facesContext.getExternalContext(); var response = externalContext.getResponse(); var request = externalContext.getRequest(); if( !param.containsKey("p") ){ response.setStatus(400); response.setContentType("application/json"); var writer = facesContext.getResponseWriter(); writer.write("{ "code":400, "text":"Bad Parameter", "message":"Missing method call parameter 'p'" }"); return; } var s = new org.openntf.api.snippet(); s.service( request, response); }]]> </xp:this.afterRenderResponse> </xp:view> 79
  • 80. “Xagents” + JAVA = Happy <?xml version="1.0" encoding="UTF-8"?> <xp:view xmlns:xp="http://www.ibm.com/xsp/core" rendered='false'> <xp:this.afterRenderResponse><![CDATA[#{javascript: var externalContext = facesContext.getExternalContext(); var response = externalContext.getResponse(); var request = externalContext.getRequest(); if( !param.containsKey("p") ){ response.setStatus(400); response.setContentType("application/json"); var writer = facesContext.getResponseWriter(); writer.write("{ "code":400, "text":"Bad Parameter", "message":"Missing method call parameter 'p'" }"); return; } var s = new org.openntf.api.snippet(); s.service( request, response); }]]> </xp:this.afterRenderResponse> </xp:view> 80
  • 81. Demo Time – Custom App!  Inner Ring Bike shop. – Using Notes for inventory and sales – Wants to add a web interface, and also add some pizzazz with graphs and photos. 81
  • 82. For more…  Presentation download – http://www.innerringsolutions.com/Connect2013/bp204.pdf  Demo database download – http://www.innerringsolutions.com/Connect2013/bp204_demo.zip 82
  • 83. Thanks!! Craig Schumann I nner Ri ng Sol ut i ons, LLC http://blog.innerringsolutions.com @ZOPEFF www. l i nkedi n. com i n/ cr ai gschum / an n/ 83 © 2013 IBM Corporation
  • 84. 84
  • 85. Legal disclaimer © IBM Corporation 2013. All Rights Reserved. The information contained in this publication is provided for informational purposes only. While efforts were made to verify the completeness and accuracy of the information contained in this publication, it is provided AS IS without warranty of any kind, express or implied. In addition, this information is based on IBM’s current product plans and strategy, which are subject to change by IBM without notice. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, this publication or any other materials. Nothing contained in this publication is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software. References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced in this presentation may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. Nothing contained in these materials is intended to, nor shall have the effect of, stating or implying that any activities undertaken by you will result in any specific sales, revenue growth or other results. Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other countries, or both. Flickr is a trademarks of Yahoo Inc. in the United States, other countries, or both. Google is a trademarks of Google Inc. in the United States, other countries, or both. All references to Inner Ring Bike Shop refer to a fictitious company and are used for illustration purposes only. 85 © 2013 IBM Corporation