SlideShare ist ein Scribd-Unternehmen logo
1 von 53
Downloaden Sie, um offline zu lesen
REST Assured, Freeing Your Domino Data
Has Never Been That Easy!
Serdar Basegmez, Developi Information Systems
16th September 2016
• IBM Champion (2011 - 2016)
• Developi Information Systems, Istanbul
• Contributing…
• OpenNTF / LUGTR / LotusNotus.com
• Featured on…
• Engage UG, IBM Connect, ICON UK, NotesIn9…
• Also…
• Blogger and Podcaster on Scientific Skepticism
Serdar Başeğmez
RESTful Web Services
Representational state transfer (REST) is an architectural style used for
web development. Systems and sites designed using this style aim for
fast performance, reliability and the ability to scale (to grow and easily
support extra users). To achieve these goals, developers work with
reusable components that can be managed and updated without
affecting the system as a whole while it is running.
Source: https://en.wikipedia.org/wiki/Representational_state_transfer
History
Old School Web Applications
Source: https://speakerdeck.com/jeffschenck/rest-easy-api-security-done-right
User Interface Business Logic Datastore
Front-end Back-end
ASP, PHP, CGI, Web Agents, JSP, etc.
← HTML, CSS, JavaScript
Forms →
Web Applications Evolving
User Interface Business Logic Datastore
Front-end Back-end
Async web apps, Ruby on Rails, Django, JSF, XPages, etc.
← HTML, CSS, JavaScript
Forms, AJAX →
Web Applications Evolving
User Interface Business Logic Datastore
Front-end Back-end
Modern Web frameworks, Angular.js, React.js, etc.
← HTML, CSS, JavaScript
← REST →
Web Applications Evolving
User Interface Business Logic Datastore
Mobile Applications
Back-end
Modern Web frameworks, Angular.js, React.js, etc.
← HTML, CSS, JavaScript
← REST →
Front-end
Web Applications Evolving
User Interface Business Logic Datastore
Mobile Applications Back-end
Modern Web frameworks, Angular.js, React.js, etc.
← HTML, CSS, JavaScript
← REST →
Front-end Microservice Microservice Microservice
RESTful, Everywhere!
Solid Architecture
Well-dened practices
Widespread use in modern frameworks
Easily consumable in micro environments
Stateless / Cacheable / Layered
Every request processed independently
Everything cacheable
Client does not care who cooked the meal in the kitchen
⇣
Scalable, Robust, Resilient
The Conversation Makes Sense!
Source: http://www.bizcoder.com/a-fresh-coat-of-rest-paint-on-a-soap-stack
The Conversation Makes Sense!
GET	/twink/contacts/DLEY-ACLH6Y	HTTP/1.1	
Host:	homer.developi.info	
Cache-Control:	no-cache	
{	
		"zip":	"13202",	
		"state":	"NY",	
		"lastName":	"Abbate",	
		"middle":	"J",	
		"country":	"US",	
		"emailAddress":	"Jessica.J.Abbate@trashymail.com",	
		"number":	"DLEY-ACLH6Y",	
		"city":	"Syracuse",	
		"firstName":	"Jessica"	
}
The Conversation Makes Sense!
http://appserver.company.com/apps/contacts.nsf/
GiveMeTheContactWeNeedPleaseAgent?OpenAgent&id=1522
or…
http://appserver.company.com/api/contacts/1522
Conventions on URLs
GET http://appserver.company.com/api/contacts
GET http://appserver.company.com/api/contacts/UK/London
POST http://appserver.company.com/api/contacts
Retrieve Contacts / Create a new Contact…
Conventions on URLs
GET http://appserver.company.com/api/contacts/1522
PUT http://appserver.company.com/api/contacts/1522
DELETE http://appserver.company.com/api/contacts/1522
Retrieve/Update/Delete the Contact resource with id=1522…
URI GET PUT POST DELETE
/contacts/ List Contacts Replace Contacts Create New Contact Delete Contacts
/contacts/id Retrieve a Contact Replace a Contact N/A (generally) Delete a Contact
Source: https://en.wikipedia.org/wiki/Representational_state_transfer
Conventions on URLs
Unconventional uses in URLs
GET https://api.twitter.com/1.1/statuses/show.json?id=1234567890
Retrieve the Tweet with id=1234567890…
RESTful Services
for
IBM Domino Applications
Motivation
Putting stuff into a small device!
Socializing with other developers!
Opening to the wild… New animals out there!
Enough! We are moving…
All / Some / None of the above
Options
Domino Access Services (DAS)
Extension Library Components for REST
Hardcoding (XAgents, Web agents)
Apache Wink Servlets
RESTful Options on Domino
Benets Challenges Suggested When?
Domino Access Services

(DAS)
No Backend Code
Zero-setup
Limited Control
No Business Logic
Exposes the Internals
Simple internal integrations
ExtLib Components

for REST
Less Backend Code
Minimal Setup
Partial/Full Customization
Error Handling
Spaghetti Code
URL Conventions
Simple needs for a limited
scope
Hardcoding

