Netflix/edda — pull request #61 by ralph-tice (2013-12-02 14:03:13+00:00)
Title: collection discovery / HATEOS

This isn't intended to be merge-able but I wanted to open up discussion around templating vs embedding 'action' URLs in the JSON responses. I think both approaches have their relative merits.

Templating:
Convention based exposure of simple collection traversal along with basic time navigation. Relies on yet-to-be-built ( https://twitter.com/ralphtice/status/407503357016686593 ) UI for field selectors.

Embedding 'action' URLs:
Provides URLs within the JSON responses for simple navigation actions, allows better composition (live inside someone else's UI) but still defers the bulk of complexity plus a simple reference architecture. ex:
{ ...
'referenceUrl' => '//edda/api/v2/aws/collection/documentId'
'previousDocumentUrl' => '//edda/api/v2/aws/collection/documentId?_at=123123'
...
}
We could also combine both approaches -- provide a basic HTML/js view that consumes Edda collections that contain action URLs. I think I am leaning towards this approach since it provides a nice separation between HTML and code and can exist on its own rather than cluttering up the 'API' repo.

Thoughts?