File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Clojure and the fly likes ClojureScript + Om - Pixel Art Studio Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Clojure
Bookmark "ClojureScript + Om - Pixel Art Studio" Watch "ClojureScript + Om - Pixel Art Studio" New topic

ClojureScript + Om - Pixel Art Studio

Sean Corfield
Ranch Hand

Joined: Feb 09, 2011
Posts: 283

Here's an amazing application built with ClojureScript and Om (a wrapper around Facebook's React.js library):

You can take a look at the source here:

At World Singles, we've been evaluating JavaScript libraries to use with ClojureScript for a new internal application we are building. We had originally planned to go down the AngularJS + ClojureScript (front end) + FW/1 + Clojure (back end) path and I built a proof of concept that worked quite nicely but AngularJS felt a bit awkward (very OOP, very imperative). I started toying around with Om at Clojure/West (March) to see whether I liked that better and was very impressed. We've just completed our proof of concept with Om + ClojureScript (front end) + Sente (core.async over web sockets) + Clojure (back end) on http-kit (a very high performance web server, designed for Clojure). We were able to create animated bar graphs easily with Om manipulating SVG directly, as well as integrating D3 - Data-Driven Documents - an amazing JavaScript visualization library. All in all, very impressive.

A very simple version of the proof of concept can be found in source form here:
chris webster

Joined: Mar 01, 2009
Posts: 2289

Thanks for sharing this with us, Sean - have a cow!

Have to admit I'm struggling to get to grips with the whole reactive thing at the moment, and I'm very much a "back-end" kind of a guy, so all that UI stuff is way outside my comfort zone. But it's interesting to see how Clojure(Script) does this kind of thing.

Lots to learn, as always...

No more Blub for me, thank you, Vicar.
Sean Corfield
Ranch Hand

Joined: Feb 09, 2011
Posts: 283

There seems to be a lot of interest in reactive programming on the server as well these days: reactive extensions for Java, Odersky's reactive programming in Scala course etc. I've done a fair bit of event-based programming over the years so Om / React.js isn't completely alien to me but it is a big shift from "traditional" server programming, even in the functional world.
I agree. Here's the link:
subject: ClojureScript + Om - Pixel Art Studio
It's not a secret anymore!