Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Dropping CouchRest::Model
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  12 messages - 11 new - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
J. Chris Anderson  
View profile  
 More options Jan 14 2009, 2:10 am
From: "J. Chris Anderson" <jch...@gmail.com>
Date: Tue, 13 Jan 2009 23:10:03 -0800 (PST)
Local: Wed, Jan 14 2009 2:10 am
Subject: Dropping CouchRest::Model
There is some good code in CouchRest::Model, but I don't think it fits
the core of what CouchRest is about, which is having a technically
strong CouchDB library thats ready to support other more complex code
on top of it.

I plan to spin CouchRest::Model out into it's own project, and then
encourage people to hack it as crazy as they wanna. I have no idea
what to call the standalone project. I don't think CouchRest should be
part of the name, because CouchRest is about being solid, and Model is
an experiment in making a Rails-like DSL around Couch views.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
justindz  
View profile  
 More options Jan 14 2009, 8:08 am
From: justindz <justi...@gmail.com>
Date: Wed, 14 Jan 2009 05:08:52 -0800 (PST)
Local: Wed, Jan 14 2009 8:08 am
Subject: Re: Dropping CouchRest::Model
CouchCushion?

On Jan 14, 2:10 am, "J. Chris Anderson" <jch...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ZDZolton  
View profile  
 More options Jan 14 2009, 10:18 am
From: ZDZolton <zachary.zol...@gmail.com>
Date: Wed, 14 Jan 2009 07:18:04 -0800 (PST)
Local: Wed, Jan 14 2009 10:18 am
Subject: Re: Dropping CouchRest::Model
I agree, since Model takes a very much uncolored Couch API and then
(necessarily) makes all kinds of assumptions on top of it.

I'm currently making a gem to walk a CouchRest result hash, walk down
recursively, and map the values (where appropriate) to persistence-
ignorant model types.

If anyone has any input, or would like to help me out, contact me.

I should have some public repos up soon: http://github.com/zdzolton

On Jan 14, 1:10 am, "J. Chris Anderson" <jch...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Samuel Flores  
View profile  
 More options Jan 14 2009, 10:29 am
From: Samuel Flores <samflo...@gmail.com>
Date: Wed, 14 Jan 2009 12:29:28 -0300
Local: Wed, Jan 14 2009 10:29 am
Subject: Re: Dropping CouchRest::Model
I liked it.

Samuel Flores

On 14/01/2009, at 10:08, justindz <justi...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Maximus  
View profile  
 More options Jan 14 2009, 10:50 am
From: Maximus <nanode...@gmail.com>
Date: Wed, 14 Jan 2009 07:50:51 -0800 (PST)
Local: Wed, Jan 14 2009 10:50 am
Subject: Re: Dropping CouchRest::Model
I liked it too, but at the same time I effectively forgot that there
was more to CouchRest than CouchModel.  So if it was refactored into a
separate project, so that we could (not saying "should") have multiple
ORMs built on top of CouchRest, I would not be opposed :)

On Jan 14, 7:29 am, Samuel Flores <samflo...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
J. Chris Anderson  
View profile  
 More options Jan 14 2009, 3:02 pm
From: "J. Chris Anderson" <jch...@apache.org>
Date: Wed, 14 Jan 2009 12:02:50 -0800 (PST)
Local: Wed, Jan 14 2009 3:02 pm
Subject: Re: Dropping CouchRest::Model

On Jan 14, 7:50 am, Maximus <nanode...@gmail.com> wrote:

> I liked it too, but at the same time I effectively forgot that there
> was more to CouchRest than CouchModel.  So if it was refactored into a
> separate project, so that we could (not saying "should") have multiple
> ORMs built on top of CouchRest, I would not be opposed :)

Yes, I'd love to see the code from CR::Model get reused and
frankensteined into lots of alternative ways to use it.

There are already a few good "model" libraries based on CouchRest. I'm
hoping to see even more, as different application have wildly
different needs.

Chris


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt Aimonetti  
View profile  
 More options Jan 14 2009, 3:10 pm
From: "Matt Aimonetti" <mattaimone...@gmail.com>
Date: Wed, 14 Jan 2009 12:10:39 -0800
Local: Wed, Jan 14 2009 3:10 pm
Subject: Re: Dropping CouchRest::Model

I played with a library that apparently might or might not become public.

The lib was divided in 3 parts:

- storage     (fork of CouchRest 0.9.15 without the orm side of things)
- model       (because not all models are documents)
- document (uses model and storage to deal with documents)

I really like how things are split up and it makes things easier to tweak. I
hope the author will consider releasing the gems, but since he doesn't want
to support it, that might never happen.

- Matt