(XAgents, Web agents)
Tailor-made
No Learning Curve
Hardcoding Everything
Spaghetti Code
URL Conventions
Very specic needs for a
limited scope
Apache Wink Servlets
Tailor-made
Based on JAX-RS
OSGi Benets
Learning Curve
Barrier to Entry
Large scope
implementations, API
Design
Apache Wink Project
Complete implementation of JAX-RS v1.1 Specication
Also includes RESTful Client module
Extension Library comes with Apache Wink 1.1.2
Open Source
Spring integration, WebDAV support
Apache Wink Runtime Application Code
Apache Wink Basic Architecture
Wink Servlet
(Customizable)
HTTP/HTTPS
Client
Datastore
Resource
Resource
Resource
Resource
Controllers
Data Accessors
Tools/Utilities
Request Processor
Helpers
/BaseURI/* /BaseURI/Path-Patterns
Resource and Resource Representation
Collection
ResourceResourceResource
SubresourceSubresourceSubresource
Resource
• Any addressable object is a resource.
• A resource class is;
• Implements RESTful interactions (GET, POST, etc.)
• A pure Java object decorated with annotations
• Do not confuse with Model class.
Resource Representation
• The content of an object is called as Representation
• JSON, XML, Text, Form data, etc.
@Path("/contacts")	
public	class	ContactResource	{	
	 private	DominoAccessor	accessor	=	new	DominoAccessor(ContextInfo.getUserSession());	
	 	
	 @GET()	
	 public	Response	getContactList(	@QueryParam("start")	int	start,	@QueryParam("count")	int	count)	{	
	 	 	
	 	 List<Contact>	contactList	=	accessor.pullContacts(start,	count);	
	 	 String	result	=	ModelUtils.toJson(contactList).toString();	
	 	 	
	 	 return	Response.ok(result,	MediaType.APPLICATION_JSON).build();	
	 }	
	 	
	 @Path("/{id}")	
	 @GET()	
	 public	Response	getContact(@PathParam("id")	String	id)	{	
	 	 Contact	contact	=	accessor.findContact(id);	
	 	 if(null	==	contact)	{	
	 	 	 throw	new	WebApplicationException(Response.Status.NOT_FOUND);	
	 	 }	else	{	
	 	 	 String	result	=	ModelUtils.toJson(contact).toString();	
	 	 	 return	Response.ok(result,	MediaType.APPLICATION_JSON).build();	
	 	 }	
	 }	
}
{	
		"zip":	"13202",	
		"state":	"NY",	
		"lastName":	"Abbate",	
		"middle":	"J",	
		"country":	"US",	
		"emailAddress":	"Jessica.J.Abbate@trashymail.com",	
		"number":	"DLEY-ACLH6Y",	
		"city":	"Syracuse",	
		"firstName":	"Jessica"	
}
Contact Resource Class
Contact Resource
Short JSON Representation
Resources
@Path("/contacts")	
public	class	ContactResource	{	
	 private	DominoAccessor	accessor	=	new	DominoAccessor(ContextInfo.getUserSession());	
	 	
	 @GET()	
	 public	Response	getContactList(	@QueryParam("start")	int	start,	@QueryParam("count")	int	count)	{	
	 	 	
	 	 List<Contact>	contactList	=	accessor.pullContacts(start,	count);	
	 	 String	result	=	ModelUtils.toJson(contactList).toString();	
	 	 	
	 	 return	Response.ok(result,	MediaType.APPLICATION_JSON).build();	
	 }	
	 	
	 @Path("/{id}")	
	 @GET()	
	 public	Response	getContact(@PathParam("id")	String	id)	{	
	 	 Contact	contact	=	accessor.findContact(id);	
	 	 if(null	==	contact)	{	
	 	 	 throw	new	WebApplicationException(Response.Status.NOT_FOUND);	
	 	 }	else	{	
	 	 	 String	result	=	ModelUtils.toJson(contact).toString();	
	 	 	 return	Response.ok(result,	MediaType.APPLICATION_JSON).build();	
	 	 }	
	 }	
}
The base URI for the
resource
In the demo, the root path of
the plugin is “/twink”. So this
class is enabled for requests
made to:
/twink/contacts/*
GET /twink/contacts/DLEY-ACJS7HGET /twink/contacts?start=10000&count=10
Resources
@Path("/contacts")	
public	class	ContactResource	{	
	 private	DominoAccessor	accessor	=	new	DominoAccessor(ContextInfo.getUserSession());	
	 	
	 @GET()	
	 public	Response	getContactList(	@QueryParam("start")	int	start,	@QueryParam("count")	int	count)	{	
	 	 	
	 	 List<Contact>	contactList	=	accessor.pullContacts(start,	count);	
	 	 String	result	=	ModelUtils.toJson(contactList).toString();	
	 	 	
	 	 return	Response.ok(result,	MediaType.APPLICATION_JSON).build();	
	 }	
	 	
	 @Path("/{id}")	
	 @GET()	
	 public	Response	getContact(@PathParam("id")	String	id)	{	
	 	 Contact	contact	=	accessor.findContact(id);	
	 	 if(null	==	contact)	{	
	 	 	 throw	new	WebApplicationException(Response.Status.NOT_FOUND);	
	 	 }	else	{	
	 	 	 String	result	=	ModelUtils.toJson(contact).toString();	
	 	 	 return	Response.ok(result,	MediaType.APPLICATION_JSON).build();	
	 	 }	
	 }	
}
This method responds to
GET requests.
No path dened, so this is
the default responder.
Resources
@Path("/contacts")	
public	class	ContactResource	{	
	 private	DominoAccessor	accessor	=	new	DominoAccessor(ContextInfo.getUserSession());	
	 	
	 @GET()	
	 public	Response	getContactList(	@QueryParam("start")	int	start,	@QueryParam("count")	int	count)	{	
	 	 	
	 	 List<Contact>	contactList	=	accessor.pullContacts(start,	count);	
	 	 String	result	=	ModelUtils.toJson(contactList).toString();	
	 	 	
	 	 return	Response.ok(result,	MediaType.APPLICATION_JSON).build();	
	 }	
	 	
	 @Path("/{id}")	
	 @GET()	
	 public	Response	getContact(@PathParam("id")	String	id)	{	
	 	 Contact	contact	=	accessor.findContact(id);	
	 	 if(null	==	contact)	{	
	 	 	 throw	new	WebApplicationException(Response.Status.NOT_FOUND);	
	 	 }	else	{	
	 	 	 String	result	=	ModelUtils.toJson(contact).toString();	
	 	 	 return	Response.ok(result,	MediaType.APPLICATION_JSON).build();	
	 	 }	
	 }	
}
This method also responds
to GET requests.
But it the request path will
be elected based on this
format.
Resources
@Path("/contacts")	
public	class	ContactResource	{	
	 private	DominoAccessor	accessor	=	new	DominoAccessor(ContextInfo.getUserSession());	
	 	
	 @GET()	
	 public	Response	getContactList(	@QueryParam("start")	int	start,	@QueryParam("count")	int	count)	{	
	 	 	
	 	 List<Contact>	contactList	=	accessor.pullContacts(start,	count);	
	 	 String	result	=	ModelUtils.toJson(contactList).toString();	
	 	 	
	 	 return	Response.ok(result,	MediaType.APPLICATION_JSON).build();	
	 }	
	 	
	 @Path("/{id}")	
	 @GET()	
	 public	Response	getContact(@PathParam("id")	String	id)	{	
	 	 Contact	contact	=	accessor.findContact(id);	
	 	 if(null	==	contact)	{	
	 	 	 throw	new	WebApplicationException(Response.Status.NOT_FOUND);	
	 	 }	else	{	
	 	 	 String	result	=	ModelUtils.toJson(contact).toString();	
	 	 	 return	Response.ok(result,	MediaType.APPLICATION_JSON).build();	
	 	 }	
	 }	
}
Parameters will be injected
into methods.
/contacts?start=X&count=Y
/contacts/someId
Wink servlet will handle type
conversion.
It supports ordinary java
objects, enums, primitives,
etc.
Resources
@Path("/contacts")	
public	class	ContactResource	{	
	 private	DominoAccessor	accessor	=	new	DominoAccessor(ContextInfo.getUserSession());	
	 	
	 @GET()	
	 public	Response	getContactList(	@QueryParam("start")	int	start,	@QueryParam("count")	int	count)	{	
	 	 	
	 	 List<Contact>	contactList	=	accessor.pullContacts(start,	count);	
	 	 String	result	=	ModelUtils.toJson(contactList).toString();	
	 	 	
	 	 return	Response.ok(result,	MediaType.APPLICATION_JSON).build();	
	 }	
	 	
	 @Path("/{id}")	
	 @GET()	
	 public	Response	getContact(@PathParam("id")	String	id)	{	
	 	 Contact	contact	=	accessor.findContact(id);	
	 	 if(null	==	contact)	{	
	 	 	 throw	new	WebApplicationException(Response.Status.NOT_FOUND);	
	 	 }	else	{	
	 	 	 String	result	=	ModelUtils.toJson(contact).toString();	
	 	 	 return	Response.ok(result,	MediaType.APPLICATION_JSON).build();	
	 	 }	
	 }	
}
There are lots of options of
returning response.
ResponseBuilders and
some other helpers make it
quite easy.
Resources
@Path("/contacts")	
public	class	ContactResource	{	
	 private	DominoAccessor	accessor	=	new	DominoAccessor(ContextInfo.getUserSession());	
	 	
	 @GET()	
	 public	Response	getContactList(	@QueryParam("start")	int	start,	@QueryParam("count")	int	count)	{	
	 	 	
	 	 List<Contact>	contactList	=	accessor.pullContacts(start,	count);	
	 	 String	result	=	ModelUtils.toJson(contactList).toString();	
	 	 	
	 	 return	Response.ok(result,	MediaType.APPLICATION_JSON).build();	
	 }	
	 	
	 @Path("/{id}")	
	 @GET()	
	 public	Response	getContact(@PathParam("id")	String	id)	{	
	 	 Contact	contact	=	accessor.findContact(id);	
	 	 if(null	==	contact)	{	
	 	 	 throw	new	WebApplicationException(Response.Status.NOT_FOUND);	
	 	 }	else	{	
	 	 	 String	result	=	ModelUtils.toJson(contact).toString();	
	 	 	 return	Response.ok(result,	MediaType.APPLICATION_JSON).build();	
	 	 }	
	 }	
}
Wink handles much of the
error handling.
Still you can inject your own
errors.
Resources
@Path("/contacts")	
public	class	ContactResource	{	
…………	
	 @POST()	
	 @Consumes(MediaType.APPLICATION_JSON)	
	 public	Response	postContactJson(String	body)	{	
	 	 Contact	contact	=	ModelUtils.buildContactfromJson(body);	
	 	 accessor.saveNewContact(contact);	
	 	 	
	 	 String	result	=	ModelUtils.toJson(contact).toString();	
	 	 return	Response.ok(result,	MediaType.APPLICATION_JSON).build();	
	 }	
	 @POST()	
	 @Consumes(MediaType.MULTIPART_FORM_DATA)	
	 public	Response	postContactForm(BufferedInMultiPart	formData)	{	
	 	 Contact	contact	=	ModelUtils.buildContactfromMultipart(formData);	
	 	 accessor.saveNewContact(contact);	
	 	 	
	 	 String	result	=	ModelUtils.toJson(contact).toString();	
	 	 return	Response.ok(result,	MediaType.APPLICATION_JSON).build();	
	 }	
}
This methods respond to
POST requests.
This time the selection
depends on the incoming
data type.
Client marks the request
with Content-Type header
and Wink will select the
appropriate method here.
Resources
@Path("/contacts")	
public	class	ContactResource	{	
…………	
	 @POST()	
	 @Consumes(MediaType.APPLICATION_JSON)	
	 public	Response	postContactJson(String	body)	{	
	 	 Contact	contact	=	ModelUtils.buildContactfromJson(body);	
	 	 accessor.saveNewContact(contact);	
	 	 	
	 	 String	result	=	ModelUtils.toJson(contact).toString();	
	 	 return	Response.ok(result,	MediaType.APPLICATION_JSON).build();	
	 }	
	 @POST()	
	 @Consumes(MediaType.MULTIPART_FORM_DATA)	
	 public	Response	postContactForm(BufferedInMultiPart	formData)	{	
	 	 Contact	contact	=	ModelUtils.buildContactfromMultipart(formData);	
	 	 accessor.saveNewContact(contact);	
	 	 	
	 	 String	result	=	ModelUtils.toJson(contact).toString();	
	 	 return	Response.ok(result,	MediaType.APPLICATION_JSON).build();	
	 }	
}
Wink injects the incoming
data into the method
automatically.
Apache Wink also provides
several classes to process
different data formats
(Multipart, Atom, XML,
JSON, etc.)
How to Start
What is your purpose?
Quick and narrow-scoped services
Moving your app to a different web framework
Enable applications for native mobile access
Create a REST API for your apps
Plan rst!
Determine resource types and capabilities to be allowed

(Resources, Representations, actions, etc.)
The distribution of tasks

(Front-end and Back-end) responsibilities
Collaborate with consumers, if you can
Versioning / Test API
Sketch an architecture
Keep your architecture layered
Let your luggage be history
Design as if the consumer will exploit your application, even you!
A sample architecture
RESTful Resources
ResourceResourceResource
SubresourceSubresourceSubresource
Model Classes
Data Objects
Conversion
Resource Representation ←→ Model
Data Access
Model ←→ Documents
Business Logic
Actions (CRUD, etc.)
Rules, validations, etc.
Databases
ResourceResourceDocuments
ResourceResourceViews
ResourceResourceetc.
Security Utilities
Further Details
Getting hands dirty
Test and Development
Local Domino Server
Domino Designer Client
Eclipse / XPages SDK / Debug Plugin
REST testing utility (e.g. Postman)
Plugin Development
Guides / Demos / Blogs
Congure Eclipse
Plugin template for Wink project
Add Libraries to your project
(See Resources section)
Annotations
• @Path

Species the relative path for a resource class or method
• @GET, @PUT, @POST, @DELETE, @HEAD

Specify the HTTP request type of a resource
• @Produces

Species the response Internet media types (content negotiation)
• @Consumes

Species the accepted request Internet media types.
Annotations
• @PathParam

Binds the method parameter to a path segment
• @QueryParam, @MatrixParam, @FormParam

Binds the method parameter to a query/matrix/form parameter
• @HeaderParam, @CookieParam

Binds the method parameter to a HTTP header/cookie parameter
• @Context

Returns the entire context of the object

@Context	HttpServletRequest	request
• @DefaultValue

Specifies a default value for the above bindings when the key is not found.

@Default(“1”)	@QueryParam(“start”)	int	start
Annotations
• @Provider

Providers are used for transformation between entities and representations.
Wink comes with several providers and more can be developed for special
purposes.
• @Asset

More advanced implementation of providers. Especially suitable for automatic
transformation between data objects and representations.
• @Parent

Denes a parent resource that has a base URI. (See Versioning)
• @Scope

By default, every resource class instantiated per request. Scope can dene
longer life cycles for resource instances (e.g. singletons).
JSON Handling
• Wink and IBM Commons provide JSON Object helpers
• A library for JSON processing strongly suggested
• Hardcoding JSON data structure becomes more and more difficult.
• Automatic Serialization / Deserialization is life saving
• Tip: Look into Jackson and GSON libraries
Versioning
@Path("/v1")	
public	class	com.developi.wink.demo.api.v1.VersionRoot	{}
@Parent(com.developi.wink.demo.api.v1.VersionRoot.class)	
@Path("/ping")	
public	class	com.developi.wink.demo.api.v1.PingResource	{	
	 @GET	public	Response	ping()	{	
	 	 return	Response.ok("<h1>Hello	World	Version	1!</h1>",	MediaType.TEXT_HTML).build();	
	 }	
}
@Parent(com.developi.wink.demo.api.v2.VersionRoot.class)	
@Path("/ping")	
public	class	com.developi.wink.demo.api.v2.PingResource	{	
	 @GET	public	Response	ping()	{	
	 	 return	Response.ok("<h1>Hello	World	Version	2!</h1>",	MediaType.TEXT_HTML).build();	
	 }	
}
@Path("/v2")	
public	class	com.developi.wink.demo.api.v2.VersionRoot	{}
Responds to “/root/v2/ping”
Responds to “/root/v1/ping”
Notes Session
• NotesSession related to the authenticated user:
• ContextInfo.getUserSession()	
• At the servlet level,
• No SessionAsSigner
• No SessionAsSignerWithFullAccess
• No CurrentDatabase
• Elevated level of access is a bit tricky.
• Refer to DominoRunner XSnippet
OpenNTF Domino API
• OpenNTF Domino API is compatible with Apache Wink
• One trick: You need to customize the servlet
• Refer to the blog post by Paul Withers
• Advantages
• No recycle!
• Modern Java practices (Maps, generics, etc.)
• Much better development experience
• Ability to use elevated session
• Refer to the OpenNTF Domino API Project page for more
Wrap-up
Summary
RESTful Services Architecture
Designing RESTful services for Domino Applications
Basic Concepts around RESTful Services
Architecture Examples
Annotations used by Apache Wink
Some tricks for Domino developers
Takeaway
Download and play with the template and demo plugins
Experiment JAX-RS annotations
Get yourself familiar with Plugin development
Download Extension Library source code and look its design
Study on RESTful design practices and JAX-RS concepts
Resources
• Serdar Başeğmez: Demo Plugin and Apache Wink Template

https://github.com/sbasegmez/RestAssuredDemo
• Apache Wink Project

https://wink.apache.org/
• Paul Withers: From XPages Hero To OSGi Guru: Taking The Scary Out Of Building Extension Libraries

http://www.slideshare.net/paulswithers1/ibm-connected-2015-mas103-xpages-performance-and-scalability
• Paul Withers: XPages OSGi Plugins series

http://www.intec.co.uk/xpages-osgi-plugins-1-an-introduction/
• John Cooper: Domino OSGI (Part 1) - Configuring Eclipse for XPages OSGI Plugins

http://developmentblog.johnmcooper.co.uk/2014/05/conguring-eclipse-for-xpages-osgi-plugins-part1.html
• John Dalsgaard: Wrap An Existing Jar File Into A Plug-in

https://www.dalsgaard-data.eu/blog/wrap-an-existing-jar-le-into-a-plug-in/
• Toby Samples: JAX-RS or THE way to do REST in Domino series

https://tobysamples.wordpress.com/2015/04/28/jax-rs-or-the-way-to-do-rest-in-domino-part-1/
• Jesse Gallagher: Eclipse Tutorial for Domino Developers

https://github.com/jesse-gallagher/eclipse-tutorial-oct2015/wiki/Java

Weitere ähnliche Inhalte

Was ist angesagt?

Understanding REST
Understanding RESTUnderstanding REST
Understanding RESTNitin Pande
 
Building Beautiful REST APIs in ASP.NET Core
Building Beautiful REST APIs in ASP.NET CoreBuilding Beautiful REST APIs in ASP.NET Core
Building Beautiful REST APIs in ASP.NET CoreStormpath
 
Best practices for RESTful web service design
Best practices for RESTful web service designBest practices for RESTful web service design
Best practices for RESTful web service designRamin Orujov
 
David GĂłmez G. - Hypermedia APIs for headless platforms and Data Integration ...
David GĂłmez G. - Hypermedia APIs for headless platforms and Data Integration ...David GĂłmez G. - Hypermedia APIs for headless platforms and Data Integration ...
David GĂłmez G. - Hypermedia APIs for headless platforms and Data Integration ...Codemotion
 
GraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learnedGraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learnedMarcinStachniuk
 
Beautiful REST+JSON APIs with Ion
Beautiful REST+JSON APIs with IonBeautiful REST+JSON APIs with Ion
Beautiful REST+JSON APIs with IonStormpath
 
RESTful JSON web databases
RESTful JSON web databasesRESTful JSON web databases
RESTful JSON web databaseskriszyp
 
GraphQL - gdy API RESTowe to za mało
GraphQL - gdy API RESTowe to za małoGraphQL - gdy API RESTowe to za mało
GraphQL - gdy API RESTowe to za małoMarcinStachniuk
 
Advanced Json
Advanced JsonAdvanced Json
Advanced Jsonguestfd7d7c
 

Was ist angesagt? (11)

Understanding REST
Understanding RESTUnderstanding REST
Understanding REST
 
Building Beautiful REST APIs in ASP.NET Core
Building Beautiful REST APIs in ASP.NET CoreBuilding Beautiful REST APIs in ASP.NET Core
Building Beautiful REST APIs in ASP.NET Core
 
Best practices for RESTful web service design
Best practices for RESTful web service designBest practices for RESTful web service design
Best practices for RESTful web service design
 
David GĂłmez G. - Hypermedia APIs for headless platforms and Data Integration ...
David GĂłmez G. - Hypermedia APIs for headless platforms and Data Integration ...David GĂłmez G. - Hypermedia APIs for headless platforms and Data Integration ...
David GĂłmez G. - Hypermedia APIs for headless platforms and Data Integration ...
 
REST Presentation
REST PresentationREST Presentation
REST Presentation
 
GraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learnedGraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learned
 
Beautiful REST+JSON APIs with Ion
Beautiful REST+JSON APIs with IonBeautiful REST+JSON APIs with Ion
Beautiful REST+JSON APIs with Ion
 
RESTful JSON web databases
RESTful JSON web databasesRESTful JSON web databases
RESTful JSON web databases
 
What's Your Problem?
What's Your Problem?What's Your Problem?
What's Your Problem?
 
GraphQL - gdy API RESTowe to za mało
GraphQL - gdy API RESTowe to za małoGraphQL - gdy API RESTowe to za mało
GraphQL - gdy API RESTowe to za mało
 
Advanced Json
Advanced JsonAdvanced Json
Advanced Json
 

Andere mochten auch

ICONUK 2015: How to Embrace Your XPages Plugin Super Powers
ICONUK 2015: How to Embrace Your XPages Plugin Super PowersICONUK 2015: How to Embrace Your XPages Plugin Super Powers
ICONUK 2015: How to Embrace Your XPages Plugin Super PowersSerdar Basegmez
 
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
 
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...Serdar Basegmez
 
BDD to the Bone: Using Behave and Selenium to Test-Drive Web Applications
BDD to the Bone: Using Behave and Selenium to Test-Drive Web ApplicationsBDD to the Bone: Using Behave and Selenium to Test-Drive Web Applications
BDD to the Bone: Using Behave and Selenium to Test-Drive Web ApplicationsPatrick Viafore
 
ICONUK 2016: Back From the Dead: How Bad Code Kills a Good Server
ICONUK 2016: Back From the Dead: How Bad Code Kills a Good ServerICONUK 2016: Back From the Dead: How Bad Code Kills a Good Server
ICONUK 2016: Back From the Dead: How Bad Code Kills a Good ServerSerdar Basegmez
 
Engage 2016: Back From the Dead: How Bad Code Kills a Good Server
Engage 2016: Back From the Dead: How Bad Code Kills a Good ServerEngage 2016: Back From the Dead: How Bad Code Kills a Good Server
Engage 2016: Back From the Dead: How Bad Code Kills a Good ServerSerdar Basegmez
 
Docker compose selenium-grid_tottoruby_25
Docker compose selenium-grid_tottoruby_25Docker compose selenium-grid_tottoruby_25
Docker compose selenium-grid_tottoruby_25Masayuki Hokimoto
 
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium MeetupSelenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium MeetupDave Haeffner
 
The wild wild west of Selenium Capabilities
The wild wild west of Selenium CapabilitiesThe wild wild west of Selenium Capabilities
The wild wild west of Selenium CapabilitiesAdi Ofri
 
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...COMAQA.BY
 
Fullstack End-to-end test automation with Node.js, one year later
Fullstack End-to-end test automation with Node.js, one year laterFullstack End-to-end test automation with Node.js, one year later
Fullstack End-to-end test automation with Node.js, one year laterMek Srunyu Stittri
 
Node.js and Selenium Webdriver, a journey from the Java side
Node.js and Selenium Webdriver, a journey from the Java sideNode.js and Selenium Webdriver, a journey from the Java side
Node.js and Selenium Webdriver, a journey from the Java sideMek Srunyu Stittri
 
Android Automation Testing with Selendroid
Android Automation Testing with SelendroidAndroid Automation Testing with Selendroid
Android Automation Testing with SelendroidVikas Thange
 
IBM Connect 2017: Back from the Dead: When Bad Code Kills a Good Server
IBM Connect 2017: Back from the Dead: When Bad Code Kills a Good ServerIBM Connect 2017: Back from the Dead: When Bad Code Kills a Good Server
IBM Connect 2017: Back from the Dead: When Bad Code Kills a Good ServerSerdar Basegmez
 
Selenium Tips & Tricks
Selenium Tips & TricksSelenium Tips & Tricks
Selenium Tips & TricksDave Haeffner
 
20170302 tryswift tasting_tests
20170302 tryswift tasting_tests20170302 tryswift tasting_tests
20170302 tryswift tasting_testsKazuaki Matsuo
 
BP 308 - The Journey to Becoming a Social Application Developer
BP 308 - The Journey to Becoming a Social Application DeveloperBP 308 - The Journey to Becoming a Social Application Developer
BP 308 - The Journey to Becoming a Social Application DeveloperSerdar Basegmez
 
BP207 - Meet the Java Application Server You Already Own – IBM Domino
BP207 - Meet the Java Application Server You Already Own – IBM DominoBP207 - Meet the Java Application Server You Already Own – IBM Domino
BP207 - Meet the Java Application Server You Already Own – IBM DominoSerdar Basegmez
 
ICONUK 2013 - An XPager's Guide to Process Server-Side Jobs on IBMÂŽ DominoÂŽ
ICONUK 2013 - An XPager's Guide to Process Server-Side Jobs on IBMÂŽ DominoÂŽICONUK 2013 - An XPager's Guide to Process Server-Side Jobs on IBMÂŽ DominoÂŽ
ICONUK 2013 - An XPager's Guide to Process Server-Side Jobs on IBMÂŽ DominoÂŽSerdar Basegmez
 

Andere mochten auch (20)

ICONUK 2015: How to Embrace Your XPages Plugin Super Powers
ICONUK 2015: How to Embrace Your XPages Plugin Super PowersICONUK 2015: How to Embrace Your XPages Plugin Super Powers
ICONUK 2015: How to Embrace Your XPages Plugin Super Powers
 
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!
 
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...
 
BDD to the Bone: Using Behave and Selenium to Test-Drive Web Applications
BDD to the Bone: Using Behave and Selenium to Test-Drive Web ApplicationsBDD to the Bone: Using Behave and Selenium to Test-Drive Web Applications
BDD to the Bone: Using Behave and Selenium to Test-Drive Web Applications
 
Appium
AppiumAppium
Appium
 
ICONUK 2016: Back From the Dead: How Bad Code Kills a Good Server
ICONUK 2016: Back From the Dead: How Bad Code Kills a Good ServerICONUK 2016: Back From the Dead: How Bad Code Kills a Good Server
ICONUK 2016: Back From the Dead: How Bad Code Kills a Good Server
 
Engage 2016: Back From the Dead: How Bad Code Kills a Good Server
Engage 2016: Back From the Dead: How Bad Code Kills a Good ServerEngage 2016: Back From the Dead: How Bad Code Kills a Good Server
Engage 2016: Back From the Dead: How Bad Code Kills a Good Server
 
Docker compose selenium-grid_tottoruby_25
Docker compose selenium-grid_tottoruby_25Docker compose selenium-grid_tottoruby_25
Docker compose selenium-grid_tottoruby_25
 
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium MeetupSelenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
 
The wild wild west of Selenium Capabilities
The wild wild west of Selenium CapabilitiesThe wild wild west of Selenium Capabilities
The wild wild west of Selenium Capabilities
 
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
 
Fullstack End-to-end test automation with Node.js, one year later
Fullstack End-to-end test automation with Node.js, one year laterFullstack End-to-end test automation with Node.js, one year later
Fullstack End-to-end test automation with Node.js, one year later
 
Node.js and Selenium Webdriver, a journey from the Java side
Node.js and Selenium Webdriver, a journey from the Java sideNode.js and Selenium Webdriver, a journey from the Java side
Node.js and Selenium Webdriver, a journey from the Java side
 
Android Automation Testing with Selendroid
Android Automation Testing with SelendroidAndroid Automation Testing with Selendroid
Android Automation Testing with Selendroid
 
IBM Connect 2017: Back from the Dead: When Bad Code Kills a Good Server
IBM Connect 2017: Back from the Dead: When Bad Code Kills a Good ServerIBM Connect 2017: Back from the Dead: When Bad Code Kills a Good Server
IBM Connect 2017: Back from the Dead: When Bad Code Kills a Good Server
 
Selenium Tips & Tricks
Selenium Tips & TricksSelenium Tips & Tricks
Selenium Tips & Tricks
 
20170302 tryswift tasting_tests
20170302 tryswift tasting_tests20170302 tryswift tasting_tests
20170302 tryswift tasting_tests
 
BP 308 - The Journey to Becoming a Social Application Developer
BP 308 - The Journey to Becoming a Social Application DeveloperBP 308 - The Journey to Becoming a Social Application Developer
BP 308 - The Journey to Becoming a Social Application Developer
 
BP207 - Meet the Java Application Server You Already Own – IBM Domino
BP207 - Meet the Java Application Server You Already Own – IBM DominoBP207 - Meet the Java Application Server You Already Own – IBM Domino
BP207 - Meet the Java Application Server You Already Own – IBM Domino
 
ICONUK 2013 - An XPager's Guide to Process Server-Side Jobs on IBMÂŽ DominoÂŽ
ICONUK 2013 - An XPager's Guide to Process Server-Side Jobs on IBMÂŽ DominoÂŽICONUK 2013 - An XPager's Guide to Process Server-Side Jobs on IBMÂŽ DominoÂŽ
ICONUK 2013 - An XPager's Guide to Process Server-Side Jobs on IBMÂŽ DominoÂŽ
 

Ähnlich wie ICONUK 2016: REST Assured, Freeing Your Domino Data Has Never Been That Easy!

Cdm mil-18 - hypermedia ap is for headless platforms and data integration
Cdm mil-18 - hypermedia ap is for headless platforms and data integrationCdm mil-18 - hypermedia ap is for headless platforms and data integration
Cdm mil-18 - hypermedia ap is for headless platforms and data integrationDavid GĂłmez GarcĂ­a
 
Application Development & Database Choices: Postgres Support for non Relation...
Application Development & Database Choices: Postgres Support for non Relation...Application Development & Database Choices: Postgres Support for non Relation...
Application Development & Database Choices: Postgres Support for non Relation...EDB
 
Crafting Evolvable Api Responses
Crafting Evolvable Api ResponsesCrafting Evolvable Api Responses
Crafting Evolvable Api Responsesdarrelmiller71
 
MIKE Stack Introduction - MongoDB, io.js, KendoUI, and Express
MIKE Stack Introduction - MongoDB, io.js, KendoUI, and ExpressMIKE Stack Introduction - MongoDB, io.js, KendoUI, and Express
MIKE Stack Introduction - MongoDB, io.js, KendoUI, and ExpressCharlie Key
 
JavaOne Brasil 2016: JavaEE e HTML5: da web/desktop ao mobile
JavaOne Brasil 2016: JavaEE e HTML5: da web/desktop ao mobileJavaOne Brasil 2016: JavaEE e HTML5: da web/desktop ao mobile
JavaOne Brasil 2016: JavaEE e HTML5: da web/desktop ao mobileLoiane Groner
 
Introducing Azure DocumentDB - NoSQL, No Problem
Introducing Azure DocumentDB - NoSQL, No ProblemIntroducing Azure DocumentDB - NoSQL, No Problem
Introducing Azure DocumentDB - NoSQL, No ProblemAndrew Liu
 
Cross-Platform Data Access for Android and iPhone
Cross-Platform Data Access for Android and iPhoneCross-Platform Data Access for Android and iPhone
Cross-Platform Data Access for Android and iPhonePeter Friese
 
REST easy with API Platform
REST easy with API PlatformREST easy with API Platform
REST easy with API PlatformAntonio Peric-Mazar
 
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)Pat Patterson
 
R-Users Group JSON and ReST Introduction using Twitter
R-Users Group JSON and ReST Introduction using TwitterR-Users Group JSON and ReST Introduction using Twitter
R-Users Group JSON and ReST Introduction using TwitterKevin Smith
 
OSCON 2011 CouchApps
OSCON 2011 CouchAppsOSCON 2011 CouchApps
OSCON 2011 CouchAppsBradley Holt
 
Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2kriszyp
 
Information Intermediaries
Information IntermediariesInformation Intermediaries
Information IntermediariesDave Reynolds
 
How to separate the f2 e and sde in web development for_taobao
How to separate the f2 e and sde in web development for_taobaoHow to separate the f2 e and sde in web development for_taobao
How to separate the f2 e and sde in web development for_taobaotaobao.com
 
Document Databases & RavenDB
Document Databases & RavenDBDocument Databases & RavenDB
Document Databases & RavenDBBrian Ritchie
 
CTS Conference Web 2.0 Tutorial Part 2
CTS Conference Web 2.0 Tutorial Part 2CTS Conference Web 2.0 Tutorial Part 2
CTS Conference Web 2.0 Tutorial Part 2Geoffrey Fox
 
Engage 2023: Taking Domino Apps to the next level by providing a Rest API
Engage 2023: Taking Domino Apps to the next level by providing a Rest APIEngage 2023: Taking Domino Apps to the next level by providing a Rest API
Engage 2023: Taking Domino Apps to the next level by providing a Rest APISerdar Basegmez
 
Html5 and web technology update
Html5 and web technology updateHtml5 and web technology update
Html5 and web technology updateDoug Domeny
 
DevOps in the era of serverless computing - Alessandro Vozza - Codemotion Ams...
DevOps in the era of serverless computing - Alessandro Vozza - Codemotion Ams...DevOps in the era of serverless computing - Alessandro Vozza - Codemotion Ams...
DevOps in the era of serverless computing - Alessandro Vozza - Codemotion Ams...Codemotion
 
NoSQL (Not Only SQL)
NoSQL (Not Only SQL)NoSQL (Not Only SQL)
NoSQL (Not Only SQL)Pouria Amirian
 

Ähnlich wie ICONUK 2016: REST Assured, Freeing Your Domino Data Has Never Been That Easy! (20)

Cdm mil-18 - hypermedia ap is for headless platforms and data integration
Cdm mil-18 - hypermedia ap is for headless platforms and data integrationCdm mil-18 - hypermedia ap is for headless platforms and data integration
Cdm mil-18 - hypermedia ap is for headless platforms and data integration
 
Application Development & Database Choices: Postgres Support for non Relation...
Application Development & Database Choices: Postgres Support for non Relation...Application Development & Database Choices: Postgres Support for non Relation...
Application Development & Database Choices: Postgres Support for non Relation...
 
Crafting Evolvable Api Responses
Crafting Evolvable Api ResponsesCrafting Evolvable Api Responses
Crafting Evolvable Api Responses
 
MIKE Stack Introduction - MongoDB, io.js, KendoUI, and Express
MIKE Stack Introduction - MongoDB, io.js, KendoUI, and ExpressMIKE Stack Introduction - MongoDB, io.js, KendoUI, and Express
MIKE Stack Introduction - MongoDB, io.js, KendoUI, and Express
 
JavaOne Brasil 2016: JavaEE e HTML5: da web/desktop ao mobile
JavaOne Brasil 2016: JavaEE e HTML5: da web/desktop ao mobileJavaOne Brasil 2016: JavaEE e HTML5: da web/desktop ao mobile
JavaOne Brasil 2016: JavaEE e HTML5: da web/desktop ao mobile
 
Introducing Azure DocumentDB - NoSQL, No Problem
Introducing Azure DocumentDB - NoSQL, No ProblemIntroducing Azure DocumentDB - NoSQL, No Problem
Introducing Azure DocumentDB - NoSQL, No Problem
 
Cross-Platform Data Access for Android and iPhone
Cross-Platform Data Access for Android and iPhoneCross-Platform Data Access for Android and iPhone
Cross-Platform Data Access for Android and iPhone
 
REST easy with API Platform
REST easy with API PlatformREST easy with API Platform
REST easy with API Platform
 
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
 
R-Users Group JSON and ReST Introduction using Twitter
R-Users Group JSON and ReST Introduction using TwitterR-Users Group JSON and ReST Introduction using Twitter
R-Users Group JSON and ReST Introduction using Twitter
 
OSCON 2011 CouchApps
OSCON 2011 CouchAppsOSCON 2011 CouchApps
OSCON 2011 CouchApps
 
Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2
 
Information Intermediaries
Information IntermediariesInformation Intermediaries
Information Intermediaries
 
How to separate the f2 e and sde in web development for_taobao
How to separate the f2 e and sde in web development for_taobaoHow to separate the f2 e and sde in web development for_taobao
How to separate the f2 e and sde in web development for_taobao
 
Document Databases & RavenDB
Document Databases & RavenDBDocument Databases & RavenDB
Document Databases & RavenDB
 
CTS Conference Web 2.0 Tutorial Part 2
CTS Conference Web 2.0 Tutorial Part 2CTS Conference Web 2.0 Tutorial Part 2
CTS Conference Web 2.0 Tutorial Part 2
 
Engage 2023: Taking Domino Apps to the next level by providing a Rest API
Engage 2023: Taking Domino Apps to the next level by providing a Rest APIEngage 2023: Taking Domino Apps to the next level by providing a Rest API
Engage 2023: Taking Domino Apps to the next level by providing a Rest API
 
Html5 and web technology update
Html5 and web technology updateHtml5 and web technology update
Html5 and web technology update
 
DevOps in the era of serverless computing - Alessandro Vozza - Codemotion Ams...
DevOps in the era of serverless computing - Alessandro Vozza - Codemotion Ams...DevOps in the era of serverless computing - Alessandro Vozza - Codemotion Ams...
DevOps in the era of serverless computing - Alessandro Vozza - Codemotion Ams...
 
NoSQL (Not Only SQL)
NoSQL (Not Only SQL)NoSQL (Not Only SQL)
NoSQL (Not Only SQL)
 

KĂźrzlich hochgeladen

Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Hararemasabamasaba
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfkalichargn70th171
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
SHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationSHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationShrmpro
 

KĂźrzlich hochgeladen (20)

Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
SHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationSHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions Presentation
 

ICONUK 2016: REST Assured, Freeing Your Domino Data Has Never Been That Easy!

  • 1. REST Assured, Freeing Your Domino Data Has Never Been That Easy! Serdar Basegmez, Developi Information Systems 16th September 2016
  • 2. • IBM Champion (2011 - 2016) • Developi Information Systems, Istanbul • Contributing… • OpenNTF / LUGTR / LotusNotus.com • Featured on… • Engage UG, IBM Connect, ICON UK, NotesIn9… • Also… • Blogger and Podcaster on Scientic Skepticism Serdar Başeğmez
  • 3. RESTful Web Services Representational state transfer (REST) is an architectural style used for web development. Systems and sites designed using this style aim for fast performance, reliability and the ability to scale (to grow and easily support extra users). To achieve these goals, developers work with reusable components that can be managed and updated without affecting the system as a whole while it is running. Source: https://en.wikipedia.org/wiki/Representational_state_transfer
  • 5. Old School Web Applications Source: https://speakerdeck.com/jeffschenck/rest-easy-api-security-done-right User Interface Business Logic Datastore Front-end Back-end ASP, PHP, CGI, Web Agents, JSP, etc. ← HTML, CSS, JavaScript Forms →
  • 6. Web Applications Evolving User Interface Business Logic Datastore Front-end Back-end Async web apps, Ruby on Rails, Django, JSF, XPages, etc. ← HTML, CSS, JavaScript Forms, AJAX →
  • 7. Web Applications Evolving User Interface Business Logic Datastore Front-end Back-end Modern Web frameworks, Angular.js, React.js, etc. ← HTML, CSS, JavaScript ← REST →
  • 8. Web Applications Evolving User Interface Business Logic Datastore Mobile Applications Back-end Modern Web frameworks, Angular.js, React.js, etc. ← HTML, CSS, JavaScript ← REST → Front-end
  • 9. Web Applications Evolving User Interface Business Logic Datastore Mobile Applications Back-end Modern Web frameworks, Angular.js, React.js, etc. ← HTML, CSS, JavaScript ← REST → Front-end Microservice Microservice Microservice
  • 10. RESTful, Everywhere! Solid Architecture Well-dened practices Widespread use in modern frameworks Easily consumable in micro environments
  • 11. Stateless / Cacheable / Layered Every request processed independently Everything cacheable Client does not care who cooked the meal in the kitchen ⇣ Scalable, Robust, Resilient
  • 12. The Conversation Makes Sense! Source: http://www.bizcoder.com/a-fresh-coat-of-rest-paint-on-a-soap-stack
  • 13. The Conversation Makes Sense! GET /twink/contacts/DLEY-ACLH6Y HTTP/1.1 Host: homer.developi.info Cache-Control: no-cache { "zip": "13202", "state": "NY", "lastName": "Abbate", "middle": "J", "country": "US", "emailAddress": "Jessica.J.Abbate@trashymail.com", "number": "DLEY-ACLH6Y", "city": "Syracuse", "firstName": "Jessica" }
  • 14. The Conversation Makes Sense! http://appserver.company.com/apps/contacts.nsf/ GiveMeTheContactWeNeedPleaseAgent?OpenAgent&id=1522 or… http://appserver.company.com/api/contacts/1522
  • 15. Conventions on URLs GET http://appserver.company.com/api/contacts GET http://appserver.company.com/api/contacts/UK/London POST http://appserver.company.com/api/contacts Retrieve Contacts / Create a new Contact…
  • 16. Conventions on URLs GET http://appserver.company.com/api/contacts/1522 PUT http://appserver.company.com/api/contacts/1522 DELETE http://appserver.company.com/api/contacts/1522 Retrieve/Update/Delete the Contact resource with id=1522…
  • 17. URI GET PUT POST DELETE /contacts/ List Contacts Replace Contacts Create New Contact Delete Contacts /contacts/id Retrieve a Contact Replace a Contact N/A (generally) Delete a Contact Source: https://en.wikipedia.org/wiki/Representational_state_transfer Conventions on URLs
  • 18. Unconventional uses in URLs GET https://api.twitter.com/1.1/statuses/show.json?id=1234567890 Retrieve the Tweet with id=1234567890…
  • 20. Motivation Putting stuff into a small device! Socializing with other developers! Opening to the wild… New animals out there! Enough! We are moving… All / Some / None of the above
  • 21. Options Domino Access Services (DAS) Extension Library Components for REST Hardcoding (XAgents, Web agents) Apache Wink Servlets
  • 22. RESTful Options on Domino Benets Challenges Suggested When? Domino Access Services
 (DAS) No Backend Code Zero-setup Limited Control No Business Logic Exposes the Internals Simple internal integrations ExtLib Components
 for REST Less Backend Code Minimal Setup Partial/Full Customization Error Handling Spaghetti Code URL Conventions Simple needs for a limited scope Hardcoding
 (XAgents, Web agents) Tailor-made No Learning Curve Hardcoding Everything Spaghetti Code URL Conventions Very specic needs for a limited scope Apache Wink Servlets Tailor-made Based on JAX-RS OSGi Benets Learning Curve Barrier to Entry Large scope implementations, API Design
  • 23. Apache Wink Project Complete implementation of JAX-RS v1.1 Specication Also includes RESTful Client module Extension Library comes with Apache Wink 1.1.2 Open Source Spring integration, WebDAV support
  • 24. Apache Wink Runtime Application Code Apache Wink Basic Architecture Wink Servlet (Customizable) HTTP/HTTPS Client Datastore Resource Resource Resource Resource Controllers Data Accessors Tools/Utilities Request Processor Helpers /BaseURI/* /BaseURI/Path-Patterns
  • 25. Resource and Resource Representation Collection ResourceResourceResource SubresourceSubresourceSubresource Resource • Any addressable object is a resource. • A resource class is; • Implements RESTful interactions (GET, POST, etc.) • A pure Java object decorated with annotations • Do not confuse with Model class. Resource Representation • The content of an object is called as Representation • JSON, XML, Text, Form data, etc.
  • 26. @Path("/contacts") public class ContactResource { private DominoAccessor accessor = new DominoAccessor(ContextInfo.getUserSession()); @GET() public Response getContactList( @QueryParam("start") int start, @QueryParam("count") int count) { List<Contact> contactList = accessor.pullContacts(start, count); String result = ModelUtils.toJson(contactList).toString(); return Response.ok(result, MediaType.APPLICATION_JSON).build(); } @Path("/{id}") @GET() public Response getContact(@PathParam("id") String id) { Contact contact = accessor.findContact(id); if(null == contact) { throw new WebApplicationException(Response.Status.NOT_FOUND); } else { String result = ModelUtils.toJson(contact).toString(); return Response.ok(result, MediaType.APPLICATION_JSON).build(); } } } { "zip": "13202", "state": "NY", "lastName": "Abbate", "middle": "J", "country": "US", "emailAddress": "Jessica.J.Abbate@trashymail.com", "number": "DLEY-ACLH6Y", "city": "Syracuse", "firstName": "Jessica" } Contact Resource Class Contact Resource Short JSON Representation
  • 27. Resources @Path("/contacts") public class ContactResource { private DominoAccessor accessor = new DominoAccessor(ContextInfo.getUserSession()); @GET() public Response getContactList( @QueryParam("start") int start, @QueryParam("count") int count) { List<Contact> contactList = accessor.pullContacts(start, count); String result = ModelUtils.toJson(contactList).toString(); return Response.ok(result, MediaType.APPLICATION_JSON).build(); } @Path("/{id}") @GET() public Response getContact(@PathParam("id") String id) { Contact contact = accessor.findContact(id); if(null == contact) { throw new WebApplicationException(Response.Status.NOT_FOUND); } else { String result = ModelUtils.toJson(contact).toString(); return Response.ok(result, MediaType.APPLICATION_JSON).build(); } } } The base URI for the resource In the demo, the root path of the plugin is “/twink”. So this class is enabled for requests made to: /twink/contacts/*
  • 29. Resources @Path("/contacts") public class ContactResource { private DominoAccessor accessor = new DominoAccessor(ContextInfo.getUserSession()); @GET() public Response getContactList( @QueryParam("start") int start, @QueryParam("count") int count) { List<Contact> contactList = accessor.pullContacts(start, count); String result = ModelUtils.toJson(contactList).toString(); return Response.ok(result, MediaType.APPLICATION_JSON).build(); } @Path("/{id}") @GET() public Response getContact(@PathParam("id") String id) { Contact contact = accessor.findContact(id); if(null == contact) { throw new WebApplicationException(Response.Status.NOT_FOUND); } else { String result = ModelUtils.toJson(contact).toString(); return Response.ok(result, MediaType.APPLICATION_JSON).build(); } } } This method responds to GET requests. No path dened, so this is the default responder.
  • 30. Resources @Path("/contacts") public class ContactResource { private DominoAccessor accessor = new DominoAccessor(ContextInfo.getUserSession()); @GET() public Response getContactList( @QueryParam("start") int start, @QueryParam("count") int count) { List<Contact> contactList = accessor.pullContacts(start, count); String result = ModelUtils.toJson(contactList).toString(); return Response.ok(result, MediaType.APPLICATION_JSON).build(); } @Path("/{id}") @GET() public Response getContact(@PathParam("id") String id) { Contact contact = accessor.findContact(id); if(null == contact) { throw new WebApplicationException(Response.Status.NOT_FOUND); } else { String result = ModelUtils.toJson(contact).toString(); return Response.ok(result, MediaType.APPLICATION_JSON).build(); } } } This method also responds to GET requests. But it the request path will be elected based on this format.
  • 31. Resources @Path("/contacts") public class ContactResource { private DominoAccessor accessor = new DominoAccessor(ContextInfo.getUserSession()); @GET() public Response getContactList( @QueryParam("start") int start, @QueryParam("count") int count) { List<Contact> contactList = accessor.pullContacts(start, count); String result = ModelUtils.toJson(contactList).toString(); return Response.ok(result, MediaType.APPLICATION_JSON).build(); } @Path("/{id}") @GET() public Response getContact(@PathParam("id") String id) { Contact contact = accessor.findContact(id); if(null == contact) { throw new WebApplicationException(Response.Status.NOT_FOUND); } else { String result = ModelUtils.toJson(contact).toString(); return Response.ok(result, MediaType.APPLICATION_JSON).build(); } } } Parameters will be injected into methods. /contacts?start=X&count=Y /contacts/someId Wink servlet will handle type conversion. It supports ordinary java objects, enums, primitives, etc.
  • 32. Resources @Path("/contacts") public class ContactResource { private DominoAccessor accessor = new DominoAccessor(ContextInfo.getUserSession()); @GET() public Response getContactList( @QueryParam("start") int start, @QueryParam("count") int count) { List<Contact> contactList = accessor.pullContacts(start, count); String result = ModelUtils.toJson(contactList).toString(); return Response.ok(result, MediaType.APPLICATION_JSON).build(); } @Path("/{id}") @GET() public Response getContact(@PathParam("id") String id) { Contact contact = accessor.findContact(id); if(null == contact) { throw new WebApplicationException(Response.Status.NOT_FOUND); } else { String result = ModelUtils.toJson(contact).toString(); return Response.ok(result, MediaType.APPLICATION_JSON).build(); } } } There are lots of options of returning response. ResponseBuilders and some other helpers make it quite easy.
  • 33. Resources @Path("/contacts") public class ContactResource { private DominoAccessor accessor = new DominoAccessor(ContextInfo.getUserSession()); @GET() public Response getContactList( @QueryParam("start") int start, @QueryParam("count") int count) { List<Contact> contactList = accessor.pullContacts(start, count); String result = ModelUtils.toJson(contactList).toString(); return Response.ok(result, MediaType.APPLICATION_JSON).build(); } @Path("/{id}") @GET() public Response getContact(@PathParam("id") String id) { Contact contact = accessor.findContact(id); if(null == contact) { throw new WebApplicationException(Response.Status.NOT_FOUND); } else { String result = ModelUtils.toJson(contact).toString(); return Response.ok(result, MediaType.APPLICATION_JSON).build(); } } } Wink handles much of the error handling. Still you can inject your own errors.
  • 34. Resources @Path("/contacts") public class ContactResource { ………… @POST() @Consumes(MediaType.APPLICATION_JSON) public Response postContactJson(String body) { Contact contact = ModelUtils.buildContactfromJson(body); accessor.saveNewContact(contact); String result = ModelUtils.toJson(contact).toString(); return Response.ok(result, MediaType.APPLICATION_JSON).build(); } @POST() @Consumes(MediaType.MULTIPART_FORM_DATA) public Response postContactForm(BufferedInMultiPart formData) { Contact contact = ModelUtils.buildContactfromMultipart(formData); accessor.saveNewContact(contact); String result = ModelUtils.toJson(contact).toString(); return Response.ok(result, MediaType.APPLICATION_JSON).build(); } } This methods respond to POST requests. This time the selection depends on the incoming data type. Client marks the request with Content-Type header and Wink will select the appropriate method here.
  • 35. Resources @Path("/contacts") public class ContactResource { ………… @POST() @Consumes(MediaType.APPLICATION_JSON) public Response postContactJson(String body) { Contact contact = ModelUtils.buildContactfromJson(body); accessor.saveNewContact(contact); String result = ModelUtils.toJson(contact).toString(); return Response.ok(result, MediaType.APPLICATION_JSON).build(); } @POST() @Consumes(MediaType.MULTIPART_FORM_DATA) public Response postContactForm(BufferedInMultiPart formData) { Contact contact = ModelUtils.buildContactfromMultipart(formData); accessor.saveNewContact(contact); String result = ModelUtils.toJson(contact).toString(); return Response.ok(result, MediaType.APPLICATION_JSON).build(); } } Wink injects the incoming data into the method automatically. Apache Wink also provides several classes to process different data formats (Multipart, Atom, XML, JSON, etc.)
  • 37. What is your purpose? Quick and narrow-scoped services Moving your app to a different web framework Enable applications for native mobile access Create a REST API for your apps
  • 38. Plan rst! Determine resource types and capabilities to be allowed
 (Resources, Representations, actions, etc.) The distribution of tasks
 (Front-end and Back-end) responsibilities Collaborate with consumers, if you can Versioning / Test API
  • 39. Sketch an architecture Keep your architecture layered Let your luggage be history Design as if the consumer will exploit your application, even you!
  • 40. A sample architecture RESTful Resources ResourceResourceResource SubresourceSubresourceSubresource Model Classes Data Objects Conversion Resource Representation ←→ Model Data Access Model ←→ Documents Business Logic Actions (CRUD, etc.) Rules, validations, etc. Databases ResourceResourceDocuments ResourceResourceViews ResourceResourceetc. Security Utilities
  • 42. Getting hands dirty Test and Development Local Domino Server Domino Designer Client Eclipse / XPages SDK / Debug Plugin REST testing utility (e.g. Postman) Plugin Development Guides / Demos / Blogs Congure Eclipse Plugin template for Wink project Add Libraries to your project (See Resources section)
  • 43. Annotations • @Path
 Species the relative path for a resource class or method • @GET, @PUT, @POST, @DELETE, @HEAD
 Specify the HTTP request type of a resource • @Produces
 Species the response Internet media types (content negotiation) • @Consumes
 Species the accepted request Internet media types.
  • 44. Annotations • @PathParam
 Binds the method parameter to a path segment • @QueryParam, @MatrixParam, @FormParam
 Binds the method parameter to a query/matrix/form parameter • @HeaderParam, @CookieParam
 Binds the method parameter to a HTTP header/cookie parameter • @Context
 Returns the entire context of the object
 @Context HttpServletRequest request • @DefaultValue
 Species a default value for the above bindings when the key is not found.
 @Default(“1”) @QueryParam(“start”) int start
  • 45. Annotations • @Provider
 Providers are used for transformation between entities and representations. Wink comes with several providers and more can be developed for special purposes. • @Asset
 More advanced implementation of providers. Especially suitable for automatic transformation between data objects and representations. • @Parent
 Denes a parent resource that has a base URI. (See Versioning) • @Scope
 By default, every resource class instantiated per request. Scope can dene longer life cycles for resource instances (e.g. singletons).
  • 46. JSON Handling • Wink and IBM Commons provide JSON Object helpers • A library for JSON processing strongly suggested • Hardcoding JSON data structure becomes more and more difcult. • Automatic Serialization / Deserialization is life saving • Tip: Look into Jackson and GSON libraries
  • 47. Versioning @Path("/v1") public class com.developi.wink.demo.api.v1.VersionRoot {} @Parent(com.developi.wink.demo.api.v1.VersionRoot.class) @Path("/ping") public class com.developi.wink.demo.api.v1.PingResource { @GET public Response ping() { return Response.ok("<h1>Hello World Version 1!</h1>", MediaType.TEXT_HTML).build(); } } @Parent(com.developi.wink.demo.api.v2.VersionRoot.class) @Path("/ping") public class com.developi.wink.demo.api.v2.PingResource { @GET public Response ping() { return Response.ok("<h1>Hello World Version 2!</h1>", MediaType.TEXT_HTML).build(); } } @Path("/v2") public class com.developi.wink.demo.api.v2.VersionRoot {} Responds to “/root/v2/ping” Responds to “/root/v1/ping”
  • 48. Notes Session • NotesSession related to the authenticated user: • ContextInfo.getUserSession() • At the servlet level, • No SessionAsSigner • No SessionAsSignerWithFullAccess • No CurrentDatabase • Elevated level of access is a bit tricky. • Refer to DominoRunner XSnippet
  • 49. OpenNTF Domino API • OpenNTF Domino API is compatible with Apache Wink • One trick: You need to customize the servlet • Refer to the blog post by Paul Withers • Advantages • No recycle! • Modern Java practices (Maps, generics, etc.) • Much better development experience • Ability to use elevated session • Refer to the OpenNTF Domino API Project page for more
  • 51. Summary RESTful Services Architecture Designing RESTful services for Domino Applications Basic Concepts around RESTful Services Architecture Examples Annotations used by Apache Wink Some tricks for Domino developers
  • 52. Takeaway Download and play with the template and demo plugins Experiment JAX-RS annotations Get yourself familiar with Plugin development Download Extension Library source code and look its design Study on RESTful design practices and JAX-RS concepts
  • 53. Resources • Serdar Başeğmez: Demo Plugin and Apache Wink Template
 https://github.com/sbasegmez/RestAssuredDemo • Apache Wink Project
 https://wink.apache.org/ • Paul Withers: From XPages Hero To OSGi Guru: Taking The Scary Out Of Building Extension Libraries
 http://www.slideshare.net/paulswithers1/ibm-connected-2015-mas103-xpages-performance-and-scalability • Paul Withers: XPages OSGi Plugins series
 http://www.intec.co.uk/xpages-osgi-plugins-1-an-introduction/ • John Cooper: Domino OSGI (Part 1) - Conguring Eclipse for XPages OSGI Plugins
 http://developmentblog.johnmcooper.co.uk/2014/05/conguring-eclipse-for-xpages-osgi-plugins-part1.html • John Dalsgaard: Wrap An Existing Jar File Into A Plug-in
 https://www.dalsgaard-data.eu/blog/wrap-an-existing-jar-le-into-a-plug-in/ • Toby Samples: JAX-RS or THE way to do REST in Domino series
 https://tobysamples.wordpress.com/2015/04/28/jax-rs-or-the-way-to-do-rest-in-domino-part-1/ • Jesse Gallagher: Eclipse Tutorial for Domino Developers
 https://github.com/jesse-gallagher/eclipse-tutorial-oct2015/wiki/Java