Live data from Hacker News

Bringing functional to the frontend – Clojure and ClojureScript for the web

blog.getprismatic.com

31–40 of 64 posts

Re: Bringing functional to the frontend – Clojure and ClojureScript for the web

#31
post #29
post #2

Author here. Happy to answer any questions or comments.

I've been using Clojure for a while now. Do you have any particular recommendations for resources for getting started with ClojureScript? I tried a while back and got really confused.

http://himera.herokuapp.com/synonym.html from Fogus is also a good starting point to have an overview of how to do things and what is possible. Next stop: modern-cljs as mentioned by pchristensen.

Re: Bringing functional to the frontend – Clojure and ClojureScript for the web

#32
post #7

Earlier quoted context omitted.

I really want to like ClojureScript, particularly since the idea of using the same language all around the app appeals to me, but it's not quite the same language. Have you found this to be a pain in practice? I'm specifically wondering about require-macros and lack of support for ~ and ~@, although I'm also curious if you were bit by any of the other differences between Clojure and ClojureScript.

Indeed it's not the same language. I wasn't bit by the macro differences (which are probably the largest non-interop difference) since I tend not to use macros in my Clojure or ClojureScript code. Macros are going to be different since the macro compile host (JVM) is different than the run host (Javascript VM). Other than macros and the VM interop (ugh I think (.-length str) is an eye-sore for property acesss), the c…

[deleted]

Re: Bringing functional to the frontend – Clojure and ClojureScript for the web

#33
post #29
post #2

Author here. Happy to answer any questions or comments.

I've been using Clojure for a while now. Do you have any particular recommendations for resources for getting started with ClojureScript? I tried a while back and got really confused.

Shameless plug, but I'll do it anyway since it's a direct answer to the question: I'm the (co)author of ClojureScript: Up and Running from O'Reilly.

If anyone wants, email me at the address in my profile and I'll get you a discount code.

Re: Bringing functional to the frontend – Clojure and ClojureScript for the web

#34
the dom is a mutable data structure and the native (fast) dom apis expose mutable interfaces. so dynamic sites (you know, single page html5 apps doing all sorts of client-side dom manipulation) are either going to be slow, or are going to have an imperative core, which is where you need functional programming the most ;(

maybe HTML6 will have native functional dom manipulation and we can rewrite all our favorite javascript libraries to expose functional interfaces. one can dream.

Re: Bringing functional to the frontend – Clojure and ClojureScript for the web

#35
post #19

We use ClojureScript (and Clojure) at http://economi.co and I'm really enjoying it. Maybe one of the most difficult things coming into it is trying to relate it to something like BackBone. However generally speaking in Clojure the culture is more about libraries than frameworks. C2 http://keminglabs.com/c2/ which on the outset looks just like a ClojureScript version of d3 is actually a great library to use instead of…

Don't worry about how anything compares to frameworks, because they don't matter anymore. We think traditional frontend frameworks - whether of the rails/django variety or the backbone variety, are generally rubbish in a nearly infinite number of ways. It's a style of programming based on wrapping weak mutation oriented idioms behind monolithic APIs and design patterns. We think default functional style and fine grai…

I'm new to programming and I want to start off on the right foot. I'd love to learn more about the differences. Where should I look?

Re: Bringing functional to the frontend – Clojure and ClojureScript for the web

#36

If you're interested in learning more about Clojure and ClojureScript, check out the upcoming Clojure/West conference in Portland, OR March 18-20th ( http://clojurewest.org/schedule ), including a keynote from Rich Hickey, creator of Clojure. There is also a 1 day training class the day before on ClojureScript if you want the deep dive ( http://clojurewest.org/training ). Register here: http://regonline.com/clojurewe…

Highly recommended! Alex's events are always great - long on technical and short on BS!

Re: Bringing functional to the frontend – Clojure and ClojureScript for the web

#37

Earlier quoted context omitted.

Don't worry about how anything compares to frameworks, because they don't matter anymore. We think traditional frontend frameworks - whether of the rails/django variety or the backbone variety, are generally rubbish in a nearly infinite number of ways. It's a style of programming based on wrapping weak mutation oriented idioms behind monolithic APIs and design patterns. We think default functional style and fine grai…

I'm new to programming and I want to start off on the right foot. I'd love to learn more about the differences. Where should I look?

We did a post a while back on the frameworks vs. libraries and our overall take on software engineering:http://blog.getprismatic.com/blog/2012/4/5/software-engineer...

Re: Bringing functional to the frontend – Clojure and ClojureScript for the web

#38
Great article. I have spent a fair amount of time playing with ClojureScript, read "ClojureScript: Up and Running" and a lot of tutorial material on the web, and used it a bit in a customer project.

That said, ClojureScript has not really clicked for me yet, but this article and the pointer to dommy is getting me closer to adopting ClojureScript.

I use Clojure + Compojure (and still Noir) + Hiccup for just about all of my web app development. Love Hiccup. Having (mostly) Hiccup on the client side with dommy looks very cool.

Re: Bringing functional to the frontend – Clojure and ClojureScript for the web

#39

Semi-related question but... One of the thing that I love when developing under Emacs is that I can get real-time validation of my XML (eg XHTML) based on, say Relax NG. This even works nicely with multiple-major-mode (eg I can get realtime validation of the XML part, yet see JavaScript as JavaScript inside the same source file). Now my question: with all these templating libraries like Jade, aren't you losing featur…

The Community Edition (free) of IntellJ with the Clojure plugin will help you here: I get immediate error highlighting when editing Hiccup code in my Clojure view files - recommended!

A little off topic, but I have been using Emacs to edit Lisp code since the early 1980s, but IMHO IntellJ with the Clojure plugin is a bit more efficient for writing and reading code.

Post reply on HN