On Wed, Jan 14, 2009 at 12:02 PM, J. Chris Anderson <jch...@apache.org>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Max Aller  
View profile  
 More options Jan 14 2009, 3:21 pm
From: "Max Aller" <nanode...@gmail.com>
Date: Wed, 14 Jan 2009 12:21:04 -0800
Local: Wed, Jan 14 2009 3:21 pm
Subject: Re: Dropping CouchRest::Model

>> "he doesn't want to support it"

That's what Github is for!  :)

On Wed, Jan 14, 2009 at 12:10 PM, Matt Aimonetti <mattaimone...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Groves  
View profile  
 More options Jan 18 2009, 6:05 pm
From: Adam Groves <adam.gro...@gmail.com>
Date: Sun, 18 Jan 2009 15:05:06 -0800 (PST)
Local: Sun, Jan 18 2009 6:05 pm
Subject: Re: Dropping CouchRest::Model
Hi Chris,

I'm getting a strange error with couchrest-0.12.2:

Try this out:

%w(rubygems couchrest).each {|g| require g}

class Foo < CouchRest::Model
  use_database CouchRest.database!('http://127.0.0.1:5984/my-
database')
end

Foo.all
p Foo.design_doc.database

Running this code the first time returns an CouchRest::Database
instance, running it the second time (after the design doc has been
added) I get:

NoMethodError: undefined method `view' for nil:NilClass
        from /Library/Ruby/Gems/1.8/gems/jchris-couchrest-0.12.2/lib/
couchrest/core/design.rb:84:in `fetch_view'
        from /Library/Ruby/Gems/1.8/gems/jchris-couchrest-0.12.2/lib/
couchrest/core/design.rb:42:in `view'
        from /Library/Ruby/Gems/1.8/gems/jchris-couchrest-0.12.2/lib/
couchrest/core/model.rb:392:in `fetch_view'
        from /Library/Ruby/Gems/1.8/gems/jchris-couchrest-0.12.2/lib/
couchrest/core/model.rb:383:in `fetch_view_with_docs'
        from /Library/Ruby/Gems/1.8/gems/jchris-couchrest-0.12.2/lib/
couchrest/core/model.rb:346:in `view'
        from /Library/Ruby/Gems/1.8/gems/jchris-couchrest-0.12.2/lib/
couchrest/core/model.rb:121:in `all'
        from (irb):5
        from :0

The second time around, saved returns true, saved gets saved (line 363
in model.rb) but it doesn't seem like the design_doc's database value
get's updated.

Cheers

Adam

On Jan 14, 8:10 am, "J. Chris Anderson" <jch...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Samuel Flores  
View profile  
 More options Jan 18 2009, 6:18 pm
From: Samuel Flores <samflo...@gmail.com>
Date: Sun, 18 Jan 2009 20:18:48 -0300
Local: Sun, Jan 18 2009 6:18 pm
Subject: Re: Dropping CouchRest::Model
I was getting the same error and solved the problem, but my notebook  
crashed before I push the correction to Github.

The error is on the 'design.rb' file. The 'refresh_design_doc' method  
does not assigns a value for the 'database' field and for self['_id']  
when the view is already saved.

It's an easy correction, but I don't have access to code now. Hope  
that you can see it ;)

Samuel Flores

On 18/01/2009, at 20:05, Adam Groves <adam.gro...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Groves  
View profile  
 More options Jan 20 2009, 7:12 pm
From: Adam Groves <adam.gro...@gmail.com>
Date: Tue, 20 Jan 2009 16:12:54 -0800 (PST)
Local: Tues, Jan 20 2009 7:12 pm
Subject: Re: Dropping CouchRest::Model
I switched over from dm-couch-adapter to couchrest about a month ago
for a project of mine and I then added some basic associations and
validations. I've since extracted the 2 libraries and bundled them
together with CouchRest::Model (implemented as a mixin) as CouchSurfer
which can be found here: http://github.com/addywaddy/couchsurfer.

I'd appreciate any comments, feedback etc.

On Jan 14, 8:10 am, "J. Chris Anderson" <jch...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Zachary Zolton  
View profile  
 More options Jan 20 2009, 10:45 pm
From: Zachary Zolton <zachary.zol...@gmail.com>
Date: Tue, 20 Jan 2009 21:45:20 -0600
Local: Tues, Jan 20 2009 10:45 pm
Subject: Re: Dropping CouchRest::Model
Adam,

I've been wracking my brains on how to create literally this exact
thing, but you're obviously way better at this stuff than me... I may
likely start to use and contribute to your code immediately!

I actually just started last week, but if you'd like to see my meager
efforts, take a look here:
http://github.com/zdzolton

Please email me back directly, as I'm interested in learning the
inspirations behind your very concise code.

Cheers,

Zach


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic