Hi, Nick.

For the case you described the following strategy is used:
1. User requests some ddoc attachment like index.html
2. There you make XHR requests to CouchDB for the HTML fragments or raw data
3. Compose responses on the page via JS

IIRC blog sofa works in this way. Pretty sure Benjamin (@bigbluehat)
has few more examples on GitHub where similar is used.

--
,,,^..^,,,


On Tue, Nov 17, 2015 at 1:22 PM, Nick <[email protected]> wrote:
> Glad to see this list pop up.
>
> I have a question about using couchdb to serve an app which is not
> javascript-reliant.  In particular I'm wondering about generating HTML pages
> from a number of queries.
>
> I know show functions can render one (and only one) document. List functions
> can render a view, so multiple documents.  But when you need to aggregate a
> number of these together to get a page, couchdb alone seems to have no
> solution. For example, I'd like to be able to combine into a single web page
> the output of a show function to render an article, plus a list to render
> tags, another to render a page index, a third to render the user
> information.  To do this seems to require some javascript on the client, or
> a server-side application in front of couchdb.
>
> In theory a list function could do it but I am guessing the query and the
> rendering for the components would have to be interleaved in a way  which
> doesn't make for easy composition.
>
> I'd like to be proved wrong, because this seems like it would just be a
> small step from what couchdb can do now.  Am I wrong?
>
> Cheers
>
> N
>
>

Reply via email to