FAQ

[CouchDB-dev] [jira] Created: (COUCHDB-280) relative links between resources provided by design docs

Dean Landolt
Mar 4, 2009 at 7:23 pm

On Wed, Mar 4, 2009 at 12:15 PM, Jason Davies wrote:

- Show quoted text -

On 4 Mar 2009, at 16:57, Chris Anderson wrote:
On Wed, Mar 4, 2009 at 8:43 AM, Chris Anderson wrote:

On Wed, Mar 4, 2009 at 8:34 AM, Jason Davies <jason@jasondavies.com>
wrote:
I also prefer _render. How about doing the analogous to what we do for
JSON
docs and views, i.e. something like:

/db/_design/foo/_render/renderfun/docid
/db/_design/foo/_render/renderfun/_view/viewname
I do believe this works, but I'm not convinced it is more elegant that
having one name for rendering views and one name for rendering
documents. For one thing, it doesn't take advantage of the
[httpd_design_handlers] extension point, and for another, it's just
plain long!
I think the [httpd_design_handlers] layout is far more elegant than
_list/_show is ugly.

Not totally against it, but to me it's like making an origami
paper-crane, and then adding an elephant leg to it.
That said, let me be clear that I'm flexible and if a consensus
emerges that something that doesn't fit the httpd_design_handlers
extension point is preferred, I'm happy to help change it to that.

Another disadvantage to the deeper URLs required by stacking the doc
and view rendering namespaces is that links from rendered views to
rendered docs start to look like "../../../docrenderfun/docid"
Good points. I must say, having worked with the _list and _show names for
a while now, I don't think they're terrible and personally I've just got
used to them. They're actually slightly similar to Django's list_detail
generic views, which are called "object_list" and "object_detail". Any
other naming ideas from other projects? We could change _show to _detail
but that's an extra 2 characters (!) and I don't think it's any better
really.

Great example. I couldn't agree more.

+1 to httpd_design_handlers, +1 to _list, +0 to show (until something better
emerges).
reply

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions