pondělí 26. března 2012

REST constraints questionnaire

As I previously wrote in my blogpost about automatic testing of REST constraints we have some REST constraints we cannot test automatically against black box API. These constraints are:
  • Client-Server
  • Stateless
  • Layered System
So here I am going to propose questionnaire for web developer which can tell us if his application satisfying these criteria. All of the questions should be answered by yes or no.

Note: by application I mean server application.

Client-Server:
Does your application providing service for other machines (clients)? yes
Is that service available to more then one client?  yes
Does your application listening and responding for request on that service? yes

Stateless:
Does your application keeping any context while communicating with client? no
Does the client keeping all the needed context while communicating with your application? yes
Is one client request enough for your application to create appropriate response? yes

Layered System:
Are you leading client to access some part of your server's resources directly by these resources low level api? (E.g. when you need to provide some data from mysql database, do you provide client access to this database so it can query demanded data by itself?) no

(Green are answers that indicating fulfillment of constraint.)

Žádné komentáře:

Okomentovat