Thanks everybody for responding. I will look at the mentioned projects. Shantanu
On Jan 7, 1:12 am, ckirkendall <[email protected]> wrote: > Chris, > I am interested in your challenges. For Enfocus I had to implement > several features that existed in jquery around events (mouseenter, > mouseleave, window resize) but I wanted to keep the stack pure without > any external dependencies. Enfocus might have been easier to > implement if I had chosen JQuery but I was afraid that requiring an > external dependency might be problem. I was able to port all of > enlive transformation and quite a bit more. It provides similar model > as JQuery where I have selector -> action. Overall, I did not find it > overly difficult to use the goog libraries for this. > > CK > > On Jan 6, 1:37 pm, Chris Granger <[email protected]> wrote: > > > > > > > > > So there's pinot, but I've come to a relatively similar conclusion to > > Kovas that wrapping the goog libs aren't really the way to go. For > > one, I was basically replicating aspects of jQuery (like event > > delegation). > > > Recently I started on doing some thing that makes jQuery play in the > > Clojure world really nicely. I'll get this onto github soon. > > > Cheers, > > Chris. > > > On Jan 6, 5:18 pm, kovas boguta <[email protected]> wrote: > > > > Yes. > > > > I've created a jquery wrapper conveniently called cljs-jquery , > > > however there is no documentation, tests, or general housekeeping yet > > > so haven't announced it. If you are > > > brave,https://github.com/kovasb/cljs-jquery > > > > Previous libraries have followed the lead of the initial Clojurescript > > > examples, and tried to wrap gclosure to make it more > > > clojure-idiomatic. > > > > I think this whole approach is a mistake. > > > > This is not a generic data processing problem, so we shouldn't be > > > converting the dom into verbose generic clojure structures with > > > namespace prefixes everywhere. > > > > DOM manipulation is ideally suited to a DSL. JQuery already defines > > > the primitives, and provides the implementation. Lets just wrap it. > > > > The idea of my library is trivial. Just have a macro that expands into > > > a jquery call chain: > > > > $(selector).f(a,b).g(c,d) > > > is represented by > > > ($ selector (f a b) (g c d)) > > > > (note that f and g don't need buzz-killing namespace prefixes) > > > > For bonus points, selector can be a hiccup structure (or a hiccup > > > structure with embedded dom objects) which ends up saving a huge > > > amount of code when creating new elements. > > > > In general this is far more concise and easier to code than any other > > > approach I've seen thus far. > > > > On Fri, Jan 6, 2012 at 3:16 AM, Shantanu Kumar <[email protected]> > > > wrote: > > > > Is anybody working on a DOM-manipulation library for ClojureScript? > > > > > There are several JavaScript libraries that can probably be wrapped, > > > > but a ClojureScript library should be great. I noticed a short > > > > comparative list of jQuery basic operations vs JavaScript equivalent > > > > that looks interesting:http://sharedfil.es/js-48hIfQE4XK.html > > > > > Shantanu > > > > > -- > > > > You received this message because you are subscribed to the Google > > > > Groups "Clojure" group. > > > > To post to this group, send email to [email protected] > > > > Note that posts from new members are moderated - please be patient with > > > > your first post. > > > > To unsubscribe from this group, send email to > > > > [email protected] > > > > 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 [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
