STRUM, REST, and DETH
October 11, 2005 § Leave a comment
the concepts behind STRUM, and particularly how it relates to REST.
I call DETH: like REST, but more so. 🙂
Encoding/Transmitting HTML.
forms-brainstorming page:
http://microformats.org/wiki/forms-brainstorming
DETH is intended to be the microformat
(or HTML compound, whatever) for XHTML Basic
Forms:
http://www.w3.org/TR/xhtml-modularization/abstract_modules.html
That
is, it is a stylized convention for how to parse useful information out of a
human-readable structure.Ê But not just any information.Ê The goal, in
fact, is to extract REST-compliant web services out of XHTML forms.Ê
ÊNot only would this allow you to use a generic web browser to invoke/test
these web services, but it also ensures that the API is (at least minimally, and
possibly significantly)
self-documenting.
The idea is that a
DETH web service is described by a URI, e.g., “http//somesite.com/users”.Ê
You can either:
a)Êdo a GET (with no
body) against that URI, or
b) doÊa POST
containing a ‘dl’ dictionary or an url-encoding key-value
list.
The reply would contain at least
one “class=deth” form or anchor which could be parsed to determine which
messages could be sent as followup. And so on, and so
on…
To be sure, this is not a “full”
REST solution.Ê It wouldn’t support PUT or DELETE, or any input more
complicated than a dictionary.Ê ÊBut that’s the point — the goal is
to build the simplest possible system that does *any* useful work, so we can
find out where the real pressure points are *in practice*.Ê Hopefully this
gets us 80% of the benefit with 20% of the effort.Ê Actually, I think it is
more like 51.2% (80x80x80) of the benefit with 0.8% (20x20x20) of the effort,
but you get the idea.
Rendered (but
non-working) examples are available
at:
Leave a Reply