Hello,

I really enjoy clojure for back-end work and have been exploring using
clojurescript for the front end of an upcoming project.

Quickly you run into the issue of integrating external libs. From
reading the list and from Rich's cljs rationale, I gather that the
best practice is to use google closure whenever applicable. That
largely eliminates the need for libraries like jQuery, which is very
cool.

But(!) there are some libraries I use regularly that are not so easy
to replace with closure, like three.js (webgl). My ideal outcome when
using these libs would be that I:

A.) Retain the ability to compile the cljs portion of my code
with :advanced, saving ~200kb (pretty important for production code).
B.) Yet somehow maintain integration with these internal libs.

In my initial tests this doesn't work out of the box, since :advanced
mode mangles any function calls to the external libs. After some
research it looks like the answer is externs[1]. However, js projects
that maintain an extern file seem to be few and far between, and
generating one correctly for a library as large as three.js is
daunting.

So what are other people doing? Is there another solution to this out
there?

If not, maybe an extern autogenerator written in clojure would be a
good solution.

- Jason


[1]: http://code.google.com/closure/compiler/docs/api-tutorial3.html


-- 
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