DomDisc and the Domino data api
-
Upload
jens-bruntt -
Category
Technology
-
view
752 -
download
4
Transcript of DomDisc and the Domino data api
![Page 1: DomDisc and the Domino data api](https://reader033.fdocument.pub/reader033/viewer/2022042700/5551f880b4c905421a8b4996/html5/thumbnails/1.jpg)
DomDiscAn Open Source Android app that
replicateswith Domino discussion databases
(Primarily) a presentation on the Domino DataService API
By Jens Bruntt – [email protected]://www.convergens.dk
Orhttp://www.jens.bruntt.dk
16/5-2013
![Page 2: DomDisc and the Domino data api](https://reader033.fdocument.pub/reader033/viewer/2022042700/5551f880b4c905421a8b4996/html5/thumbnails/2.jpg)
Purpose of the DomDisc App
● Mobility by– Accessing one or multiple standard Notes
discussion databases on a Smartphone (or tablet)
– Having offline capability
– Having Create option
– Synchronizing in the background
![Page 3: DomDisc and the Domino data api](https://reader033.fdocument.pub/reader033/viewer/2022042700/5551f880b4c905421a8b4996/html5/thumbnails/3.jpg)
Screen dumps from app
![Page 4: DomDisc and the Domino data api](https://reader033.fdocument.pub/reader033/viewer/2022042700/5551f880b4c905421a8b4996/html5/thumbnails/4.jpg)
Installation of the DomDisc app
https://play.google.com/store/apps/details?id=org.openntf.domdisc
Or scan this:
![Page 5: DomDisc and the Domino data api](https://reader033.fdocument.pub/reader033/viewer/2022042700/5551f880b4c905421a8b4996/html5/thumbnails/5.jpg)
Working with the Domino Data Service API
![Page 6: DomDisc and the Domino data api](https://reader033.fdocument.pub/reader033/viewer/2022042700/5551f880b4c905421a8b4996/html5/thumbnails/6.jpg)
Domino Data Service API
● What is it?● A REST-api for IBM Domino
– PUT, POST, DEL
– JSON in and out from the service
● Lets you access and work with Notes (Documents) in NSFs hosted on Domino
![Page 7: DomDisc and the Domino data api](https://reader033.fdocument.pub/reader033/viewer/2022042700/5551f880b4c905421a8b4996/html5/thumbnails/7.jpg)
Reading documents1/3 the full list of notes in the db
Sample urlhttp://dev.openntf.org/demos/domdiscdemo.nsf/api/data/documents/Returns small entries – not full notes
![Page 8: DomDisc and the Domino data api](https://reader033.fdocument.pub/reader033/viewer/2022042700/5551f880b4c905421a8b4996/html5/thumbnails/8.jpg)
Reading documents 2/3
● We now have a complete list of document-references. With minimal data:– Modified date/time
– Unid
– href
● If we need the full note we can visit the href
![Page 9: DomDisc and the Domino data api](https://reader033.fdocument.pub/reader033/viewer/2022042700/5551f880b4c905421a8b4996/html5/thumbnails/9.jpg)
Reading documents 3/3The full note
![Page 10: DomDisc and the Domino data api](https://reader033.fdocument.pub/reader033/viewer/2022042700/5551f880b4c905421a8b4996/html5/thumbnails/10.jpg)
Next time we need to replicate basic workflow - server-to-app
● Read the same start-URL (all notes in small format) for an updated list
● Pseudo code for each UNID in the list● Have we saved this UNID before?
– Yes: Check if @modified local<> server value● Yes: get the update note and update local storage● No: ignore
– No: Get the note and save in local storage
![Page 11: DomDisc and the Domino data api](https://reader033.fdocument.pub/reader033/viewer/2022042700/5551f880b4c905421a8b4996/html5/thumbnails/11.jpg)
Authentication with Domino
![Page 12: DomDisc and the Domino data api](https://reader033.fdocument.pub/reader033/viewer/2022042700/5551f880b4c905421a8b4996/html5/thumbnails/12.jpg)
Getting an authentication token from Domino with SSO configuration
● POST a form that has the same content as the one seen here ->
● Response from server:– Set-Cookie: DominoAuthSessID=xyz
or– Set-Cookie: LtpaToken=abc
● Copy this value. Insert it in the HTTP header for all your GETs, POSTs
● Bob is your uncle. Domino accepts your requests - you are logged in
![Page 13: DomDisc and the Domino data api](https://reader033.fdocument.pub/reader033/viewer/2022042700/5551f880b4c905421a8b4996/html5/thumbnails/13.jpg)
What happens when you click Log in
![Page 14: DomDisc and the Domino data api](https://reader033.fdocument.pub/reader033/viewer/2022042700/5551f880b4c905421a8b4996/html5/thumbnails/14.jpg)
Code walkthru
![Page 15: DomDisc and the Domino data api](https://reader033.fdocument.pub/reader033/viewer/2022042700/5551f880b4c905421a8b4996/html5/thumbnails/15.jpg)
More information
![Page 16: DomDisc and the Domino data api](https://reader033.fdocument.pub/reader033/viewer/2022042700/5551f880b4c905421a8b4996/html5/thumbnails/16.jpg)
Test the app with openntf.org
Parameters to put in the app● Host name: dev.openntf.org● Path to database:
/demos/domdiscdemo.nsf● Username for login: your
openntf.org name● Password: your openntf.org
password● Use SSL: no● Http Port: 80
Check in browser● http://dev.openntf.org/demos/domdiscdemo.nsf
Install ->
![Page 17: DomDisc and the Domino data api](https://reader033.fdocument.pub/reader033/viewer/2022042700/5551f880b4c905421a8b4996/html5/thumbnails/17.jpg)
Getting the app code
● Code is available from– Openntf.org
– https://github.com/OpenNTF/DomDIsc
● Apache License 2.0 which means:– You can copy and use the code
● Must link to the source of the code● Can create closed-source code from the source
![Page 18: DomDisc and the Domino data api](https://reader033.fdocument.pub/reader033/viewer/2022042700/5551f880b4c905421a8b4996/html5/thumbnails/18.jpg)
Working with the Domino Data Service API and other technologies
used in the app
● There are pointers - links in the app source: github.com developer.txt on these subjects– Accessing Domino Data Service
– Using SPRING Rest template
– Using ActionBar Sherlock - lets you have the action bar design pattern on older Android devices
– Including libraries in Android