On Sat, Dec 5, 2009 at 10:50 PM, Roger Binns <rog...@rogerbinns.com> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Benoit Chesneau wrote: >> Well rewrite need to be fast. I don't like the idea of loading another >> doc. However since ddoc is already loaded it could be used in. We >> just spoke with jchris about such possibily. I think that it will do >> the trick. > > That is certainly better in my opinion than no doc at all. > >> You don't need to regerenate code you can use couchapp macro or any >> templating system in current solution. > > You are thinking as though you maintain couchapp :-) Sure that is no > problem for the developer of a CouchApp but consider what happens once you > deploy it. For example lets say there is a blogging CouchApp that people(*) > use and it has a debugging mode implemented by a rewrite (eg it rewrites > shows/lists with -debug suffix). It is far easier to change a single key on > the design doc (or whatever doc is presented to the _rewrite function) than > to require that user to download and install couchapp, edit the correct > files and redeploy. > > (*) As CouchDB becomes more successful the administrators and users of > CouchApps will increasingly have no knowledge of Javascript, what REST is, > how all the pieces fit together etc. Consider trying to explain how to > change a rewrite function versus telling them to go to futon and change a > key in the appropriate doc.
I'm inclined to agree with you. I'm working on a patch to make it so the show and list funs have access to the entire design document. This should facilitate what you are asking for. Chris > > Roger > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAksbVBwACgkQmOOfHg372QS2uACgpeEMnCcp0ofbZxqSGg7UOeKZ > /zIAnRZNz3BJuE1G7SQlR4cOKzwfCIcy > =7lFb > -----END PGP SIGNATURE----- > > -- Chris Anderson http://jchrisa.net http://couch.io