I am considering building a website using ClojureScript. Does it make sense to write ClojureScript on both the client side and the serverside, much like node.js?
It's possible, but there's absolutely no reason not to use Clojure itself on the server side, and you'll get better performance and much better library availability. Interfacing Clojurescript/Clojurescript is no easier than Clojure/Clojurescript.
The only situation where I'd recommend this is where you're already fully committed to a server-side javascript infrastructure (e.g, node) and wanted to write Clojurescript instead of Javascript.
The JVM and concurency argument seems important.And clojure/clojurescript are very similar so the argument to use same language in client and server doesnt seem important here.
For clojurescript on the server(nodejs) we have this MACCHIATO its similar to ring.
@A reply to Levand: (Not a real answer and I am just a plain human being who is mainly a php programmer). So. I really really (if you can) urge levand to futher develop his answer. Just don't get it, thats all. I am a big fan of some lisp features (especially a rather unusual macro syntax in scheme). Therefore I would like him (if he knows it), or anybody else for that matter to tell me. Whats so bad about it. I don't see anything bad at all. On the contrary I rather like it (havn't used clojurescript in the browser myself unfortunately). The only bad thing I can think of on the top of my head is.
- Hard to measure performance (since it was buildt for the java engine).
- YAGNI.
- Rather esoteric i.e. the possibuility that someone who takes over the homepage or server might not want to learn it. (So many questions so little answers).
If Gambit-Scheme can be a good tool for a unix scripter then I can't see what the problem is with having some nice Clojurescript Lisp in the brower or server. (As you can see I can hardly call myself a good programmer. F.e. I used Debian full time for 2 months then promised myself that Debian and Ubuntu was not for me, although it hardly was bad or so. Just the feeling that it complicated things that I wanted to be easy). If not so for the fun of learning and experimenting. (Tries to see the problem in a new direction, or so to say, "thinking outside the box"). If Zubair could share his thoughts on the matter of integrating clojurescript in html I would be more than happy. /Bad programmer who was tought scheme in school by another bad programmer and is very happy he learned it. Although it was a rather frustrating experiance. Throws the ball away in the air, hoping that someone can take it up.
© 2022 - 2024 — McMap. All rights reserved.