The Busy Java Developer’s Guide to Scala Workshop

Scala is a new programming language incorporating the most important concepts of object-oriented and functional languages and running on top of the Java Virtual Machine as standard “dot-class” files. Sporting the usual object-oriented concepts as classes and inheritance, Scala also offers a number of powerful functional features, such as algebraic data types, immutable objects by default, pattern matching, closures, anonymous functions and currying, and more. Combined with some deep support for XML generation and consumption, Scala offers Java programmers an opportunity to write powerful programs with concise syntax for a new decade of Java programming.

In this presentation, we begin by looking at the Scala type system and flow-control primitives, such as if/else, pattern-matching, tuples, lists, and more. Despite the name, “basics” in Scala can get the newcomer Scala developer quite some distance. Then, we focus on the parts of Scala that feel comfortable to the traditional object-oriented developer, and the various ways that Scala improves the object-oriented experience. After that, we look at the parts of Scala are are functional in nature (rather than object-oriented), and study things like currying, partial function application, writing generic functional code, and some of the functional design approaches that can make coding easier. Finally, we then take the Scala language, its support for XML, it’s immutable and functional approaches, and build a simple XML service with it, no JAX-WS needed (or wanted). Deploying the service as a simple servlet, we show it being consumed from a traditional JAX-WS service client, and from a more “hip” REST approach.

Requirements:
Laptop is not required, but it is reccomended to bring one, with a preinstaled software: Scala 2.8.0-final (or newer). Software can be downloaded from www.scala-lang.org.