First, what Herwig said. :-)

Second, it's not outside of the realm of possibility that clutch might 
eventually be able to take .cljs files (or clojure/cljs source inline via 
clutch macro), invoke the cljs compiler, and use its existing functionality to 
upload the resulting view functions' code to your couchdb instance.

It certainly would be pleasant to be able to write couch views in Clojure 
without messing with the view server setup (though clutch 0.2.5 simplifies this 
significantly).  Of course, you'd lose access to the wealth of Clojure (and 
Java) libraries available with the Clojure view server, so the tradeoffs are 
multivariate.

- Chas

On Sep 13, 2011, at 6:24 AM, Herwig Hochleitner wrote:

> Just a little remark: Keep in mind, that clutch
> https://github.com/ashafa/clutch comes with a CouchDB view server that
> can execute Clojure code.
> So compiling to JS only seems desirable to me, when you can't
> configure an additional view server on your CouchDB.
> Performance wise, it should make no big difference, since JS views are
> also executed on a separate view server.
> 
> regards
> 
> 2011/9/13 Pepijn de Vos <pepijnde...@gmail.com>:
>> While reading about ClojureScript, I saw a couple of mentions of CouchDB as
>> a use case for ClojureScript.
>> Would anyone care to elaborate? Is this anything more than an abstract idea?
>> There is no CouchDB compile target AFAIK, and I can't see how any of the
>> others would work out of the box.
>> The simplest approach would be to compile to a couch app, and let couchapp
>> compile and upload the design doc.
>> To do this, no optimizations should be applied, as we need multiple files.
>> But then either CommonJS requires or Couchapp macros will need to be
>> generated. Or can this be made to work with Closure style requires as well?
>> The other option is to directly compile ClojureScript to a design doc. I
>> have no idea how hard this is.
>> Pepijn
> 
> -- 
> __________________________________________________________________
> Herwig Hochleitner
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to