Beginning Scala

Beginning Scala
Authors
David Pollak
ISBN
1430219890
Published
25 May 2009
Purchase online
amazon.com

The open source Scala language is a Java–based dynamic scripting, functional programming language. Moreover, this highly scalable scripting language lends itself well to building Cloud–based/deliverable Software as a Service (SaaS) online applications.Written by Lift Scala web framework founder and lead Dave Pollak, Beginning Scala takes a down–to–earth approach to teaching Scala that leads you through simple examples that can be combined to build complex, scalable systems and applications.

Page 2 of 2
  1. Editorial Reviews
  2. Customer Reviews

Customer Reviews

Kelvin D. Meeks said


If you are like me, you are often hard pressed for getting many things done quickly.

If you want a quick introduction to Scala, this book is just right for the level of information provided to get you up and running quickly.

I enjoyed reading David Pollak's "Beginning Scala" - and found it to be very helpful in several ways:

#1 - It is written from the perspective of an experienced Java programmer - and the parallels between the languages that are cited in the text was a very helpful technique for compressing the time needed to digest the material. Ruby parallels are also frequently covered.

#2 - This book is a great book to have on your bookshelf if you want to become immediately productive. David's writing is direct, practical, pragmatic.

#3 - This book is useful for the application developer, library designer, and architect.

At ~290 pages - Beginning Scala does a good solid job of covering the language, with many interesting examples of Scala code.

Chapters include:
1 - About Scala and How to Install It
2 - Scala Syntax, Scripts, and Your First Scala Programs
3 - Collections and the Joy of Immutability
4 - Fun with Functions, and Never Having to Close that JDBC Connection
5 - Pattern Matching
6 - Actors and Concurrency
7 - Traits and Types and Gnarly Stuff for Architects
8 - Parsers - Because BNF Is Not Just for Academics Anymore
9 - Scaling Your Team

I had the pleasure of meeting David at JavaOne 2009 in San Francisco this year. He is a genuinely nice guy - and a passionate Scala enthusiast.

Steven Gilham said
A better title would be "A Scala taster for the Java Programmer" (something you equally get from the Scala web site); very definitely not a "Scala as my first language" text. One of these days we might get a Scala text that doesn't presume any Java experience, but this is not that book.

A besetting sin across the Apress line (Foundations of F# (Expert's Voice in .Net) and Expert F# (Expert's Voice in .Net) also suffer from the similar problem), is weak editing. The author gushes with enthusiasm, and almost free-associates at you, leaving the reader to reverse engineer the general principles being talked around from the accidents of the particular example, without firm editorial hand to separate them.

The editorial hand is also weak, not only in the usual '"Sever" where "Server" was intended' level of copy-editing; but in missing the inconsistent explanation of the use of colon (:) to bind operators right-to-left (page 53 vs page 128 -- I believe the latter is correct).

There are a few features of the language that this book touches on, incidentally and in passing (synchronized methods, duck-type constraints of the [A <: def="" ...signature...]="" form),="" that="" are="" not="" covered="" in="" the="" stairway="" book="" (programming="" in="" scala:="" a="" comprehensive="" step-by-step="" guide),="" and="" the="" different="" set="" of="" examples="" provide="" a="" separate="" perspective="" on="" the="" practical="" application="" of="" the="" language="" features,="" but="" i="" am="" not="" sure="" to="" what="" reader,="" beside="" the="" completist,="" i="" would="" recommend="" this="">

Michael T. Nygard said
Beginning Scala is a nice, gentle introduction to this language. It takes a gradual, example driven approach that emphasizes running code early. This makes it a good intro for people who want to use the language for applications first, then worry about creating frameworks later.

Don't let that fool you, though. Pollak gets to the sophisticated parts soon enough. I particularly like a example of creating a new "control structure" to execute stuff in the context of a JDBC connection. This puts some meat on the argument that Scala is a "scalable language." Where other languages either implement this as a keyword (as in Groovy's "with") or a framework (Spring's "templates"), here it can be added with one page of example code.

Beginning Scala also has a very thorough discussion of actors. I appreciate this, because actors were my main motivation for learning Scala in the first place.

Pollak separates the act of consuming a library from that of creating a library. He advises us to worry most about types, traits, co- and contravariance, etc. mainly when we are creating libraries. True to this notion, chapter 7 is called "Traits and Types and Gnarly Stuff for Architects". It doesn't sound like much fun, but it is important material. I find that Scala makes me think more about the type system than other languages. It's strongly, and statically, typed. (So much so, in fact, that it makes me realize just how loose Java's own type system is.) As such, it pays to have a firm understanding of how code turns into types. Scala has a rich set of tools for building an expressive type system, but there is also complexity there. Checking in at 60 pages, this chapter covers Scala's tools along with guidance on good styles and idioms.

Interestingly, although there is a Lift logo on the cover, there's nothing about Lift in the book itself. Considering that Pollak is the creator of Lift, it's curious that this book doesn't deal with it. Perhaps that's being left for another title.

schwarzwald said
This book is nice and short. It dives into the things Scala has to offer pretty quickly. It makes a good complement to Programming Scala.

The book has lots of little examples and comes from someone who's been using Scala for commercial work for the last couple years.

Finally, the chapter on parsing is simply excellent.

Heiko Seeberger said
Beginning Scala is a must-have!

First it has got the right size for a starter: It covers what you need to get started but does not delve into every detail. Second it will make you enthusiastic about Scala, because everything is well motivated (why?) and shown by good examples (how?). Last but not least the informal style is a pleasure: "Let's go and have some fun." (page 4)

So have fun!

You might also like...

Comments

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.” - Tom Cargill