couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matteo Caprari <matteo.capr...@gmail.com>
Subject Re: sample couchdb application
Date Sun, 03 Jan 2010 21:45:24 GMT
I'm still working on a patch to have lists consume multiple views.
That should extend a list capability but still probably not cover that
case.

On Sun, Jan 3, 2010 at 9:31 PM, Chris Anderson <jchris@apache.org> wrote:
> On Sun, Jan 3, 2010 at 12:03 PM, Matteo Caprari
> <matteo.caprari@gmail.com> wrote:
>> Hi Chris.
>>
>> I haven't actually integrated nor automated anything: I run jsdoc
>> manually before each redeploy. I'm looking into an
>> integration with couchap but christmas got in the way and accomplished
>> nothing yet.
>>
>> I think I had some problems with ordering by question date because answers don't
>> have the question timestamp and didn't know what key to emit to keep
>> the item adjacent.
>
> The way I handle this in Sofa is by having two views:
>
> One would be all questions by date.
>
> The other is questions together with answers by date. (The question
> and answer groups are in this view in a random order).
>
> There's no sane way to do the second view with the questions also
> sorted by date...
>
> Chris
>
>>
>> But I like your optimism, so I'll try my head again and maybe ask again.
>>
>> I'll sync the app with your suggestions and post the results to this thread.
>>
>> thanks for your support.
>>
>> On Sun, Jan 3, 2010 at 7:07 PM, Chris Anderson <jchris@apache.org> wrote:
>>> On Sun, Jan 3, 2010 at 4:57 AM, Matteo Caprari <matteo.caprari@gmail.com>
wrote:
>>>> Hello list.
>>>>
>>>> I've cranked up a simple couchapp that mimics stackoverflow.com (if you squint).
>>>>
>>>> The idea is to understand couchdb better and provide the base for a
>>>> tutorial, but
>>>> before going any deeper, I'd like to hear from you what is wrong and
>>>> what is good.
>>>
>>> This is great stuff. Really cool. I still don't understand all of how
>>> you've integrated things, but the documentation is really a great
>>> addition.
>>>
>>> I think this is a really cool use case. Thanks for sharing!
>>>
>>> One concern I have is that I don't think you need to be building
>>> custom _ids. You should be able to accomplish your lists and shows
>>> without messing with custom ids, instead using document parameters in
>>> views. Custom ids generally just add code-overhead to apps and
>>> increase the chances of spurious conflicts.
>>>
>>> To avoid double posts, PUT with a random docid should be idempotent,
>>> and fail on duplicate PUTs. If you can't do PUT from your client the
>>> _bulk_docs POST api should work to, if you specify ids. See how
>>> jquery.couch.js has an API for getting UUIDs from the Couch and then
>>> using them on new docs.
>>>
>>> Also, in trunk _show is no longer happy to have bogus ids, you'll get
>>> a 404. You can invoke with no docid at all to accomplish your use
>>> case.
>>>
>>> I'm happy to help more so that when you write your tutorial it
>>> embodies best practices. Just post any questions to this thread!
>>>
>>> Cheers,
>>> Chris
>>>
>>>
>>>>
>>>> So please have a look, but don't expect too much.
>>>>
>>>> Demo: http://caprazzi.net:5984/fortytwo/_design/fortytwo/index.html
>>>> Docs: http://caprazzi.net:5984/fortytwo/_design/fortytwo/docs/index.html
>>>> Source: http://github.com/mcaprari/fortytwo
>>>>
>>>> Docs are created with jsdoc-toolkit and a custom template.
>>>> I think we could integrate it with couchapp to obtain a "view source" feature.
>>>>
>>>> --
>>>> :Matteo Caprari
>>>> matteo.caprari@gmail.com
>>>>
>>>
>>>
>>>
>>> --
>>> Chris Anderson
>>> http://jchrisa.net
>>> http://couch.io
>>>
>>
>>
>>
>> --
>> :Matteo Caprari
>> matteo.caprari@gmail.com
>>
>
>
>
> --
> Chris Anderson
> http://jchrisa.net
> http://couch.io
>



-- 
:Matteo Caprari
matteo.caprari@gmail.com

Mime
View raw message