Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Other Sellers on Amazon
+ Free Shipping
Learning ClojureScript Paperback – June 30, 2016
|New from||Used from|
Frequently bought together
Customers who bought this item also bought
Customers who viewed this item also viewed
About the Author
W. David Jarvis W. David Jarvis is a software engineer living in San Francisco, California. In his spare time, he enjoys hiking, gardening, playing pool in dive bars, and overthinking everything. He is active in the open source Clojure and ClojureScript communities, and software authored by him has been downloaded over 10,000 times. David has worked for a number of companies now living or dead, including Aggregate Knowledge, CircleCI, Standard Treasury, and Airbnb. He is currently responsible for the build, test, and deployment infrastructure at Airbnb. The "W" is for "William" (now you know!). While David has made the unfortunate mistake of exposing his previous scribblings to the world, this is his first actual book.
If you buy a new print edition of this book (or purchased one in the past), you can buy the Kindle edition for only $2.99 (Save 85%). Print edition purchase must be sold by Amazon. Learn more.
For thousands of qualifying books, your past, present, and future print-edition purchases now lets you buy the Kindle edition for $2.99 or less. (Textbooks available for $9.99 or less.)
Top customer reviews
There was a problem filtering reviews right now. Please try again later.
- Start from the basics and go through complex cases
- Well written, can be seriously read in a 2/3 days period (if you have a little experience in clojure(script)
- Code examples in chapter 5 (om todo app with back-end) - some mistakes in code
I wish I would have had this book when I started working with ClojureScript. ClojureScript has one of the best developer experiences, with code-reloading and a REPL, but it can be a bit daunting to set it up the first time. This book takes you through all the steps and keeps you from missing out on some of the best aspects of developing with ClojureScript.
The second and third chapters might be a bit too much to take in at once for people new to ClojureScript. I'd recommend you skim them the first time, then come back and use them as a reference when you start building your application.
The rest of the book gives you a nice foundation for building applications in ClojureScript. I may have focused on a few different libraries, but the ones they cover are pretty solid, with one notable exception. I wouldn't recommend anybody use Dommy. I used it and found it very confusing--you're much better off using the tools you get for free from Google Closure.
I have been programming in ClojureScript for over a year now, and this book, which I bought last Christmas (directly in the Packt sale for a mere $5) helped my learning curve tremendously.
The most important first step in learning any new language is setting up your development environment, and this book does an excellent job in covering this for ClojureScript. While it goes through a number of different scenarios, and this can seem confusing at first, by far the best option is to use Figwheel, which provides an as close to real-time live encoding flow as you are going to get for a compile-to-JS language.
It also covers setting up Emacs as an IDE, which is probably at the very least the best editor (rather than IDE) available for programming in LISP dialects (of which ClojureScript is one), mostly due its paredit plugin. (I am much more of a Vim user but sadly I haven't found any plugin in Vim which comes close to the functionality that the emacs paredit plugin provides.)
Chapters 2 and 3 cover the language fundamentals and some advanced features, including interop with JS and macros. The treatment of macros is adequate enough, however some more could have been written about them. Essentially, they allow you to write ClojureScript code which is rewritten, via macros, into some other ClojureScript code, which is ultimately compiled into JS. This is one of the most powerful features of the language, and once you have more experience with the language you will definitely want to write macros in certain situations where it makes sense.
One area which is not covered adequately by the book is the ClojureScript and Clojure library core.async. This provides an amazing alternative way of handling events to that which is native to JS / the DOM. While events are still present when using core.async, event handlers become much more lightweight and the majority of event handling code is sent of to something known as a "go channel" which takes care of the bulk of work required, including any state management. There are a couple of excellent videos, one on youtube and one on Cognitect's website (entitles "core.async webinar") which show you some of the amazing things which you can achieve using core.async.
Chapter 4 covers a decent selection of libraries which allow you to work with the DOM and do general web development, all of which are worth looking at if you are not using React.
Chapter 5 covers React development, and herein is another major flaw of the book. There are several ClojureScript libraries available for working with React, and the book's authors chose to go with Om. I tried using Om following the guidelines in this book, together with the first two tutorials on the Om github page, and to cut a long story short, I couldn't get it to do what simple things I was trying to achieve. I found myself having to bend over backwards to fit my ideas into the Om framework, and after much hair-pulling, I gave up.
Instead, I discovered Reagent, which is an amazing framework for building React applications using ClojureScript, not least of all because it is incredibly simple to use. I have been using Reagent for several months now and I have absolutely zero complaints, in short, it is an amazing framework and I cannot recommend it enough.
Beyond this I have only read the section on testing, which again covers testing using the native cljs.test library more than adequately enough. However you should be aware that the developer of Figwheel created something called Devcards, which is designed primarily to test React components outside of their native application contexts, but also includes thorough testing capabilities which reports results in your browser rather than in a command-line session. If you search the web for "TDD in ClojureScript" you will find an article by Eric Smith which explains how to do this, it's well worth going through it all for the benefits you'll get.
This is by far the best book available on ClojureScript at this time (there are only 3 others and one of those only covers Reagent), and I would highly recommend anyone starting out or with just a couple of month's experience in ClojureScript to read it and learn from it, it provides an incredibly invaluable resource to what I consider to be the most useful language for front-end web-development today.