STRUM, REST, and DETH

October 11, 2005 § Leave a comment

I’ve been noodling some more about how to clarify
the concepts behind STRUM, and particularly how it relates to REST.

I’ve stripped the idea down further to something
I call DETH: like REST, but more so. 🙂
DETH = Dictionaries
Encoding/Transmitting HTML.
I’ve started mocking it up on the
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:

http://www.opendarwin.org/~drernie/deth_example.html

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

What’s this?

You are currently reading STRUM, REST, and DETH at iHack, therefore iBlog.

meta

%d bloggers like this: