Posted on 18 Feb 2013 by Chris
A good introduction, particularly for the Clojure newbie.
This post was originally written for the Amsterdam Clojurians blog. The copy of ClojureScript: Up and Running I read was provided to the Amsterdam Clojure meetup by O’Reilly as part of their UserGroup program.
After explaining the rationale behind ClojureScript, the book starts off with a short example to get you started with ClojureScript and the development process. It uses the lein-cljsbuild Leiningen plugin to simplify the build and gets you going with minimal explanation. From there it dives deeper into the compiler, the configuration of it and its relationship with the Google Closure Compiler.
The next five chapters cover the basics of the ClojureScript language. These chapters provide a nice introduction to the ClojureScript language. They cover the core of the language, assuming nothing and starting with the very basics, progressing to dealing with key Clojure/ClojureScript concepts such as immutability, sequences and namespaces. They also touch on more advanced topics such as macros. These chapters are only an introduction to the language. The reader is encouraged to seek out Clojure literature to discover more, but I really feel they give a good introduction to the language, providing enough information to the reader to draw them in and get them started without overwhelming them.
Much of the details of ClojureScript are similar enough for someone with experience in Clojure not to need to read these chapters, however there are some differences and an experienced Clojure developer would benefit from at least skimming the content here - particularly the chapter on namespaces, as there are quite a few implementation details and quirks stemming from the use of the Google Closure Compiler.
The final two chapters cover more of the development process and workflow, including the ClojureScript browser repl vs the command line repl, building ClojureScript from source, testing and so on. They also cover basic integration with server-side Clojure, including code sharing.
So, bearing that small caveat in mind, I would recommend this book to anyone wanting to get a good introduction to ClojureScript.