Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

JavaWorld Daily Brew

Book Review: Programming Scala

 

One more than one occasion, I’ve found myself yearning for a more functional paradigm that facilitates easier concurrency programming on the JVM. And while Erlang is an excellent platform for concurrency, it doesn’t run natively on the JVM; thus, the next logical choice is none other than Scala (yes, Clojure is a choice as well and I’m currently reading Stu’s tome, “Programming Clojure“!).

Scala’s syntax is anything but similar to Java; what’s more, its constructs and its implementation of the actor model are all but alien to those programmers raised on a diet of Java; nevertheless, my friend Venkat does a superb job of clarifying the language with a cornucopia of examples and well articulated pages that, at least for me, revealed Scala in a concise and easy to grasp manner. And while there’s no shortage of freely available tutorials on Scala, I found Venkat’s writing as well as his examples much more approachable and practical to everyday issues (as opposed to more academia-like approaches).

Indeed, due to Venkat’s easy to read style, I’m already employing Scala on mission critical applications that rely on Scala’s implicit concurrency accommodations. In truth, I found the first half of his book indispensable in ascertaining how to actually program in Scala as its syntax is distinct from Java (although, I found myself more and more thinking that the authors have a fluency in Python — the concepts and syntax on many occasions are quite similar).

The book provides an excellent journey — it starts out easy — that is, the pace is helpful for the beginner as Venkat explores basic features, classes, typing, etc and then proceeds to some super interesting subjects like functional programming, Scala’s traits, collections, Java interoperability, followed by concurrency. Plus, he throws in the mix a chapter on using ScalaTest. Lastly, he puts everything together quite nicely with a nice example application for ascertaining stock prices (by which he demonstrates Scala’s impressive XML handling).

All in all, I enjoyed reading this book (as evidenced by the myriad highlighted sentences and example code) and indeed, working through the book gave me the extra confidence to embrace Scala quickly in a production environment.

Looking to spin up Continuous Integration quickly? Check out www.ciinabox.com.