El jueves, 14 de junio de 2012 03:18:29 UTC+2, Kevin Lynagh escribió:
>
> Jacobo,
>
> Using JavaScript from ClojureScript is very straightforward.
> There are a few points where interop is awkward, but that wasn't the main 
> reason I wrote a new library (in Clojure).
>
> There were two primary motivations for that.
>
> 1) We needed a visualization library that would work on the server (to 
> have direct database access, headless SVG rendering, &c.) as well as on the 
> client.
>
> 2) There are some fundamental semantic limitations with D3. Specifically, 
> mapping a single datum to multiple or nested elements is very difficult.
> In C2/Hiccup, it's all just function composition and manipulation of 
> standard data structures, so code ends up being much more succient and 
> expressive.
>
> As to your larger point: you will always be able to use JS libraries from 
> ClojureScript.
> Using them from ClojureScript will never be as natural as using them in 
> JavaScript, but you may find that much of the value from such 
> libraries---structuring your application code, manipulating collections, 
> rich data structures, and so on---already exist natively in ClojureScript.
>
> That said, ClojureScript is young and there aren't a lot large, open 
> source clientside applications that you can look to for guidance.
> If you are just getting into clientside web development, it might be 
> easier to do in JS / CoffeeScript just because you can probably find some 
> good examples that solve 90% of your specific problem = )
>
> best,
>
> Kevin
>

Hi Kevin,

It's great that you can answer as two talks you did are what finally left 
me like "maybe I've been resisting it but this should be the way to go 
anyway...". 

As to your first point and only to clarify, had you made it a wrapper for 
D3 and in a node.js application, there would still be no problem in using 
it server-side, am I right?

Anyway this is what contributes to my doubts... CoffeScript + Node.js is 
pretty standard web development right now. I don't know if throwing in 
things that are not directly in the JS world will actually make things 
harder (or add complexity) or easier in the long run. But then again, you 
also said that CoffeeScript won't save JavaScript pitfalls in large 
projects, etc.
If I go the CoffeeScript route I am going to do it with the functional 
underscore.js library anyway... because I believe in the functional way of 
doing things (and not having immutability there is one thing I hate).

So, in short I've got a toy application in mind to learn either way, but 
the end project in mind is a trading application on the browser (which is 
my main field right now) that should deploy in as many devices/OS as 
possible (so, Javascript again). C2 fits in just perfect.

As the intrinsic domain problem is much better expressed in a language like 
Clojure I think I'll opt this way... hoping that your "Javascript from 
Clojure is moar fun" really stands in the long run. I hope you guys don't 
hear too much from me ;).

Many thanks for the answer as well as the talks, which have been trully 
great!

Cheers!

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