Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The API we are going to expose in our 1.0 pass at web services is entirely about doing CRUD on a data store. We're not dealing with any application flow or business logic. As such we will aim for level "2.5" of the Richardson Maturity Model (described by Martin Fowler here). Resources will include links to URIs of other resources, but the links won't indicate the relationship, rather we're more concerned with exposing our data store. Is this a mistake?not phrased as "rel"s. (We want to support json, we and we're not describing meaningful business-process in those links.)

We will allow Spring to automatically transform our results to json or xml depending on the HTTP request. This probably prevents us from having a proper DAP or XSD. 

Is this a mistake?

Standard CRUD pattern as applied to our API

...

Usually the default representation of a resource will include "ref"-sized versions of other resources, while the full representation includes "default"-sized versions of other resources. For example a patient would include

default

full

{
"personAddress" : {
"uuid" : "3350d0b5-821c-4e5e-ad1d-a9bce331e118",
"display" : "1050 Wishard Blvd., RG5, Indianapolis, IN",
"uri" : "http://.../ws/rest/personaddress/3350d0b5-821c-4e5e-ad1d-a9bce331e118"
},
/* more stuff */
}

{
"personAddress" : {
"uuid" : "3350d0b5-821c-4e5e-ad1d-a9bce331e118",
"address1" : "1050 Wishard Blvd.",
"address2" : "RG5",
"cityVillage" : "Indianapolis",
"stateProvince" : "IN",
"uri" : "http://.../ws/rest/personaddress/3350d0b5-821c-4e5e-ad1d-a9bce331e118"
},
/* more stuff */

A more relevant example of this is that an encounter might contain 100 observations. The default encounter representation would just include a displayable "weight = 70", whereas the full encounter representation would include full details about the "weight" question (e.g. that it's unit is "kg", its range is 0-250, etc).

...