incubator-couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Davies <ja...@jasondavies.com>
Subject Re: [jira] Created: (COUCHDB-280) relative links between resources provided by design docs
Date Wed, 04 Mar 2009 17:15:00 GMT

On 4 Mar 2009, at 16:57, Chris Anderson wrote:

> On Wed, Mar 4, 2009 at 8:43 AM, Chris Anderson <jchris@apache.org>  
> 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!
>>
>> 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.

--
Jason Davies

www.jasondavies.com


Mime
View raw message