You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Ido Ran <id...@gmail.com> on 2010/09/06 08:37:11 UTC

CouchDB The Definitive Guide - Part III

Hi,
I'm learning CouchDB using the CouchDB Definitive Guide (draft edition).
I've got to part III where I start playing with Sofa application to get my
hand on real CouchApp, but there are some prolems:


   1. The code presented in the book does not match the code in sofa github
   repository - jchris's sofa at master - GitHub<http://github.com/jchris/sofa>
   2. The application in the github repository does not work right. I can
   push it to CouchDB (I'm using couchone.com or couch.io server) but the
   post form does not work, currently because app.docForm is deprecated but I
   don't understand how to fix it.
   3. When I push the app to CouchDB server I get a database with single
   document with _id of sofa. I thought it should be a collection of documents,
   not single document.

Thank you,
Ido

Re: CouchDB The Definitive Guide - Part III

Posted by Ido Ran <id...@gmail.com>.
Hi,
I suggest looking at Focus <http://github.com/couchone/Focus> couchapp and
taskr <http://github.com/jchris/taskr> couchapp.
They both small enough application from which I learn more about how to
write CouchApps.

Ido

On Thu, Sep 16, 2010 at 3:17 PM, Foobee <fo...@sofd.de> wrote:

> Ido Ran <id...@...> writes:
>
> >
> > Hi,
> > I'm learning CouchDB using the CouchDB Definitive Guide (draft edition).
> > I've got to part III where I start playing with Sofa application to get
> my
> > hand on real CouchApp, but there are some prolems:
> >
> >    1. The code presented in the book does not match the code in sofa
> github
> >    repository - jchris's sofa at master - GitHub<
> http://github.com/jchris/sofa>
> >    2. The application in the github repository does not work right. I can
> >    push it to CouchDB (I'm using couchone.com or couch.io server) but
> the
> >    post form does not work, currently because app.docForm is deprecated
> but I
> >    don't understand how to fix it.
> >    3. When I push the app to CouchDB server I get a database with single
> >    document with _id of sofa. I thought it should be a collection of
> documents,
> >    not single document.
> >
> > Thank you,
> > Ido
> >
>
> Hi,
>
> we have the same problem with the post form (edit.html). The actual sofa
> app
> does not work with  couchapp. In jquery.couchapp.js i find this:
>
> function docForm() {
>  alert("docForm123 has been moved to vendor/couchapp/lib/docForm.js,
>  use app.require to load") };
>
> But sofa is not adapted.
>
> Has anyone an idea to fix sofa?
>
>
> Thanks,
>
> Foobee
>
>
>
>

Re: CouchDB The Definitive Guide - Part III

Posted by Chris Anderson <jc...@apache.org>.
On Thu, Sep 16, 2010 at 6:17 AM, Foobee <fo...@sofd.de> wrote:
>
> Hi,
>
> we have the same problem with the post form (edit.html). The actual sofa app
> does not work with  couchapp. In jquery.couchapp.js i find this:
>
> function docForm() {
>  alert("docForm123 has been moved to vendor/couchapp/lib/docForm.js,
>  use app.require to load") };
>
> But sofa is not adapted.
>

sorry about this. my oversight. I've got it up on my workbench now, so
hopefully that means my free time over the next couple of days will go
to cleaning it up.

Chris

> Has anyone an idea to fix sofa?
>
>
> Thanks,
>
> Foobee
>
>
>
>



-- 
Chris Anderson
http://jchrisa.net
http://couch.io

Re: CouchDB The Definitive Guide - Part III

Posted by Foobee <fo...@sofd.de>.
Ido Ran <id...@...> writes:

> 
> Hi,
> I'm learning CouchDB using the CouchDB Definitive Guide (draft edition).
> I've got to part III where I start playing with Sofa application to get my
> hand on real CouchApp, but there are some prolems:
> 
>    1. The code presented in the book does not match the code in sofa github
>    repository - jchris's sofa at master - GitHub<http://github.com/jchris/sofa>
>    2. The application in the github repository does not work right. I can
>    push it to CouchDB (I'm using couchone.com or couch.io server) but the
>    post form does not work, currently because app.docForm is deprecated but I
>    don't understand how to fix it.
>    3. When I push the app to CouchDB server I get a database with single
>    document with _id of sofa. I thought it should be a collection of documents,
>    not single document.
> 
> Thank you,
> Ido
> 

Hi,

we have the same problem with the post form (edit.html). The actual sofa app
does not work with  couchapp. In jquery.couchapp.js i find this:

function docForm() {
  alert("docForm123 has been moved to vendor/couchapp/lib/docForm.js,
  use app.require to load") };

But sofa is not adapted.

Has anyone an idea to fix sofa?


Thanks,

Foobee




Re: CouchDB The Definitive Guide - Part III

Posted by Ido Ran <id...@gmail.com>.
Hi,

Thank you very much for sharing that.
I actually got to CouchDB through reading about MongoDB.
I mostly do desktop application using C# in the client side and J2EE on the
server side.
I did some ASP and ASP.NET applications in the past, never ruby though.

I see eye to eye with you about CouchApp are design documents, but there is
something more - there is the ability to run server side code "inside"
CouchDB.
The ability to have both Application server and Database server as the same
platform is what look interesting to me.
It for sure does not fit any application out there, but there are many
application that can benefit from this architecture.

I have a pretty simple application I'm trying to build (both to have it and
to learn CouchDB). The application is like a "gateway" to PicasaWeb albums.
It will have hierarchical directory like structure to organize the albums
(something not available in PicasaWeb) and will later just redirect you to
PicasaWeb for album view.
It should be "pure web" application, not activeX, flash, silverlight, just
HTML, JavaScript, CSS.
I try to use SproutCore for that but there is always the question of "where
to store the data". It is nice that SproutCore is server agnostic, but
eventually I need to put the data somewhere.
CouchDB look like better fit because it has both backend database as well as
web serving abilities.
BTW, I saw there are efforts to "merge" SproutCore and CouchDB. I think if
I'll be able to publish SproutCore application the same was I publish
CouchApp it will be one great piece of platform.

Thank you again and keep it up :)

Ido

On Tue, Sep 7, 2010 at 11:15 AM, Nicholas Orr <ni...@zxgen.net>wrote:

> Hi Ido,
>
> I thought I'd share how I got to know CouchDB.
> I heard about it via ruby channels and then read about couchapp however
> that
> had something to do with python and so went back to ruby.
> At the time (and now) couchrest was how I interacted with couch using futon
> to figure out views.
>
> Then I looked through the book again the other day and from what I gathered
> a couchapp built site is really just a design doc (which I also have not
> totally comprehended what these can do) and couchapp is no more than a
> bunch
> of script(s) to organise the design doc and is not required to actually
> run/render the site. If this line of thought is accurate one could use
> futon
> to build an app in it's entirety which is actually pretty cool.
>
> In my limited experience as long as you get documents, map/reduce your
> pretty much there and able to achieve a lot :)
>
> For now I really like using ruby (mainly cause I can write html and css in
> haml/sass) and will most likely be building apps that require the 3 layers
>
> Nicholas
>
> On Tue, Sep 7, 2010 at 5:39 PM, Ido Ran <id...@gmail.com> wrote:
>
> > Hi,
> >
> > I have successfully download Pages from git and push it to my
> > couchone.comserver.
> > The application is working, but...
> >
> > It is still hard for me to understand how to change it and write my own
> > application.
> >
> >
> >   1. I don't understand what the ddoc is, but it looks important.
> >   2. I understand from the book the separation between documents, views,
> >   lists but still not enough to use them.
> >   3. When I push the CouchApp using Push command to my database
> everything
> >   get upload to a single document, is that supposed to be like that? All
> > the
> >   attachments are "jam" in single document in the database. It does not
> > look
> >   right for me, but I'm the new guy so :)
> >   4. I know it take time to learn stuff, but I have hard time find an
> >   anchor to hold to and get to the rest (if you see what I mean).
> >
> > As I said, I'll keep on trying. I spent about hour each night to progress
> > so
> > it's not very fast.
> >
> > Ido
> >
> >
> > On Mon, Sep 6, 2010 at 10:21 PM, J Chris Anderson <jc...@apache.org>
> > wrote:
> >
> > >
> > > On Sep 6, 2010, at 12:15 PM, Ido Ran wrote:
> > >
> > > > Thank you very much.
> > > > I'll try to use Pages and see how it goes.
> > > >
> > > > Does the draft version of the book is the "most recent" or is it the
> > > other
> > > > way around?
> > > >
> > >
> > > The draft is newer (and you are welcome to change it using Github)
> > >
> > > let us know how Pages goes!
> > >
> > > Chris
> > >
> > > > Thank you,
> > > > Ido
> > > >
> > > > On Mon, Sep 6, 2010 at 6:14 PM, J Chris Anderson <jc...@apache.org>
> > > wrote:
> > > >
> > > >>
> > > >> On Sep 5, 2010, at 11:37 PM, Ido Ran wrote:
> > > >>
> > > >>> Hi,
> > > >>> I'm learning CouchDB using the CouchDB Definitive Guide (draft
> > > edition).
> > > >>> I've got to part III where I start playing with Sofa application to
> > get
> > > >> my
> > > >>> hand on real CouchApp, but there are some prolems:
> > > >>>
> > > >>>
> > > >>>  1. The code presented in the book does not match the code in sofa
> > > >> github
> > > >>>  repository - jchris's sofa at master - GitHub<
> > > >> http://github.com/jchris/sofa>
> > > >>>  2. The application in the github repository does not work right. I
> > can
> > > >>>  push it to CouchDB (I'm using couchone.com or couch.io server)
> but
> > > the
> > > >>>  post form does not work, currently because app.docForm is
> deprecated
> > > >> but I
> > > >>>  don't understand how to fix it.
> > > >>>  3. When I push the app to CouchDB server I get a database with
> > single
> > > >>>  document with _id of sofa. I thought it should be a collection of
> > > >> documents,
> > > >>>  not single document.
> > > >>
> > > >> Thanks - these are serious issues... I've got a running copy of Sofa
> > at
> > > >> http://jchrisa.net so I know it can work. I've got to set aside a
> few
> > > days
> > > >> to test the book's instructions etc, make sure they still map to
> > > reality.
> > > >>
> > > >> In the meantime you can try running the Pages application (a wiki
> > which
> > > >> uses many of the same techniques as Sofa, but with a fresher
> > > implementation)
> > > >>
> > > >> http://github.com/couchone/pages
> > > >>
> > > >> The README to Pages is up to date and accurate.
> > > >>
> > > >> Best,
> > > >> Chris
> > > >>
> > > >>
> > > >>>
> > > >>> Thank you,
> > > >>> Ido
> > > >>
> > > >>
> > >
> > >
> >
>

Re: CouchDB The Definitive Guide - Part III

Posted by Nicholas Orr <ni...@zxgen.net>.
Hi Ido,

I thought I'd share how I got to know CouchDB.
I heard about it via ruby channels and then read about couchapp however that
had something to do with python and so went back to ruby.
At the time (and now) couchrest was how I interacted with couch using futon
to figure out views.

Then I looked through the book again the other day and from what I gathered
a couchapp built site is really just a design doc (which I also have not
totally comprehended what these can do) and couchapp is no more than a bunch
of script(s) to organise the design doc and is not required to actually
run/render the site. If this line of thought is accurate one could use futon
to build an app in it's entirety which is actually pretty cool.

In my limited experience as long as you get documents, map/reduce your
pretty much there and able to achieve a lot :)

For now I really like using ruby (mainly cause I can write html and css in
haml/sass) and will most likely be building apps that require the 3 layers

Nicholas

On Tue, Sep 7, 2010 at 5:39 PM, Ido Ran <id...@gmail.com> wrote:

> Hi,
>
> I have successfully download Pages from git and push it to my
> couchone.comserver.
> The application is working, but...
>
> It is still hard for me to understand how to change it and write my own
> application.
>
>
>   1. I don't understand what the ddoc is, but it looks important.
>   2. I understand from the book the separation between documents, views,
>   lists but still not enough to use them.
>   3. When I push the CouchApp using Push command to my database everything
>   get upload to a single document, is that supposed to be like that? All
> the
>   attachments are "jam" in single document in the database. It does not
> look
>   right for me, but I'm the new guy so :)
>   4. I know it take time to learn stuff, but I have hard time find an
>   anchor to hold to and get to the rest (if you see what I mean).
>
> As I said, I'll keep on trying. I spent about hour each night to progress
> so
> it's not very fast.
>
> Ido
>
>
> On Mon, Sep 6, 2010 at 10:21 PM, J Chris Anderson <jc...@apache.org>
> wrote:
>
> >
> > On Sep 6, 2010, at 12:15 PM, Ido Ran wrote:
> >
> > > Thank you very much.
> > > I'll try to use Pages and see how it goes.
> > >
> > > Does the draft version of the book is the "most recent" or is it the
> > other
> > > way around?
> > >
> >
> > The draft is newer (and you are welcome to change it using Github)
> >
> > let us know how Pages goes!
> >
> > Chris
> >
> > > Thank you,
> > > Ido
> > >
> > > On Mon, Sep 6, 2010 at 6:14 PM, J Chris Anderson <jc...@apache.org>
> > wrote:
> > >
> > >>
> > >> On Sep 5, 2010, at 11:37 PM, Ido Ran wrote:
> > >>
> > >>> Hi,
> > >>> I'm learning CouchDB using the CouchDB Definitive Guide (draft
> > edition).
> > >>> I've got to part III where I start playing with Sofa application to
> get
> > >> my
> > >>> hand on real CouchApp, but there are some prolems:
> > >>>
> > >>>
> > >>>  1. The code presented in the book does not match the code in sofa
> > >> github
> > >>>  repository - jchris's sofa at master - GitHub<
> > >> http://github.com/jchris/sofa>
> > >>>  2. The application in the github repository does not work right. I
> can
> > >>>  push it to CouchDB (I'm using couchone.com or couch.io server) but
> > the
> > >>>  post form does not work, currently because app.docForm is deprecated
> > >> but I
> > >>>  don't understand how to fix it.
> > >>>  3. When I push the app to CouchDB server I get a database with
> single
> > >>>  document with _id of sofa. I thought it should be a collection of
> > >> documents,
> > >>>  not single document.
> > >>
> > >> Thanks - these are serious issues... I've got a running copy of Sofa
> at
> > >> http://jchrisa.net so I know it can work. I've got to set aside a few
> > days
> > >> to test the book's instructions etc, make sure they still map to
> > reality.
> > >>
> > >> In the meantime you can try running the Pages application (a wiki
> which
> > >> uses many of the same techniques as Sofa, but with a fresher
> > implementation)
> > >>
> > >> http://github.com/couchone/pages
> > >>
> > >> The README to Pages is up to date and accurate.
> > >>
> > >> Best,
> > >> Chris
> > >>
> > >>
> > >>>
> > >>> Thank you,
> > >>> Ido
> > >>
> > >>
> >
> >
>

Re: CouchDB The Definitive Guide - Part III

Posted by Ido Ran <id...@gmail.com>.
Hi,

I have successfully download Pages from git and push it to my
couchone.comserver.
The application is working, but...

It is still hard for me to understand how to change it and write my own
application.


   1. I don't understand what the ddoc is, but it looks important.
   2. I understand from the book the separation between documents, views,
   lists but still not enough to use them.
   3. When I push the CouchApp using Push command to my database everything
   get upload to a single document, is that supposed to be like that? All the
   attachments are "jam" in single document in the database. It does not look
   right for me, but I'm the new guy so :)
   4. I know it take time to learn stuff, but I have hard time find an
   anchor to hold to and get to the rest (if you see what I mean).

As I said, I'll keep on trying. I spent about hour each night to progress so
it's not very fast.

Ido


On Mon, Sep 6, 2010 at 10:21 PM, J Chris Anderson <jc...@apache.org> wrote:

>
> On Sep 6, 2010, at 12:15 PM, Ido Ran wrote:
>
> > Thank you very much.
> > I'll try to use Pages and see how it goes.
> >
> > Does the draft version of the book is the "most recent" or is it the
> other
> > way around?
> >
>
> The draft is newer (and you are welcome to change it using Github)
>
> let us know how Pages goes!
>
> Chris
>
> > Thank you,
> > Ido
> >
> > On Mon, Sep 6, 2010 at 6:14 PM, J Chris Anderson <jc...@apache.org>
> wrote:
> >
> >>
> >> On Sep 5, 2010, at 11:37 PM, Ido Ran wrote:
> >>
> >>> Hi,
> >>> I'm learning CouchDB using the CouchDB Definitive Guide (draft
> edition).
> >>> I've got to part III where I start playing with Sofa application to get
> >> my
> >>> hand on real CouchApp, but there are some prolems:
> >>>
> >>>
> >>>  1. The code presented in the book does not match the code in sofa
> >> github
> >>>  repository - jchris's sofa at master - GitHub<
> >> http://github.com/jchris/sofa>
> >>>  2. The application in the github repository does not work right. I can
> >>>  push it to CouchDB (I'm using couchone.com or couch.io server) but
> the
> >>>  post form does not work, currently because app.docForm is deprecated
> >> but I
> >>>  don't understand how to fix it.
> >>>  3. When I push the app to CouchDB server I get a database with single
> >>>  document with _id of sofa. I thought it should be a collection of
> >> documents,
> >>>  not single document.
> >>
> >> Thanks - these are serious issues... I've got a running copy of Sofa at
> >> http://jchrisa.net so I know it can work. I've got to set aside a few
> days
> >> to test the book's instructions etc, make sure they still map to
> reality.
> >>
> >> In the meantime you can try running the Pages application (a wiki which
> >> uses many of the same techniques as Sofa, but with a fresher
> implementation)
> >>
> >> http://github.com/couchone/pages
> >>
> >> The README to Pages is up to date and accurate.
> >>
> >> Best,
> >> Chris
> >>
> >>
> >>>
> >>> Thank you,
> >>> Ido
> >>
> >>
>
>

Re: CouchDB The Definitive Guide - Part III

Posted by J Chris Anderson <jc...@apache.org>.
On Sep 6, 2010, at 12:15 PM, Ido Ran wrote:

> Thank you very much.
> I'll try to use Pages and see how it goes.
> 
> Does the draft version of the book is the "most recent" or is it the other
> way around?
> 

The draft is newer (and you are welcome to change it using Github)

let us know how Pages goes!

Chris

> Thank you,
> Ido
> 
> On Mon, Sep 6, 2010 at 6:14 PM, J Chris Anderson <jc...@apache.org> wrote:
> 
>> 
>> On Sep 5, 2010, at 11:37 PM, Ido Ran wrote:
>> 
>>> Hi,
>>> I'm learning CouchDB using the CouchDB Definitive Guide (draft edition).
>>> I've got to part III where I start playing with Sofa application to get
>> my
>>> hand on real CouchApp, but there are some prolems:
>>> 
>>> 
>>>  1. The code presented in the book does not match the code in sofa
>> github
>>>  repository - jchris's sofa at master - GitHub<
>> http://github.com/jchris/sofa>
>>>  2. The application in the github repository does not work right. I can
>>>  push it to CouchDB (I'm using couchone.com or couch.io server) but the
>>>  post form does not work, currently because app.docForm is deprecated
>> but I
>>>  don't understand how to fix it.
>>>  3. When I push the app to CouchDB server I get a database with single
>>>  document with _id of sofa. I thought it should be a collection of
>> documents,
>>>  not single document.
>> 
>> Thanks - these are serious issues... I've got a running copy of Sofa at
>> http://jchrisa.net so I know it can work. I've got to set aside a few days
>> to test the book's instructions etc, make sure they still map to reality.
>> 
>> In the meantime you can try running the Pages application (a wiki which
>> uses many of the same techniques as Sofa, but with a fresher implementation)
>> 
>> http://github.com/couchone/pages
>> 
>> The README to Pages is up to date and accurate.
>> 
>> Best,
>> Chris
>> 
>> 
>>> 
>>> Thank you,
>>> Ido
>> 
>> 


Re: CouchDB The Definitive Guide - Part III

Posted by Ido Ran <id...@gmail.com>.
Thank you very much.
I'll try to use Pages and see how it goes.

Does the draft version of the book is the "most recent" or is it the other
way around?

Thank you,
Ido

On Mon, Sep 6, 2010 at 6:14 PM, J Chris Anderson <jc...@apache.org> wrote:

>
> On Sep 5, 2010, at 11:37 PM, Ido Ran wrote:
>
> > Hi,
> > I'm learning CouchDB using the CouchDB Definitive Guide (draft edition).
> > I've got to part III where I start playing with Sofa application to get
> my
> > hand on real CouchApp, but there are some prolems:
> >
> >
> >   1. The code presented in the book does not match the code in sofa
> github
> >   repository - jchris's sofa at master - GitHub<
> http://github.com/jchris/sofa>
> >   2. The application in the github repository does not work right. I can
> >   push it to CouchDB (I'm using couchone.com or couch.io server) but the
> >   post form does not work, currently because app.docForm is deprecated
> but I
> >   don't understand how to fix it.
> >   3. When I push the app to CouchDB server I get a database with single
> >   document with _id of sofa. I thought it should be a collection of
> documents,
> >   not single document.
>
> Thanks - these are serious issues... I've got a running copy of Sofa at
> http://jchrisa.net so I know it can work. I've got to set aside a few days
> to test the book's instructions etc, make sure they still map to reality.
>
> In the meantime you can try running the Pages application (a wiki which
> uses many of the same techniques as Sofa, but with a fresher implementation)
>
> http://github.com/couchone/pages
>
> The README to Pages is up to date and accurate.
>
> Best,
> Chris
>
>
> >
> > Thank you,
> > Ido
>
>

Re: CouchDB The Definitive Guide - Part III

Posted by J Chris Anderson <jc...@apache.org>.
On Sep 5, 2010, at 11:37 PM, Ido Ran wrote:

> Hi,
> I'm learning CouchDB using the CouchDB Definitive Guide (draft edition).
> I've got to part III where I start playing with Sofa application to get my
> hand on real CouchApp, but there are some prolems:
> 
> 
>   1. The code presented in the book does not match the code in sofa github
>   repository - jchris's sofa at master - GitHub<http://github.com/jchris/sofa>
>   2. The application in the github repository does not work right. I can
>   push it to CouchDB (I'm using couchone.com or couch.io server) but the
>   post form does not work, currently because app.docForm is deprecated but I
>   don't understand how to fix it.
>   3. When I push the app to CouchDB server I get a database with single
>   document with _id of sofa. I thought it should be a collection of documents,
>   not single document.

Thanks - these are serious issues... I've got a running copy of Sofa at http://jchrisa.net so I know it can work. I've got to set aside a few days to test the book's instructions etc, make sure they still map to reality.

In the meantime you can try running the Pages application (a wiki which uses many of the same techniques as Sofa, but with a fresher implementation)

http://github.com/couchone/pages

The README to Pages is up to date and accurate.

Best,
Chris


> 
> Thank you,
> Ido