On Mon, Dec 22, 2008 at 3:41 PM, Christian Haselbach <[email protected]> wrote: > > Thanks for the hint. I guess I'll need it more in actions than in views. > Having certain js libraries available in actions certainly would make > things easier. >
Action.js is still very rough. I encourage you to try writing your own servers, and to feel free to screw around with the action.js source code. The first optimization there is to cache copies of design documents in local memory (so they only need to be requested on first use). Without that optimization, I'd be wary of action.js as it stands for production use. Lots of extra http io when it could be much simpler. Resist the temptation to build applications in action.js. Applications should be stored in design docs. However, keeping a JavaScript controller framework in action.js, to be used by design docs, seems like a fine way to roll. The important consideration is keeping apps portable across CouchDB nodes. I think the next important use case for _external is a full text search interface (maybe something that queries a local lucene instance, perhaps via http) > BTW, to make it easier (for me) to play around with actions (and design > documents) I wrote a small JS script (requires Rhino) that transforms > javascript objects into JSON objects (using json2.js), converting > functions to strings in the process. I attached it; perhaps someone > things it's useful. > > Regards, > Christian > -- Chris Anderson http://jchris.mfdz.com
