Explain?

All REST Monday continues. Except for very large values of "inconsistent" -- like "one or the other doesn't use HTTP" -- I think a little more explanation is needed to support this:

REST-based architectures are not inconsistent with the WFS specification.

Again, the five key principles of REST (use of HTTP is implicit), from Stefan Tilkov again, are:

  • Give every "thing" an ID
  • Link things together
  • Use standard methods
  • Resources with multiple representations
  • Communicate statelessly

The last of these is the only one to which WFS 1.0 strictly adheres. WFS does not specify permanent URIs for individual features; does not specify hypertext links among features, types, and services; uses GET or POST, yes, but interchangeably and in ignorance of PUT and DELETE; and does not specify use of HTTP content negotiation to select data formats. All of Tilkov's REST anti-patterns save number 5 (cookies) are written into the WFS specification, and so it still seems to me that WFS is mostly inconsistent with REST.

Comments

Re: Explain?

Author: Christopher Schmidt

Yes. Thank you. Saves me having to write my own post saying the same thing. :) At some point, I should write about why WFS is so poorly supported with OpenLayers -- while things like FeatureServer take less than a dozen lines of code to write support for. (Well, that and the fact that implementations are scare, examples outside of implementations are scarcer.)